OSDN Git Service

net/smc: fix null pointer dereference in smc_listen_decline()
authorKarsten Graul <kgraul@linux.ibm.com>
Fri, 23 Oct 2020 18:48:28 +0000 (20:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Oct 2020 23:29:14 +0000 (16:29 -0700)
commit4a9baf45fd72615a804947a8495b73c4a0a4cb54
tree11e2b78bc086e3056f74bca53ed5195682f689fe
parentaf545bb5ee53f5261db631db2ac4cde54038bdaf
net/smc: fix null pointer dereference in smc_listen_decline()

smc_listen_work() calls smc_listen_decline() on label out_decl,
providing the ini pointer variable. But this pointer can still be null
when the label out_decl is reached.
Fix this by checking the ini variable in smc_listen_work() and call
smc_listen_decline() with the result directly.

Fixes: a7c9c5f4af7f ("net/smc: CLC accept / confirm V2")
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/af_smc.c