]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: netlink_recvmsg() fix
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 26 Jul 2010 20:09:16 +0000 (13:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Jul 2010 20:09:16 +0000 (13:09 -0700)
commita8ecc314e60745523a42763b0ed8772ef9412407
tree58969a45226b9d35bbfc7ecc3dab2823c117db39
parentef2e48efc25d11a633bc4674c4cfa37d1b23c21e
netlink: netlink_recvmsg() fix

commit 672a60fd9075
(net/compat/wext: send different messages to compat tasks)
introduced a race condition on netlink, in case MSG_PEEK is used.

An skb given by skb_recv_datagram() might be shared, we must copy it
before any modification, or risk fatal corruption.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c