From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
John Youn <John.Youn@synopsys.com>
Subject: Re: [PATCH] usb: dwc2: host: Fix dereference issue in DDMA completion flow.
Date: Tue, 9 Apr 2024 11:39:00 +0000 [thread overview]
Message-ID: <5a9376a4-d60d-1c27-4a41-5796000bd023@synopsys.com> (raw)
In-Reply-To: <2024040936-dosage-marrow-c1d6@gregkh>
Hi Greg,
On 4/9/24 14:10, Greg Kroah-Hartman wrote:
> On Tue, Apr 09, 2024 at 10:06:32AM +0000, Minas Harutyunyan wrote:
>> Fixed variable dereference issue in DDMA completion flow.
>
> What do you mean by this?
>
>>
>> Fixes: b258e4268850 ("usb: dwc2: host: Fix ISOC flow in DDMA mode")
>> CC: stable@vger.kernel.org
>> Signed-off-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
>
> Did someone report this problem?
>
> thanks,
>
> greg k-h
>
Yes, it's reported by Dan Carpenter:
email on 4/5/24, 14:09
subject: [bug report] usb: dwc2: host: Fix ISOC flow in DDMA mode
Body:
Hello Minas Harutyunyan,
This is a semi-automatic email about new static checker warnings.
Commit b258e4268850 ("usb: dwc2: host: Fix ISOC flow in DDMA mode")
from Mar 13, 2024, leads to the following Smatch complaint:
drivers/usb/dwc2/hcd_ddma.c:874 dwc2_cmpl_host_isoc_dma_desc()
warn: variable dereferenced before check 'qtd->urb' (see line 870)
drivers/usb/dwc2/hcd_ddma.c
869 u16 frame_desc_idx;
870 struct urb *usb_urb = qtd->urb->priv;
^^^^^^^^^^
The patch adds a dereference
871 u16 remain = 0;
872 int rc = 0;
873
874 if (!qtd->urb)
^^^^^^^^^
The existing check is too late now
875 return -EINVAL;
876
regards,
dan carpenter
next prev parent reply other threads:[~2024-04-09 11:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 10:06 [PATCH] usb: dwc2: host: Fix dereference issue in DDMA completion flow Minas Harutyunyan
2024-04-09 10:10 ` Greg Kroah-Hartman
2024-04-09 11:39 ` Minas Harutyunyan [this message]
2024-04-09 11:45 ` Greg Kroah-Hartman
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=5a9376a4-d60d-1c27-4a41-5796000bd023@synopsys.com \
--to=minas.harutyunyan@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.