How many rounds through it? Never had a problem before?
The first time I took my M&P40 out to show off to my Glock friends, it was shooting right for all of us (gave them something to chirp about, even though they loved it). When I got home I noticed my rear sight was loose. Not happy! I was bragging about its accuracy.
I was able to tighten the set screw and it has held. I suspect that little set screw would strip before the threads in the sight. You can send it in to Smith and they'll most likely repair it no charge but do you want to be without if for however long? Maybe just get another set screw and try that. If you can't find one to fit, get item # 108010000 from S&W for $0.27 + stamp.
Sliding the rear sight over and putting a little green loctite under it would work too (with a good set screw). S&W customer service is outstanding but I wouldn't want to be without my M&P40 for that long if it was a simple fix. Now if there's something wrong with the slide, that's a different story.