On 6/18/20 4:19 PM, Randy Dunlap wrote:
>
> 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?
>
I do not see a problem
for (bla; bla; bla)
amount += skb->len;
Seems good to me.
>
> commit bec571ec762a4cf855ad4446f833086fc154b60e
> Author: David S. Miller <da...@davemloft.net>
> Date: Thu May 28 16:43:52 2009 -0700
>
> decnet: Use SKB queue and list helpers instead of doing it by-hand.
>
>
>
> thanks.
>
Also decnet should not be any of our concerns in 2020 ?