[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51C4A3B7.9040903@hartkopp.net>
Date: Fri, 21 Jun 2013 21:04:23 +0200
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Fwd: Re: [PATCH] can: usb_8dev: unregister netdev before free()ing
Hello Greg,
can you please integrate this patch into stable 3.9 too?
The usb_8dev driver was introduced in Linux 3.9 and has now been fixed in
DaveMs net-tree for 3.10 some days ago.
Upstream commit 4afe2156eb639e563d6ef0c2706b66ea400348b2
http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=4afe2156eb639e563d6ef0c2706b66ea400348b2
I wanted to put stable@...nel.org in CC but that bounced.
Tnx,
Oliver
-------- Original Message --------
Subject: Re: [PATCH] can: usb_8dev: unregister netdev before free()ing
Date: Wed, 19 Jun 2013 18:29:12 +0200
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Marc Kleine-Budde <mkl@...gutronix.de>
CC: netdev@...r.kernel.org, linux-can@...r.kernel.org, davem@...emloft.net, stable@...nel.org, Bernd Krumböck <krumboeck@...versalnet.at>
Hello Marc,
the usb_8dev driver was introduced in Linux 3.9 and therefore this reasonable
patch should be queued up for linux-3.9.y stable too.
Regards,
Oliver
On 19.06.2013 09:02, Marc Kleine-Budde wrote:
> The usb_8dev hardware has problems on some xhci USB hosts. The driver fails to
> read the firmware revision in the probe function. This leads to the following
> Oops:
>
> [ 3356.635912] kernel BUG at net/core/dev.c:5701!
>
> The driver tries to free the netdev, which has already been registered, without
> unregistering it.
>
> This patch fixes the problem by unregistering the netdev in the error path.
>
> Reported-by: Michael Olbrich <m.olbrich@...gutronix.de>
> Reviewed-by: Bernd Krumboeck <krumboeck@...versalnet.at>
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
> ---
> drivers/net/can/usb/usb_8dev.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c
> index 6e15ef0..cbd388e 100644
> --- a/drivers/net/can/usb/usb_8dev.c
> +++ b/drivers/net/can/usb/usb_8dev.c
> @@ -977,7 +977,7 @@ static int usb_8dev_probe(struct usb_interface *intf,
> err = usb_8dev_cmd_version(priv, &version);
> if (err) {
> netdev_err(netdev, "can't get firmware version\n");
> - goto cleanup_cmd_msg_buffer;
> + goto cleanup_unregister_candev;
> } else {
> netdev_info(netdev,
> "firmware: %d.%d, hardware: %d.%d\n",
> @@ -989,6 +989,9 @@ static int usb_8dev_probe(struct usb_interface *intf,
>
> return 0;
>
> +cleanup_unregister_candev:
> + unregister_netdev(priv->netdev);
> +
> cleanup_cmd_msg_buffer:
> kfree(priv->cmd_msg_buffer);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-can" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists