From: Oliver Neukum <oneukum@suse.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org, sean@mess.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCHv2 2/4] igorplugusb: prevent use after free in probe error
Date: Thu, 12 May 2022 14:37:21 +0200 [thread overview]
Message-ID: <20220512123723.25815-2-oneukum@suse.com> (raw)
In-Reply-To: <20220512123723.25815-1-oneukum@suse.com>
The timer uses the URB. Free it only after the timer
has been stopped.
v2: Resending series due to omitting first patch
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/media/rc/igorplugusb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c
index b46362da8623..1afba95409ff 100644
--- a/drivers/media/rc/igorplugusb.c
+++ b/drivers/media/rc/igorplugusb.c
@@ -223,9 +223,9 @@ static int igorplugusb_probe(struct usb_interface *intf,
return 0;
fail:
- rc_free_device(ir->rc);
- usb_free_urb(ir->urb);
del_timer(&ir->timer);
+ usb_free_urb(ir->urb);
+ rc_free_device(ir->rc);
kfree(ir->buf_in);
return ret;
--
2.35.3
next prev parent reply other threads:[~2022-05-12 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 12:37 [PATCHv2 1/4] igorplugusb: respect DMA coherency Oliver Neukum
2022-05-12 12:37 ` Oliver Neukum [this message]
2022-05-12 12:37 ` [PATCHv2 3/4] igorplugusb: break cyclical race on disconnect Oliver Neukum
2022-05-12 12:37 ` [PATCHv2 4/4] igorplugusb: remove superfluous usb_unlink_urb() Oliver Neukum
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=20220512123723.25815-2-oneukum@suse.com \
--to=oneukum@suse.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sean@mess.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