]> git.baikalelectronics.ru Git - kernel.git/commit
af_iucv: fix oops in iucv_sock_recvmsg() for MSG_PEEK flag
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Tue, 21 Apr 2009 06:04:21 +0000 (06:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2009 06:43:13 +0000 (23:43 -0700)
commita7282f1cdb7b0d2a5a838c99eb50775e5643093a
treeafd8b424d6a8367ebca081e103a035ca346f88f9
parent40dcc7e8b1967884745886ac667cdb1472cc029e
af_iucv: fix oops in iucv_sock_recvmsg() for MSG_PEEK flag

If iucv_sock_recvmsg() is called with MSG_PEEK flag set, the skb is enqueued
twice. If the socket is then closed, the pointer to the skb is freed twice.

Remove the skb_queue_head() call for MSG_PEEK, because the skb_recv_datagram()
function already handles MSG_PEEK (does not dequeue the skb).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/iucv/af_iucv.c