diff mbox series

[1/2] Revert "rsi: fix potential null dereference in rsi_probe()"

Message ID 20191004144422.13003-1-johan@kernel.org (mailing list archive)
State Accepted
Commit c5dcf8f0e850a504235a0af51f73d51b6ddc0933
Delegated to: Kalle Valo
Headers show
Series [1/2] Revert "rsi: fix potential null dereference in rsi_probe()" | expand

Commit Message

Johan Hovold Oct. 4, 2019, 2:44 p.m. UTC
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(-)

Comments

Kalle Valo Oct. 6, 2019, 8:23 a.m. UTC | #1
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 Oct. 8, 2019, 3:56 p.m. UTC | #2
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.
Johan Hovold Oct. 8, 2019, 4:44 p.m. UTC | #3
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
Kalle Valo Oct. 8, 2019, 7:24 p.m. UTC | #4
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.
Kalle Valo Oct. 9, 2019, 8:24 a.m. UTC | #5
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
diff mbox series

Patch

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;
 	}