Via in Pad - Right and Wrong
Here's a pretty simple via-in-pad example that has both good and bad. It's an SOIC-8 so it's a pretty big part. It's not super roomy, but there is plenty of space on the PCB to do things a little different.
Note pin 1. It does have a via connected to the lead land pad, but it also has a little strip of soldermask - a dam between the contact area of the land pad and the via. That little mask dam will stop solder from flowing into the via and everybody will be happy. Well, some people just have a sour disposition so they'll probably never be happy, but at least the assembled PCB will be happy.
Pins 5 through 8, though, are a different story. They have an unobstructed metal path from the land area to the via. It's quite likely that the capillary action of the via will suck the solder off of the lands leading to an unreliable connection. Since one side is all okay and the other is all not okay, you might see a tug-o-war of sorts with the surface tension of the good side pulling the chip too far that way.
My advice to you: Move the vias a hair further away from the pad and put a little soldermask dam in there, just like was done on pin 1.
Soldermask is as soldermask does.