linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: syzbot+711468aa5c3a1eabf863@syzkaller.appspotmail.com
Cc: alexios.zavras@intel.com, linux-usb@vger.kernel.org
Subject: Re: WARNING in port100_send_cmd_async/usb_submit_urb
Date: Tue, 19 Nov 2019 15:24:05 +0100	[thread overview]
Message-ID: <1574173445.28617.15.camel@suse.com> (raw)

#syz test: https://github.com/google/kasan.git 7829a896

From 4d4036dd03e08c3169850d1c37fc6b73b9b4ba7c Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Tue, 19 Nov 2019 15:08:53 +0100
Subject: [PATCH] nfc: port100: handle command failure cleanly

If starting the transfer of a command suceeds but the transfer for the reply
fails, it is not enough to initiate killing the transfer for the
command may still be running. You need to wait for the killing to finish
before you can reuse URB and buffer.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/nfc/port100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c
index 145ddf3f0a45..604dba4f18af 100644
--- a/drivers/nfc/port100.c
+++ b/drivers/nfc/port100.c
@@ -783,7 +783,7 @@ static int port100_send_frame_async(struct port100 *dev, struct sk_buff *out,
 
 	rc = port100_submit_urb_for_ack(dev, GFP_KERNEL);
 	if (rc)
-		usb_unlink_urb(dev->out_urb);
+		usb_kill_urb(dev->out_urb);
 
 exit:
 	mutex_unlock(&dev->out_urb_lock);
-- 
2.16.4


             reply	other threads:[~2019-11-19 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 14:24 Oliver Neukum [this message]
2019-11-20 23:18 ` WARNING in port100_send_cmd_async/usb_submit_urb syzbot
  -- strict thread matches above, loose matches on Subject: below --
2019-07-10 11:07 syzbot

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=1574173445.28617.15.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=alexios.zavras@intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=syzbot+711468aa5c3a1eabf863@syzkaller.appspotmail.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).