projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7179fe0
)
RDMA/nldev: Set error code in rdma_nl_notify_event
author
Chiara Meiohas
<cmeiohas@nvidia.com>
Tue, 10 Dec 2024 07:33:10 +0000
(09:33 +0200)
committer
Leon Romanovsky
<leon@kernel.org>
Thu, 19 Dec 2024 10:15:20 +0000
(
05:15
-0500)
In case of error set the error code before the goto.
Fixes:
6ff57a2ea7c2
("RDMA/nldev: Fix NULL pointer dereferences issue in rdma_nl_notify_event")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-rdma/
a84a2fc3
-33b6-46da-a1bd-
3343fa07eaf9
@stanley.mountain/
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Reviewed-by: Maher Sanalla <msanalla@nvidia.com>
Link:
https://patch.msgid.link/13eb25961923f5de9eb9ecbbc94e26113d6049ef.1733815944.git.leonro@nvidia.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/nldev.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/core/nldev.c
b/drivers/infiniband/core/nldev.c
index
ff121e5
..
cb987ab
100644
(file)
--- a/
drivers/infiniband/core/nldev.c
+++ b/
drivers/infiniband/core/nldev.c
@@
-2833,8
+2833,8
@@
int rdma_nl_notify_event(struct ib_device *device, u32 port_num,
enum rdma_nl_notify_event_type type)
{
struct sk_buff *skb;
+ int ret = -EMSGSIZE;
struct net *net;
- int ret = 0;
void *nlh;
net = read_pnet(&device->coredev.rdma_net);