Patch "ieee802154: fix error return code in ieee802154_llsec_getparams()" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ieee802154: fix error return code in ieee802154_llsec_getparams()

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ieee802154-fix-error-return-code-in-ieee802154_llsec.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 75d131323d2bc2c29a9d855ab23ce44961d1237a
Author: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Date:   Wed May 19 14:16:14 2021 +0000

    ieee802154: fix error return code in ieee802154_llsec_getparams()
    
    [ Upstream commit 373e864cf52403b0974c2f23ca8faf9104234555 ]
    
    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@xxxxxxxxxx>
    Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210519141614.3040055-1-weiyongjun1@xxxxxxxxxx
    Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c
index 76691a07a2e0..fe31df8dc804 100644
--- a/net/ieee802154/nl-mac.c
+++ b/net/ieee802154/nl-mac.c
@@ -685,8 +685,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, &params.out_key))
+	    ieee802154_llsec_fill_key_id(msg, &params.out_key)) {
+		rc = -ENOBUFS;
 		goto out_free;
+	}
 
 	dev_put(dev);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux