Just to give a view from the other side - we have a 9 month old (but adult sized) lab, and she loves children so if one is walking past she will wander up to them for a cuddle. 99% of the time, the kids love her and she gets lots of attention, and therefore will do it to almost every child we see, because she thinks everyone wants to stroke her. She is never vicious and the first thing she usually does is sit for a treat, but, as a lab she can be a bit excited and clumsy, and has been known to knock smaller kids down by accident with her tail (and then kiss them!) .
We're always mortified and do our best to stop it happening, but sometimes the parent or child will call the dog over themselves, so there's not much you can do until you get to them (especially if you're in a big open area and people appear out of nowhere). No matter how hard you've worked on your training, some things are just more appealing than the owner at that moment! Actually I've never had anyone who minded, as they know she's just being friendly - but I have to admit if someone threatened to kick her, they'd get the sharp end of my tongue and I'd think they were pretty stupid as she's very obviously not a nasty dog (and people will react to you threatening their dog like you would react to someone threatening your child). Of course if a dog is vicious, you're within your rights to protect yourself - I've kicked a few nasty beasts in my time to see them off when they've attacked my own dogs (we get it too BTW - stupid idiots who can't control their dogs, even when they're vicious, so I understand the frustration).
I think it depends where you're walking too. If you're walking in a doggy area (by which I mean if you can't walk for 5 minutes without meeting a dog, whereas they could probably walk for hours without seeing a single small child, or any other reason to put their dogs on a lead) people will automatically assume that you're not scared of dogs and wouldn't necessarily think to call their dogs back. Others will be of the opinion that their dogs have as much right to be there as your DS, and therefore you having to pick him up is no different to them having to put their dog on the lead.
We only tend to walk in 'doggy' areas and TBH sometimes it can get pretty annoying when you're trying to exercise your dog and have to keep calling it back because there's small kids running about in what is clearly a dog walking area. Our local beach is always full of dog walkers and you still get people walking there who clearly hate dogs, and glare at you when you walk past as if you have no right to be there, or walk right along the shore line when the dogs are running in and out of the water, and you hear them tutting if the dog crosses their path. Yet there's a (bigger, nicer) dog-free beach two minutes up the road that they could use. We also walk at an old racecourse which is nothing but a big flat field, and is clearly a dog walking area (lots of poo bins, always full of dogs), but some people take their kids to walk (and picnic!) there and you see them having a fit whenever the dog runs within 100 meters of them. It always leaves me wondering why they don't walk their dogs in one of the dozen dog-free parks in the area instead
I know you have every right to walk wherever you like, I don't mean to imply otherwise, but if you choose to walk in doggy areas, you have to accept that you will meet dogs off the lead and some of them will come up to you (especially as most people who walk in doggy areas are doggy people, and therefore dogs think that everyone they see will like them and/or give them a cuddle and some treats). And unfortunately some of them won't have decent owners who will call them back. I think the advice already given is good - be boring, tell them to sit etc. Maybe carry a bag of treats so you can keep their attention until their owner gets to you. And of course don't be afraid to take defensive action if the situation warrants it - we sometimes take a walking stick with us if we're going to a strange area incase we meet any nasty dogs.