Revert "net/smc: fix a NULL pointer dereference"
[ Upstream commit5369ead83f
] This reverts commite183d4e414
. 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@ -289,11 +289,6 @@ struct smcd_dev *smcd_alloc_dev(struct device *parent, const char *name,
|
||||
INIT_LIST_HEAD(&smcd->vlan);
|
||||
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);
|
||||
|
Reference in New Issue
Block a user