1. With the legs in, does the top man make progress toward near fall? Progress means advancing from:
a. Bottom man on all fours
b. Bottom man broken down
c. Bottom man with shoulders heading toward NF criteria
d. Bottom man with shoulders in NF criteria
2. When progress stops, how long is long enough? For me, somewhere around 10 - 15 seconds with no progress (a thru d) means the situation has gone on long enough. First time around, I'll call stalemate.
3. If the top man puts the legs in again, he already has established a track record that he couldn't turn the leg ride into NF. So, once the situation stops making progress, I will call a stalemate after 5 - 10 seconds a second time. At this time, I verbalize to the wrestlers, "Reminder wrestlers, repeated stalemates can be construed as stalling."
4. Legs in a third time and no progress after 5 - 10 seconds, I call stalling on the top man.
Also, I (and most officials) put a greater burden on the top man to demonstrate something with those legs than on the bottom man. Why? Because the bottom man is definitely disadvantaged when his opponent is applying a solid leg ride. It takes a lot of work for the bottom guy to avoid getting turned, and if he can avoid that, a lot of work to get those legs out. I might consider stalling on the bottom man only if he remains in a defendable position and does absolutely nothing else. But, I would tell you, that it is rare that the bottom man can achieve this - normally, against a legitimate leg rider, that bottom guy is having to fight hard to defend against that leg ride and is demonstrating some aggressive activity.
As for the situation where the top man puts in legs AFTER the bottom man stands, then I'd call Potentially Dangerous the first time. If it happened again, I'd call PD + Stalling. That particular action by the top man does nothing to advance toward scoring.