diff options
author | Dongliang Mu <mudongliangabcd@gmail.com> | 2021-07-07 23:56:32 +0800 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2021-07-08 09:37:03 +0200 |
commit | 889d0e7dc68314a273627d89cbb60c09e1cc1c25 (patch) | |
tree | cded30fc9a3a52d3e5f45c73ab61aef06a54ae47 /drivers/net/ieee802154 | |
parent | e9faf53c5a5d01f6f2a09ae28ec63a3bbd6f64fd (diff) | |
download | lwn-889d0e7dc68314a273627d89cbb60c09e1cc1c25.tar.gz lwn-889d0e7dc68314a273627d89cbb60c09e1cc1c25.zip |
ieee802154: hwsim: fix GPF in hwsim_new_edge_nl
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@gmail.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210707155633.1486603-1-mudongliangabcd@gmail.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/mac802154_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c index cae52bfb871e..8caa61ec718f 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; |