mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: Re: [BUGFIX PATCH] USB: chipidea: fix use after free bug
Date: Thu, 22 Nov 2012 11:29:33 +0200	[thread overview]
Message-ID: <87vccy3s02.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <1353575485-23941-1-git-send-email-LW@KARO-electronics.de>

Lothar Waßmann <LW@KARO-electronics.de> writes:

> The pointer to a platform_device struct must not be dereferenced after
> the device has been unregistered.
>
> This bug produces a crash when unloading the ci13xxx kernel module
> compiled with CONFIG_PAGE_POISONING enabled.
>
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>

Good one, thanks.

Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

Greg, this is -stable material, applicable starting from v3.6.

> ---
>  drivers/usb/chipidea/core.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index f69d029..b726c49 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -385,8 +385,9 @@ EXPORT_SYMBOL_GPL(ci13xxx_add_device);
>  
>  void ci13xxx_remove_device(struct platform_device *pdev)
>  {
> +	int id = pdev->id;
>  	platform_device_unregister(pdev);
> -	ida_simple_remove(&ci_ida, pdev->id);
> +	ida_simple_remove(&ci_ida, id);
>  }
>  EXPORT_SYMBOL_GPL(ci13xxx_remove_device);
>  
> -- 
> 1.7.2.5

      reply	other threads:[~2012-11-22 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  9:11 Lothar Waßmann
2012-11-22  9:29 ` Alexander Shishkin [this message]

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=87vccy3s02.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=LW@KARO-electronics.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®