J.T.
you stop your child however you need to, that is absolutely unacceptable. there is going to come a day that the dog doesn't like it, and she is going to defend herself. i have four dogs(we used to have five, one passed away a few years ago) and three children, i have NEVER allowed any of my children at any age to treat our dogs improperly(riding on, sitting on, pulling, pinching, hitting, kicking, etc.). you watch him 100% of the time that he has access to the dog, and you pull him off the second he attempts to get on her and tell him "no", repeat, repeat, repeat. if you can't watch for a period of time, you need to separate the dog and child by a baby gate or a crate for the dog. my animals love my children dearly and vice versa, but i don't expect them to put up with any rough treatment from the children either. a dog's spine is not made to be ridden, and you could be looking at potentially costly or life ending injury over time by allowing this to go on. good luck, 2 is an age where they DEF understand rules and boundaries, they are just testing the waters to see if you will back up what you say!