summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-03 13:56:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 17:30:34 +0200
commit5369ead83f5aff223b6418c99cb1fe9a8f007363 (patch)
treec45267b98acfd3094e0e4231f042ecbd7db7d40c /net
parent52202be1cd996cde6e8969a128dc27ee45a7cb5e (diff)
downloadlinux-5369ead83f5aff223b6418c99cb1fe9a8f007363.tar.gz
linux-5369ead83f5aff223b6418c99cb1fe9a8f007363.tar.bz2
linux-5369ead83f5aff223b6418c99cb1fe9a8f007363.zip
Revert "net/smc: fix a NULL pointer dereference"
This reverts commit e183d4e414b64711baf7a04e214b61969ca08dfa. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit causes a memory leak and does not properly fix the issue it claims to fix. I will send a follow-on patch to resolve this properly. Cc: Kangjie Lu <kjlu@umn.edu> Cc: Ursula Braun <ubraun@linux.ibm.com> Cc: David S. Miller <davem@davemloft.net> Link: https://lore.kernel.org/r/20210503115736.2104747-17-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/smc/smc_ism.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c
index 9c6e95882553..6558cf7643a7 100644
--- a/net/smc/smc_ism.c
+++ b/net/smc/smc_ism.c
@@ -417,11 +417,6 @@ struct smcd_dev *smcd_alloc_dev(struct device *parent, const char *name,
init_waitqueue_head(&smcd->lgrs_deleted);
smcd->event_wq = alloc_ordered_workqueue("ism_evt_wq-%s)",
WQ_MEM_RECLAIM, name);
- if (!smcd->event_wq) {
- kfree(smcd->conn);
- kfree(smcd);
- return NULL;
- }
return smcd;
}
EXPORT_SYMBOL_GPL(smcd_alloc_dev);