linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: shuwang@redhat.com, mathias.nyman@intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	chuhu@redhat.com, liwang@redhat.com
Subject: Re: [PATCH] xhci: fix memleak in xhci_run()
Date: Thu, 20 Jul 2017 14:46:32 +0300	[thread overview]
Message-ID: <59709818.9040109@linux.intel.com> (raw)
In-Reply-To: <1500529238-12008-1-git-send-email-shuwang@redhat.com>

On 20.07.2017 08:40, shuwang@redhat.com wrote:
> From: Shu Wang <shuwang@redhat.com>
>
> Found this issue by kmemleak.
> xhci_run() did not check return val and free command for
> xhci_queue_vendor_command()
>
> unreferenced object 0xffff88011c0be500 (size 64):
>    comm "kworker/0:1", pid 58, jiffies 4294670908 (age 50.420s)
>    hex dump (first 32 bytes):
>    backtrace:
>      [<ffffffff8176166a>] kmemleak_alloc+0x4a/0xa0
>      [<ffffffff8121801a>] kmem_cache_alloc_trace+0xca/0x1d0
>      [<ffffffff81576bf4>] xhci_alloc_command+0x44/0x130
>      [<ffffffff8156f1cc>] xhci_run+0x4cc/0x630
>      [<ffffffff8153b84b>] usb_add_hcd+0x3bb/0x950
>      [<ffffffff8154eac8>] usb_hcd_pci_probe+0x188/0x500
>      [<ffffffff815851ac>] xhci_pci_probe+0x2c/0x220
>      [<ffffffff813d2ca5>] local_pci_probe+0x45/0xa0
>      [<ffffffff810a54e4>] work_for_cpu_fn+0x14/0x20
>      [<ffffffff810a8409>] process_one_work+0x149/0x360
>      [<ffffffff810a8d08>] worker_thread+0x1d8/0x3c0
>      [<ffffffff810ae7d9>] kthread+0x109/0x140
>      [<ffffffff8176d585>] ret_from_fork+0x25/0x30
>      [<ffffffffffffffff>] 0xffffffffffffffff
>
> Signed-off-by: Shu Wang <shuwang@redhat.com>

Thanks, adding

-Mathias

      reply	other threads:[~2017-07-20 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20  5:40 [PATCH] xhci: fix memleak in xhci_run() shuwang
2017-07-20 11:46 ` Mathias Nyman [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=59709818.9040109@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=chuhu@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=liwang@redhat.com \
    --cc=mathias.nyman@intel.com \
    --cc=shuwang@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).