The joke was off base, and Smith probably shouldn't have belted Rock...so they were both wrong, I suppose. Comics cross the line sometimes.
If someone mocked my wife's bipolar condition, I probably would have done the same thing that Will Smith did. (rightly or wrongly)