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:
79c6b8e
)
ieee802154: fix error return code in ieee802154_llsec_getparams()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Wed, 19 May 2021 14:16:14 +0000
(14:16 +0000)
committer
Stefan Schmidt
<stefan@datenfreihafen.org>
Thu, 3 Jun 2021 08:59:49 +0000
(10:59 +0200)
Fix to return negative error code -ENOBUFS from the error handling
case instead of 0, as done elsewhere in this function.
Fixes:
3e9c156e2c21
("ieee802154: add netlink interfaces for llsec")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link:
https://lore.kernel.org/r/20210519141614.3040055-1-weiyongjun1@huawei.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/ieee802154/nl-mac.c
patch
|
blob
|
history
diff --git
a/net/ieee802154/nl-mac.c
b/net/ieee802154/nl-mac.c
index
a6a8cf6
..
29bf976
100644
(file)
--- a/
net/ieee802154/nl-mac.c
+++ b/
net/ieee802154/nl-mac.c
@@
-680,8
+680,10
@@
int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info)
nla_put_u8(msg, IEEE802154_ATTR_LLSEC_SECLEVEL, params.out_level) ||
nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER,
be32_to_cpu(params.frame_counter)) ||
- ieee802154_llsec_fill_key_id(msg, ¶ms.out_key))
+ ieee802154_llsec_fill_key_id(msg, ¶ms.out_key)) {
+ rc = -ENOBUFS;
goto out_free;
+ }
dev_put(dev);