]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Check laddr_check before calling it
authorKa-Cheong Poon <ka-cheong.poon@oracle.com>
Tue, 24 Sep 2019 15:51:16 +0000 (08:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 10:10:55 +0000 (12:10 +0200)
commit59d0d474ff9eb99ca0eb0206d92e3551edc56135
tree7a9fe3ea13f277233a5871b7ac7008bdda4c51f3
parentf65bbac859eeeee2c1e66c7cadc1794c3412cee0
net/rds: Check laddr_check before calling it

In rds_bind(), laddr_check is called without checking if it is NULL or
not.  And rs_transport should be reset if rds_add_bound() fails.

Fixes: d6b20a05f2ee ("net/rds: An rds_sock is added too early to the hash table")
Reported-by: syzbot+fae39afd2101a17ec624@syzkaller.appspotmail.com
Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/bind.c