Please see lines 1250-1251.
case TIOCINQ:
lock_sock(sk);
skb = skb_peek(&scp->other_receive_queue);
if (skb) {
amount = skb->len;
} else {
skb_queue_walk(&sk->sk_receive_queue, skb) <<<<<
amount += skb->len; <<<<<
}
release_sock(sk);
err = put_user(amount, (int __user *)arg);
break;
or is this some kind of GCC nested function magic?
commit bec571ec762a4cf855ad4446f833086fc154b60e
Author: David S. Miller <[email protected]>
Date: Thu May 28 16:43:52 2009 -0700
decnet: Use SKB queue and list helpers instead of doing it by-hand.
thanks.
--
~Randy
Reported-by: Randy Dunlap <[email protected]>