From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <greg@kroah.com>
Cc: andreyknvl@google.com, legousb-devel@lists.sourceforge.net,
linux-usb@vger.kernel.org, starblue@users.sourceforge.net,
syzkaller-bugs@googlegroups.com
Subject: [PATCH] USB: legotower: fix logical error in recent commit
Date: Tue, 8 Dec 2020 11:30:42 -0500 [thread overview]
Message-ID: <20201208163042.GD1298255@rowland.harvard.edu> (raw)
In-Reply-To: <000000000000f0fb0d05b5f65e64@google.com>
Commit d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()")
contained an elementary logical error. The check of the return code
from the new usb_control_msg_recv() function was inverted.
Reported-and-tested-by: syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
[as1950]
drivers/usb/misc/legousbtower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: usb-devel/drivers/usb/misc/legousbtower.c
===================================================================
--- usb-devel.orig/drivers/usb/misc/legousbtower.c
+++ usb-devel/drivers/usb/misc/legousbtower.c
@@ -797,7 +797,7 @@ static int tower_probe(struct usb_interf
&get_version_reply,
sizeof(get_version_reply),
1000, GFP_KERNEL);
- if (!result) {
+ if (result) {
dev_err(idev, "get version request failed: %d\n", result);
retval = result;
goto error;
prev parent reply other threads:[~2020-12-08 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 11:53 general protection fault in tower_disconnect syzbot
2020-12-08 16:04 ` Alan Stern
2020-12-08 16:04 ` syzbot
2020-12-08 16:04 ` syzbot
2020-12-08 16:07 ` Alan Stern
2020-12-08 16:24 ` syzbot
2020-12-08 16:30 ` Alan Stern [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=20201208163042.GD1298255@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=greg@kroah.com \
--cc=legousb-devel@lists.sourceforge.net \
--cc=linux-usb@vger.kernel.org \
--cc=starblue@users.sourceforge.net \
--cc=syzkaller-bugs@googlegroups.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).