]> git.baikalelectronics.ru Git - kernel.git/commit
udplite: fix NULL pointer dereference
authorPaolo Abeni <pabeni@redhat.com>
Tue, 15 Nov 2016 15:37:53 +0000 (16:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Nov 2016 16:59:38 +0000 (11:59 -0500)
commit095fa7ce76f9aac3c6a3d0d5a1449488da1dba99
treeb887552a905b9a209b9f800977027b9b8219f37e
parentd1bcf79b499b84720f9fb179e969b2df0d261ebd
udplite: fix NULL pointer dereference

The commit 85f287938f7f ("udp: use it's own memory accounting schema")
assumes that the socket proto has memory accounting enabled,
but this is not the case for UDPLITE.
Fix it enabling memory accounting for UDPLITE and performing
fwd allocated memory reclaiming on socket shutdown.
UDP and UDPLITE share now the same memory accounting limits.
Also drop the backlog receive operation, since is no more needed.

Fixes: 85f287938f7f ("udp: use it's own memory accounting schema")
Reported-by: Andrei Vagin <avagin@gmail.com>
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/udp.h
include/net/udplite.h
net/ipv4/udp.c
net/ipv4/udplite.c
net/ipv6/udplite.c