linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
@ 2019-10-04 14:44 Johan Hovold
  2019-10-04 14:44 ` [PATCH 2/2] rsi: drop bogus device-id checks from probe Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Johan Hovold @ 2019-10-04 14:44 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Amitkumar Karwar, Siva Rebbagondla, linux-wireless, netdev,
	linux-kernel, Denis Efremov, Johan Hovold

This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.

USB core will never call a USB-driver probe function with a NULL
device-id pointer.

Reverting before removing the existing checks in order to document this
and prevent the offending commit from being "autoselected" for stable.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/rsi/rsi_91x_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 23a1d00b5f38..760eaffeebd6 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -793,7 +793,7 @@ static int rsi_probe(struct usb_interface *pfunction,
 		adapter->device_model = RSI_DEV_9116;
 	} else {
 		rsi_dbg(ERR_ZONE, "%s: Unsupported RSI device id 0x%x\n",
-			__func__, id ? id->idProduct : 0x0);
+			__func__, id->idProduct);
 		goto err1;
 	}
 
-- 
2.23.0


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

* [PATCH 2/2] rsi: drop bogus device-id checks from probe
  2019-10-04 14:44 [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Johan Hovold
@ 2019-10-04 14:44 ` Johan Hovold
  2019-10-06  8:23 ` [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Kalle Valo
  2019-10-09  8:24 ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Johan Hovold @ 2019-10-04 14:44 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Amitkumar Karwar, Siva Rebbagondla, linux-wireless, netdev,
	linux-kernel, Denis Efremov, Johan Hovold

USB core will never call a USB-driver probe function with a NULL
device-id pointer.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/rsi/rsi_91x_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 760eaffeebd6..53f41fc2cadf 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -785,10 +785,10 @@ static int rsi_probe(struct usb_interface *pfunction,
 
 	rsi_dbg(ERR_ZONE, "%s: Initialized os intf ops\n", __func__);
 
-	if (id && id->idProduct == RSI_USB_PID_9113) {
+	if (id->idProduct == RSI_USB_PID_9113) {
 		rsi_dbg(INIT_ZONE, "%s: 9113 module detected\n", __func__);
 		adapter->device_model = RSI_DEV_9113;
-	} else if (id && id->idProduct == RSI_USB_PID_9116) {
+	} else if (id->idProduct == RSI_USB_PID_9116) {
 		rsi_dbg(INIT_ZONE, "%s: 9116 module detected\n", __func__);
 		adapter->device_model = RSI_DEV_9116;
 	} else {
-- 
2.23.0


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

* Re: [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
  2019-10-04 14:44 [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Johan Hovold
  2019-10-04 14:44 ` [PATCH 2/2] rsi: drop bogus device-id checks from probe Johan Hovold
