Linux USB
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: Mans Rullgard <mans@mansr.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] usb: musb: fix crash with highmen PIO and usbmon
Date: Mon, 9 Mar 2020 11:16:11 -0500	[thread overview]
Message-ID: <20200309161611.GC31115@iaqt7> (raw)
In-Reply-To: <20200309152653.29161-1-mans@mansr.com>

On Mon, Mar 09, 2020 at 03:26:53PM +0000, Mans Rullgard wrote:
> When handling a PIO bulk transfer with highmem buffer, a temporary
> mapping is assigned to urb->transfer_buffer.  After the transfer is
> complete, an invalid address is left behind in this pointer.  This is
> not ordinarily a problem since nothing touches that buffer before the
> urb is released.  However, when usbmon is active, usbmon_urb_complete()
> calls (indirectly) mon_bin_get_data() which does access the transfer
> buffer if it is set.  To prevent an invalid memory access here, reset
> urb->tranfer_buffer to NULL when finished (musb_host_rx()), or do not

WARNING: 'tranfer' may be misspelled

I have fixed it locally.

> set it at all (musb_host_tx()).
> 
> Fixes: 8e8a55165469 ("usb: musb: host: Handle highmem in PIO mode")
> Signed-off-by: Mans Rullgard <mans@mansr.com>

Applied. Thanks.
-Bin.

      reply	other threads:[~2020-03-09 16:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 15:26 [PATCH v2] usb: musb: fix crash with highmen PIO and usbmon Mans Rullgard
2020-03-09 16:16 ` Bin Liu [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=20200309161611.GC31115@iaqt7 \
    --to=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mans@mansr.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