projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c21180
)
devlink: Unlock on error in dumpit()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 26 Oct 2020 08:01:27 +0000
(11:01 +0300)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 28 Oct 2020 00:05:57 +0000
(17:05 -0700)
This needs to unlock before returning.
Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/20201026080127.GB1628785@mwanda
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c
patch
|
blob
|
history
diff --git
a/net/core/devlink.c
b/net/core/devlink.c
index 925da7c0fcf3eb310110e775fb3aa521e1c7b3fb..a932d95be798474e660d9b2dd3849999da69264f 100644
(file)
--- a/
net/core/devlink.c
+++ b/
net/core/devlink.c
@@
-4919,8
+4919,10
@@
static int devlink_nl_cmd_region_read_dumpit(struct sk_buff *skb,
index = nla_get_u32(info->attrs[DEVLINK_ATTR_PORT_INDEX]);
port = devlink_port_get_by_index(devlink, index);
- if (!port)
- return -ENODEV;
+ if (!port) {
+ err = -ENODEV;
+ goto out_unlock;
+ }
}
region_name = nla_data(attrs[DEVLINK_ATTR_REGION_NAME]);