]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit12876ddcd598d18ea6fd8004c9ac832d14c1568e
tree11e2b78bc086e3056f74bca53ed5195682f689fe
parentb99e2f42d04746fd24ef538eeda2403a54915151
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: 1ed69f6a0e2a ("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