]> git.baikalelectronics.ru Git - kernel.git/commit
udp: Fix udp_poll() and ioctl()
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 9 Oct 2009 04:43:40 +0000 (04:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2009 10:16:54 +0000 (03:16 -0700)
commit2bd8fe55eb76fc71dcad7189001ee4ed8ae0e312
treef35b38f084453e2d7260d4a7a8d13f2a01641664
parent1d6448d27f0255de1dfd0c7c930e95a1d0cb097a
udp: Fix udp_poll() and ioctl()

udp_poll() can in some circumstances drop frames with incorrect checksums.

Problem is we now have to lock the socket while dropping frames, or risk
sk_forward corruption.

This bug is present since commit 1bca6d2e5d15b6b0
([UDP]: Add memory accounting.)

While we are at it, we can correct ioctl(SIOCINQ) to also drop bad frames.

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