Linux-WPAN Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
@ 2021-07-05 13:13 Dongliang Mu
  2021-07-07 13:44 ` Alexander Aring
  0 siblings, 1 reply; 6+ messages in thread
From: Dongliang Mu @ 2021-07-05 13:13 UTC (permalink / raw)
  To: Alexander Aring, Stefan Schmidt, David S. Miller, Jakub Kicinski
  Cc: Dongliang Mu, Alexander Aring, linux-wpan, netdev, linux-kernel

Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
must be present to fix GPF.

Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
 drivers/net/ieee802154/mac802154_hwsim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
index ebc976b7fcc2..cae52bfb871e 100644
--- a/drivers/net/ieee802154/mac802154_hwsim.c
+++ b/drivers/net/ieee802154/mac802154_hwsim.c
@@ -528,14 +528,14 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
 	u32 v0, v1;
 	u8 lqi;
 
-	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;
 
 	if (nla_parse_nested_deprecated(edge_attrs, MAC802154_HWSIM_EDGE_ATTR_MAX, info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE], hwsim_edge_policy, NULL))
 		return -EINVAL;
 
-	if (!edge_attrs[MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID] &&
+	if (!edge_attrs[MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID] ||
 	    !edge_attrs[MAC802154_HWSIM_EDGE_ATTR_LQI])
 		return -EINVAL;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
  2021-07-05 13:13 [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi Dongliang Mu
@ 2021-07-07 13:44 ` Alexander Aring
  2021-07-07 14:40   ` Dongliang Mu
  2021-07-07 14:48   ` Stefan Schmidt
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Aring @ 2021-07-07 13:44 UTC (permalink / raw)
  To: Dongliang Mu
  Cc: Stefan Schmidt, David S. Miller, Jakub Kicinski, Alexander Aring,
	linux-wpan - ML, open list:NETWORKING [GENERAL],
	kernel list

Hi,

On Mon, 5 Jul 2021 at 09:13, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
>
> Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
> MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
> 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>

Thanks, but there are more places than this one. Can you send patches
for them as well? Thanks! :)

- Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
  2021-07-07 13:44 ` Alexander Aring
@ 2021-07-07 14:40   ` Dongliang Mu
  2021-07-07 14:41     ` Stefan Schmidt
  2021-07-07 14:48   ` Stefan Schmidt
  1 sibling, 1 reply; 6+ messages in thread
From: Dongliang Mu @ 2021-07-07 14:40 UTC (permalink / raw)
  To: Alexander Aring
  Cc: Stefan Schmidt, David S. Miller, Jakub Kicinski, Alexander Aring,
	linux-wpan - ML, open list:NETWORKING [GENERAL],
	kernel list

On Wed, Jul 7, 2021 at 9:44 PM Alexander Aring <alex.aring@gmail.com> wrote:
>
> Hi,
>
> On Mon, 5 Jul 2021 at 09:13, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
> >
> > Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
> > MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
> > 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>
>
> Thanks, but there are more places than this one. Can you send patches
> for them as well? Thanks! :)

Sure. I will double-check those places and send patches to fix them.

>
> - Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
  2021-07-07 14:40   ` Dongliang Mu
@ 2021-07-07 14:41     ` Stefan Schmidt
  2021-07-07 14:42       ` Dongliang Mu
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Schmidt @ 2021-07-07 14:41 UTC (permalink / raw)
  To: Dongliang Mu, Alexander Aring
  Cc: David S. Miller, Jakub Kicinski, Alexander Aring,
	linux-wpan - ML, open list:NETWORKING [GENERAL],
	kernel list

Hello.

On 07.07.21 16:40, Dongliang Mu wrote:
> On Wed, Jul 7, 2021 at 9:44 PM Alexander Aring <alex.aring@gmail.com> wrote:
>>
>> Hi,
>>
>> On Mon, 5 Jul 2021 at 09:13, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
>>>
>>> Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
>>> MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
>>> 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>
>>
>> Thanks, but there are more places than this one. Can you send patches
>> for them as well? Thanks! :)
> 
> Sure. I will double-check those places and send patches to fix them.

I will take this one in as-is. All new patches should be done with this 
one applied.

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
  2021-07-07 14:41     ` Stefan Schmidt
@ 2021-07-07 14:42       ` Dongliang Mu
  0 siblings, 0 replies; 6+ messages in thread
From: Dongliang Mu @ 2021-07-07 14:42 UTC (permalink / raw)
  To: Stefan Schmidt
  Cc: Alexander Aring, David S. Miller, Jakub Kicinski,
	Alexander Aring, linux-wpan - ML, open list:NETWORKING [GENERAL],
	kernel list

On Wed, Jul 7, 2021 at 10:41 PM Stefan Schmidt
<stefan@datenfreihafen.org> wrote:
>
> Hello.
>
> On 07.07.21 16:40, Dongliang Mu wrote:
> > On Wed, Jul 7, 2021 at 9:44 PM Alexander Aring <alex.aring@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> On Mon, 5 Jul 2021 at 09:13, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
> >>>
> >>> Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
> >>> MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
> >>> 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>
> >>
> >> Thanks, but there are more places than this one. Can you send patches
> >> for them as well? Thanks! :)
> >
> > Sure. I will double-check those places and send patches to fix them.
>
> I will take this one in as-is. All new patches should be done with this
> one applied.

Sure. Thanks for your reminder.

>
> regards
> Stefan Schmidt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
  2021-07-07 13:44 ` Alexander Aring
  2021-07-07 14:40   ` Dongliang Mu
@ 2021-07-07 14:48   ` Stefan Schmidt
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Schmidt @ 2021-07-07 14:48 UTC (permalink / raw)
  To: Alexander Aring, Dongliang Mu
  Cc: David S. Miller, Jakub Kicinski, Alexander Aring,
	linux-wpan - ML, open list:NETWORKING [GENERAL],
	kernel list

Hello.

On 07.07.21 15:44, Alexander Aring wrote:
> Hi,
> 
> On Mon, 5 Jul 2021 at 09:13, Dongliang Mu <mudongliangabcd@gmail.com> wrote:
>>
>> Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE,
>> MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI
>> 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>


This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:13 [PATCH] ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi Dongliang Mu
2021-07-07 13:44 ` Alexander Aring
2021-07-07 14:40   ` Dongliang Mu
2021-07-07 14:41     ` Stefan Schmidt
2021-07-07 14:42       ` Dongliang Mu
2021-07-07 14:48   ` Stefan Schmidt

Linux-WPAN Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
		linux-wpan@vger.kernel.org
	public-inbox-index linux-wpan

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git