From: Eli Billauer <eli.billauer@gmail.com>
To: Sabyrzhan Tasbolatov <snovitoll@gmail.com>,
arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
syzbot+e528c9aad0fb5383ec83@syzkaller.appspotmail.com
Subject: Re: [PATCH] drivers/xillybus: fix deadlock upon cleanup_dev
Date: Tue, 13 Aug 2024 09:15:23 +0300 [thread overview]
Message-ID: <e04eabb6-fa5f-9eb2-c2a6-812f6a310bc0@outbound.gmail.com> (raw)
In-Reply-To: <20240813040425.187418-1-snovitoll@gmail.com>
Hello,
I should have sent a response to this syzbot alert, indicating that
there is already ongoing work to fix this issue:
https://lore.kernel.org/lkml/20240801121126.60183-1-eli.billauer@gmail.com/
My apologies for not doing that.
On 13/08/2024 7:04, Sabyrzhan Tasbolatov wrote:
> syzbot found an issue [1] when cleanup_dev() is called twice,
> causing deadlock.
How is cleanup_dev() called twice? I only see it once in the stack trace.
It is called in xillyusb_probe()
> in the end of wakeup_all():
>
> INIT_WORK(&xdev->wakeup_workitem, wakeup_all);
INIT_WORK merely initializes the work item, it doesn't cause its execution.
> @@ -2174,7 +2175,6 @@ static int xillyusb_probe(struct usb_interface *interface,
>
> fail:
> usb_set_intfdata(interface, NULL);
> - kref_put(&xdev->kref, cleanup_dev);
> return rc;
> }
>
This edit causes a memory leak, because the reference count needs to be
decremented in other failure scenarios.
Thanks,
Eli
prev parent reply other threads:[~2024-08-13 6:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 4:04 Sabyrzhan Tasbolatov
2024-08-13 6:15 ` Eli Billauer [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=e04eabb6-fa5f-9eb2-c2a6-812f6a310bc0@outbound.gmail.com \
--to=eli.billauer@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=snovitoll@gmail.com \
--cc=syzbot+e528c9aad0fb5383ec83@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
all inboxes | Powered by JetHome®