]> git.baikalelectronics.ru Git - kernel.git/commit
net-2.6 [Bug-Fix][dccp]: fix oops caused after failed initialisation
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 14 Mar 2010 20:13:19 +0000 (20:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Mar 2010 23:00:50 +0000 (16:00 -0700)
commite0b467f2791a976b3cd902cc58ec9f5cf24fb355
tree8bee27033c0e771a9df0c3e8cc3f1dc1091587f0
parentb91a7d930fff6e7abdf6a1824f8704ba706c3ff0
net-2.6 [Bug-Fix][dccp]: fix oops caused after failed initialisation

dccp: fix panic caused by failed initialisation

This fixes a kernel panic reported thanks to Andre Noll:

if DCCP is compiled into the kernel and any out of the initialisation
steps in net/dccp/proto.c:dccp_init() fail, a subsequent attempt to create
a SOCK_DCCP socket will panic, since inet{,6}_create() are not prevented
from creating DCCP sockets.

This patch fixes the problem by propagating a failure in dccp_init() to
dccp_v{4,6}_init_net(), and from there to dccp_v{4,6}_init(), so that the
DCCP protocol is not made available if its initialisation fails.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/proto.c