]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rds: Incorrect reference counting in TCP socket creation
authorKa-Cheong Poon <ka-cheong.poon@oracle.com>
Tue, 27 Feb 2018 03:05:47 +0000 (19:05 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 7 Mar 2018 05:08:58 +0000 (21:08 -0800)
commit935740174737578ab61a6c2af5a7051faab289ab
tree3bcf1f9a00ba4496d4feab97b724374a1064e41a
parent4fb79acb3ccb75a8becf2a81ec15fc6baa3c9b6e
rds: Incorrect reference counting in TCP socket creation

Commit a670499f5a9a ("rds: tcp: use sock_create_lite() to create the
accept socket") has a reference counting issue in TCP socket creation
when accepting a new connection.  The code uses sock_create_lite() to
create a kernel socket.  But it does not do __module_get() on the
socket owner.  When the connection is shutdown and sock_release() is
called to free the socket, the owner's reference count is decremented
and becomes incorrect.  Note that this bug only shows up when IPv6 is
configured as a kernel module.

Orabug: 27602824

Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
net/rds/tcp_listen.c