llc: Fix double accounting of received packets
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 30 May 2008 09:57:29 +0000 (02:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 May 2008 09:57:29 +0000 (02:57 -0700)
commit3446b9d57edd0b96a89715fef222879e4919a115
treeddf3a460069faba251a92bd1e2054b8db43d6c03
parent12293bf91126ad253a25e2840b307fdc7c2754c3
llc: Fix double accounting of received packets

llc_sap_rcv was being preceded by skb_set_owner_r, then calling
llc_state_process that calls sock_queue_rcv_skb, that in turn calls
skb_set_owner_r again making the space allowed to be used by the socket to be
leaked, making the socket to get stuck.

Fix it by setting skb->sk at llc_sap_rcv and leave the accounting to be done
only at sock_queue_rcv_skb.

Reported-by: Dmitry Petukhov <dmgenp@gmail.com>
Tested-by: Dmitry Petukhov <dmgenp@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/llc/llc_sap.c