Baby head bounce back and forth

I was in my rocking chair yesterday and had my baby with his head on my shoulder and one hand on his butt and i wasn't paying attention and out of no where he pulled his head back hard and all his body when back and forth and im afraid i damage his head/brain. Pls advise

Im scared