@ 2019-10-06  8:23 ` Kalle Valo
  2019-10-08 15:56   ` Kalle Valo
  2019-10-09  8:24 ` Kalle Valo
  2 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2019-10-06  8:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Amitkumar Karwar, Siva Rebbagondla, linux-wireless, netdev,
	linux-kernel, Denis Efremov

Johan Hovold <johan@kernel.org> writes:

> This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
>
> USB core will never call a USB-driver probe function with a NULL
> device-id pointer.
>
> Reverting before removing the existing checks in order to document this
> and prevent the offending commit from being "autoselected" for stable.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>

I'll queue these two to v5.4.

-- 
Kalle Valo

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

* Re: [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
  2019-10-06  8:23 ` [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Kalle Valo
@ 2019-10-08 15:56   ` Kalle Valo
  2019-10-08 16:44     ` Johan Hovold
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2019-10-08 15:56 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Johan Hovold, Amitkumar Karwar, Siva Rebbagondla, linux-wireless,
	netdev, linux-kernel, Denis Efremov

Kalle Valo <kvalo@codeaurora.org> writes:

> Johan Hovold <johan@kernel.org> writes:
>
>> This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
>>
>> USB core will never call a USB-driver probe function with a NULL
>> device-id pointer.
>>
>> Reverting before removing the existing checks in order to document this
>> and prevent the offending commit from being "autoselected" for stable.
>>
>> Signed-off-by: Johan Hovold <johan@kernel.org>
>
> I'll queue these two to v5.4.

Actually I'll take that back. Commit f170d44bc4ec is in -next so I have
to also queue these to -next.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
  2019-10-08 15:56   ` Kalle Valo
@ 2019-10-08 16:44     ` Johan Hovold
  2019-10-08 19:24       ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Hovold @ 2019-10-08 16:44 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Johan Hovold, Amitkumar Karwar, Siva Rebbagondla, linux-wireless,
	netdev, linux-kernel, Denis Efremov

On Tue, Oct 08, 2019 at 06:56:37PM +0300, Kalle Valo wrote:
> Kalle Valo <kvalo@codeaurora.org> writes:
> 
> > Johan Hovold <johan@kernel.org> writes:
> >
> >> This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
> >>
> >> USB core will never call a USB-driver probe function with a NULL
> >> device-id pointer.
> >>
> >> Reverting before removing the existing checks in order to document this
> >> and prevent the offending commit from being "autoselected" for stable.
> >>
> >> Signed-off-by: Johan Hovold <johan@kernel.org>
> >
> > I'll queue these two to v5.4.
> 
> Actually I'll take that back. Commit f170d44bc4ec is in -next so I have
> to also queue these to -next.

That's right. I'm assuming you don't rebase your branches, otherwise
just dropping the offending patch might of course be an option instead
of the revert.

Johan

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

* Re: [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
  2019-10-08 16:44     ` Johan Hovold
@ 2019-10-08 19:24       ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2019-10-08 19:24 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Amitkumar Karwar, Siva Rebbagondla, linux-wireless, netdev,
	linux-kernel, Denis Efremov

Johan Hovold <johan@kernel.org> writes:

> On Tue, Oct 08, 2019 at 06:56:37PM +0300, Kalle Valo wrote:
>> Kalle Valo <kvalo@codeaurora.org> writes:
>> 
>> > Johan Hovold <johan@kernel.org> writes:
>> >
>> >> This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
>> >>
>> >> USB core will never call a USB-driver probe function with a NULL
>> >> device-id pointer.
>> >>
>> >> Reverting before removing the existing checks in order to document this
>> >> and prevent the offending commit from being "autoselected" for stable.
>> >>
>> >> Signed-off-by: Johan Hovold <johan@kernel.org>
>> >
>> > I'll queue these two to v5.4.
>> 
>> Actually I'll take that back. Commit f170d44bc4ec is in -next so I have
>> to also queue these to -next.
>
> That's right. I'm assuming you don't rebase your branches, otherwise
> just dropping the offending patch might of course be an option instead
> of the revert.

Yeah, I don't rebase my trees so we have to do a revert.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()"
  2019-10-04 14:44 [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Johan Hovold
  2019-10-04 14:44 ` [PATCH 2/2] rsi: drop bogus device-id checks from probe Johan Hovold
  2019-10-06  8:23 ` [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Kalle Valo
@ 2019-10-09  8:24 ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2019-10-09  8:24 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Amitkumar Karwar, Siva Rebbagondla, linux-wireless, netdev,
	linux-kernel, Denis Efremov, Johan Hovold

Johan Hovold <johan@kernel.org> wrote:

> This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
> 
> USB core will never call a USB-driver probe function with a NULL
> device-id pointer.
> 
> Reverting before removing the existing checks in order to document this
> and prevent the offending commit from being "autoselected" for stable.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

2 patches applied to wireless-drivers-next.git, thanks.

c5dcf8f0e850 Revert "rsi: fix potential null dereference in rsi_probe()"
39e50f5ce26c rsi: drop bogus device-id checks from probe

-- 
https://patchwork.kernel.org/patch/11174711/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2019-10-09  8:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 14:44 [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Johan Hovold
2019-10-04 14:44 ` [PATCH 2/2] rsi: drop bogus device-id checks from probe Johan Hovold
2019-10-06  8:23 ` [PATCH 1/2] Revert "rsi: fix potential null dereference in rsi_probe()" Kalle Valo
2019-10-08 15:56   ` Kalle Valo
2019-10-08 16:44     ` Johan Hovold
2019-10-08 19:24       ` Kalle Valo
2019-10-09  8:24 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).