public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@kernel.org>
To: Pawel Laszczak <pawell@cadence.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: cdnsp: Fixes issue with dequeuing not queued requests
Date: Sun, 16 Jul 2023 19:55:29 +0800	[thread overview]
Message-ID: <20230716115529.GA2529084@nchen-desktop> (raw)
In-Reply-To: <BYAPR07MB5381BA3F7A34D18BC16B86DFDD34A@BYAPR07MB5381.namprd07.prod.outlook.com>

On 23-07-14 07:19:21, Pawel Laszczak wrote:
> >
> >On 23-07-13 04:14:29, Pawel Laszczak wrote:
> >> Gadget ACM while unloading module try to dequeue not queued usb
> >> request which causes the kernel to crash.
> >> Patch adds extra condition to check whether usb request is processed
> >> by CDNSP driver.
> >>
> >
> >Why ACM does that?

Would you please explain which situation triggers it?

> >
> >> cc: <stable@vger.kernel.org>
> >> Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence
> >> USBSSP DRD Driver")
> >> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> >> ---
> >>  drivers/usb/cdns3/cdnsp-gadget.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/usb/cdns3/cdnsp-gadget.c
> >> b/drivers/usb/cdns3/cdnsp-gadget.c
> >> index fff9ec9c391f..3a30c2af0c00 100644
> >> --- a/drivers/usb/cdns3/cdnsp-gadget.c
> >> +++ b/drivers/usb/cdns3/cdnsp-gadget.c
> >> @@ -1125,6 +1125,9 @@ static int cdnsp_gadget_ep_dequeue(struct
> >usb_ep *ep,
> >>  	unsigned long flags;
> >>  	int ret;
> >>
> >> +	if (request->status != -EINPROGRESS)
> >> +		return 0;
> >> +
> >
> >Why not you use pending list which used at cdnsp_ep_enqueue to do this?
> 
> It's just simpler and faster way - no other reasons. 

Okay, get it.

-- 

Thanks,
Peter Chen

  reply	other threads:[~2023-07-16 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  8:14 [PATCH] usb: cdnsp: Fixes issue with dequeuing not queued requests Pawel Laszczak
2023-07-14  2:14 ` Peter Chen
2023-07-14  7:19   ` Pawel Laszczak
2023-07-16 11:55     ` Peter Chen [this message]
2023-08-17  9:10       ` Pawel Laszczak
2023-08-25  1:10 ` Peter Chen

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=20230716115529.GA2529084@nchen-desktop \
    --to=peter.chen@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=stable@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