From: Shuah Khan <shuah@kernel.org>
To: valentina.manea.m@gmail.com, shuah@kernel.org,
gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usbip: Fix vep_free_request() null pointer checks on input args
Date: Fri, 25 Jan 2019 09:05:42 -0700 [thread overview]
Message-ID: <20190125160542.6939-1-shuah@kernel.org> (raw)
Fix vep_free_request() to return when usb_ep and usb_request are null
instead of calling WARN_ON.
Signed-off-by: Shuah Khan <shuah@kernel.org>
---
drivers/usb/usbip/vudc_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
index 1634d8698e15..a72c17ff1c6a 100644
--- a/drivers/usb/usbip/vudc_dev.c
+++ b/drivers/usb/usbip/vudc_dev.c
@@ -297,7 +297,8 @@ static void vep_free_request(struct usb_ep *_ep, struct usb_request *_req)
{
struct vrequest *req;
- if (WARN_ON(!_ep || !_req))
+ /* ep is always valid here - see usb_ep_free_request() */
+ if (!_req)
return;
req = to_vrequest(_req);
--
2.17.1
next reply other threads:[~2019-01-25 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 16:05 Shuah Khan [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-18 21:29 [PATCH] usbip: Fix vep_free_request() null pointer checks on input args Shuah Khan
2019-01-19 8:17 ` Greg KH
2019-01-22 23:05 ` shuah
2019-01-25 8:02 ` Greg KH
2019-01-25 14:26 ` shuah
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=20190125160542.6939-1-shuah@kernel.org \
--to=shuah@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=valentina.manea.m@gmail.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).