linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Gao <jmgao@google.com>
To: fei.yang@intel.com
Cc: balbi@kernel.org, gregkh@linuxfoundation.org,
	Jerry Zhang <zhangjerry@google.com>,
	andrzej.p@collabora.com, plr.vincent@gmail.com,
	jingx.shen@intel.com, John Stultz <john.stultz@linaro.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] usb: gadget: f_fs: don't free buffer prematurely
Date: Tue, 19 Mar 2019 22:56:54 -0700	[thread overview]
Message-ID: <CAAHfpN_2rUu+kCCgOV+RdqCU5+XRe_c3KkJk6FNv50FG+5_qwg@mail.gmail.com> (raw)
In-Reply-To: <1553059940-127038-1-git-send-email-fei.yang@intel.com>

On Tue, Mar 19, 2019 at 10:32 PM <fei.yang@intel.com> wrote:
>
> From: Fei Yang <fei.yang@intel.com>
>
> The following kernel panic happens due to the io_data buffer gets deallocated
> before the async io is completed. Add a check for the case where io_data buffer
> should be deallocated by ffs_user_copy_worker.

It looks like this happened because data got renamed to io_data, which made the
`data = NULL` marked with "Do not kfree the buffer in this function" not do
what it was hoping. This should probably either delete the assignment above or
fix the assignment to refer to io_data? (EIOCBQUEUED presumably can't come from
elsewhere?)

  reply	other threads:[~2019-03-20  5:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  5:32 [PATCH V2] usb: gadget: f_fs: don't free buffer prematurely fei.yang
2019-03-20  5:56 ` Josh Gao [this message]
2019-03-20  5:59   ` Josh Gao
2019-03-20 17:30     ` Yang, Fei
2019-03-20 16:40 ` John Stultz
2019-03-20 16:52   ` Alan Stern
2019-03-20 16:55     ` John Stultz
2019-03-20 18:21   ` John Stultz
2019-04-02  3:26     ` John Stultz
2019-04-24 16:50       ` Greg KH
2019-04-25  3:53         ` John Stultz
2019-04-25 16:01           ` Yang, Fei
2019-04-25 16:19             ` John Stultz
2019-03-20 23:28   ` Yang, Fei
2019-03-20 23:42     ` John Stultz
2019-04-02  3:25 ` John Stultz

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=CAAHfpN_2rUu+kCCgOV+RdqCU5+XRe_c3KkJk6FNv50FG+5_qwg@mail.gmail.com \
    --to=jmgao@google.com \
    --cc=andrzej.p@collabora.com \
    --cc=balbi@kernel.org \
    --cc=fei.yang@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jingx.shen@intel.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=plr.vincent@gmail.com \
    --cc=zhangjerry@google.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).