Patch "ieee802154: hwsim: fix GPF in hwsim_new_edge_nl" has been added to the 5.10-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: hwsim: fix GPF in hwsim_new_edge_nl

to the 5.10-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-hwsim-fix-gpf-in-hwsim_new_edge_nl.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 1689d71783cb2112ca3206ca9aa5d6715f28993f
Author: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
Date:   Wed Jul 7 23:56:32 2021 +0800

    ieee802154: hwsim: fix GPF in hwsim_new_edge_nl
    
    [ Upstream commit 889d0e7dc68314a273627d89cbb60c09e1cc1c25 ]
    
    Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE
    must be present to fix GPF.
    
    Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
    Signed-off-by: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
    Acked-by: Alexander Aring <aahringo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210707155633.1486603-1-mudongliangabcd@xxxxxxxxx
    Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
index 43f389540bba..080b15fc0060 100644
--- a/drivers/net/ieee802154/mac802154_hwsim.c
+++ b/drivers/net/ieee802154/mac802154_hwsim.c
@@ -418,7 +418,7 @@ static int hwsim_new_edge_nl(struct sk_buff *msg, struct genl_info *info)
 	struct hwsim_edge *e;
 	u32 v0, v1;
 
-	if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] &&
+	if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] ||
 	    !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
 		return -EINVAL;
 



[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