All of lore.kernel.org
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] USB: gadget: udc: atmel: fix possible oops when unloading module
Date: Thu, 8 Jan 2015 11:15:23 -0600	[thread overview]
Message-ID: <20150108171523.GL31926@saruman> (raw)
In-Reply-To: <1419932967-2694-1-git-send-email-songjun.wu@atmel.com>

Hi,

On Tue, Dec 30, 2014 at 05:49:27PM +0800, Songjun Wu wrote:
> Executing the 'insmod g_hid.ko', then executing the
> 'rmmod g_hid.ko', the NULL pointer oops will be triggered.
> 
> When unloading the module 'g_hid.ko', the urb request will be
> dequeued and the completion routine will be excuted. If no urb
> packet, the urb request will not be added to the endpoint queue
> and the completion routine pointer in urb request is NULL.
> Accessing to the NULL function pointer will cause the oops issue.
> Add the code to check the urb request is in the endpoint queue
> or not.If the urb request is not in the endpoint queue, a negative
> error code will be returned.
> 
> This bug was introduced since the file 'atmel_usba_udc.c' was
> initialized. Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver)
> Cc: stable at vger.kernel.org # always been there...

this is not the way you write this. There are tons of examples in the
very git tree you're using of how to do this. Just run:

$ git log --grep "Fixes:"

Also have a read at Documentation/SubmittingPatches and search for
"Fixes" in that file. You might also want to look at
Documentation/stable-kernel-rules.txt to figure out how to properly Cc
stable.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150108/f33afffd/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: Songjun Wu <songjun.wu@atmel.com>
Cc: <balbi@ti.com>, <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<nicolas.ferre@atmel.com>, <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] USB: gadget: udc: atmel: fix possible oops when unloading module
Date: Thu, 8 Jan 2015 11:15:23 -0600	[thread overview]
Message-ID: <20150108171523.GL31926@saruman> (raw)
In-Reply-To: <1419932967-2694-1-git-send-email-songjun.wu@atmel.com>

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Hi,

On Tue, Dec 30, 2014 at 05:49:27PM +0800, Songjun Wu wrote:
> Executing the 'insmod g_hid.ko', then executing the
> 'rmmod g_hid.ko', the NULL pointer oops will be triggered.
> 
> When unloading the module 'g_hid.ko', the urb request will be
> dequeued and the completion routine will be excuted. If no urb
> packet, the urb request will not be added to the endpoint queue
> and the completion routine pointer in urb request is NULL.
> Accessing to the NULL function pointer will cause the oops issue.
> Add the code to check the urb request is in the endpoint queue
> or not.If the urb request is not in the endpoint queue, a negative
> error code will be returned.
> 
> This bug was introduced since the file 'atmel_usba_udc.c' was
> initialized. Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver)
> Cc: stable@vger.kernel.org # always been there...

this is not the way you write this. There are tons of examples in the
very git tree you're using of how to do this. Just run:

$ git log --grep "Fixes:"

Also have a read at Documentation/SubmittingPatches and search for
"Fixes" in that file. You might also want to look at
Documentation/stable-kernel-rules.txt to figure out how to properly Cc
stable.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-01-08 17:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30  9:49 [PATCH] USB: gadget: udc: atmel: fix possible oops when unloading module Songjun Wu
2014-12-30  9:49 ` Songjun Wu
2015-01-08 17:15 ` Felipe Balbi [this message]
2015-01-08 17:15   ` Felipe Balbi
2015-01-09 16:11   ` [RESEND PATCH] " Nicolas Ferre
2015-01-09 16:11     ` Nicolas Ferre
  -- strict thread matches above, loose matches on Subject: below --
2014-12-22  9:26 [PATCH] " Songjun Wu
2014-12-22  9:26 ` Songjun Wu
2014-12-23 16:24 ` Felipe Balbi
2014-12-23 16:24   ` Felipe Balbi
2014-12-24  1:14   ` Wu, Songjun
2014-12-24  1:14     ` Wu, Songjun
2014-12-26 15:27     ` Felipe Balbi
2014-12-26 15:27       ` Felipe Balbi
2014-12-29  9:37       ` Wu, Songjun
2014-12-29  9:37         ` Wu, Songjun
2014-12-29  9:42       ` Wu, Songjun
2014-12-29  9:42         ` Wu, Songjun
2014-12-29 15:54         ` Felipe Balbi
2014-12-29 15:54           ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150108171523.GL31926@saruman \
    --to=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.