From: Dan Carpenter <error27@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>,
Luis Chamberlain <mcgrof@kernel.org>,
linux-kselftest@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Russ Weight <russell.h.weight@intel.com>,
Tianfei zhang <tianfei.zhang@intel.com>,
Shuah Khan <shuah@kernel.org>,
Colin Ian King <colin.i.king@gmail.com>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [BUG] [PATCH RFC v2] selftests/firmware: copious kernel memory leaks in test_fw_run_batch_request()
Date: Thu, 30 Mar 2023 19:04:06 +0300 [thread overview]
Message-ID: <f2d1f0e1-9f0c-418c-ac6b-16ffbfee562d@kili.mountain> (raw)
In-Reply-To: <878rfekz2l.wl-tiwai@suse.de>
On Thu, Mar 30, 2023 at 06:01:54PM +0200, Takashi Iwai wrote:
> On Thu, 30 Mar 2023 17:44:42 +0200,
> Dan Carpenter wrote:
> >
> > I admire your enthusiam. :) What about if we just did this? Does it
> > help with the leaks?
> >
> > regards,
> > dan carpenter
> >
> > diff --git a/lib/test_firmware.c b/lib/test_firmware.c
> > index 05ed84c2fc4c..626b836895f4 100644
> > --- a/lib/test_firmware.c
> > +++ b/lib/test_firmware.c
> > @@ -895,6 +895,9 @@ static ssize_t trigger_batched_requests_store(struct device *dev,
> >
> > mutex_lock(&test_fw_mutex);
> >
> > + if (test_fw_config->reqs)
> > + return -EBUSY;
> > +
>
> This leaves the mutex locked.
> It should be the following instead, I suppose?
>
> if (test_fw_config->reqs) {
> rc = -EBUSY;
> goto out_unlock;
> }
So embarrassing... Yes.
regards,
dan carpenter
next prev parent reply other threads:[~2023-03-30 16:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 9:23 [BUG] " Mirsad Todorovac
2023-03-28 10:04 ` Mirsad Todorovac
2023-03-28 13:23 ` Mirsad Todorovac
2023-03-28 10:06 ` Dan Carpenter
2023-03-28 10:33 ` Mirsad Todorovac
2023-03-30 12:14 ` [BUG] [PATCH RFC v1] " Mirsad Todorovac
2023-03-30 15:12 ` [BUG] [PATCH RFC v2] " Mirsad Todorovac
2023-03-30 15:44 ` Dan Carpenter
2023-03-30 16:01 ` Takashi Iwai
2023-03-30 16:04 ` Dan Carpenter [this message]
2023-03-30 18:42 ` Mirsad Goran Todorovac
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=f2d1f0e1-9f0c-418c-ac6b-16ffbfee562d@kili.mountain \
--to=error27@gmail.com \
--cc=colin.i.king@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mirsad.todorovac@alu.unizg.hr \
--cc=rdunlap@infradead.org \
--cc=russell.h.weight@intel.com \
--cc=shuah@kernel.org \
--cc=tianfei.zhang@intel.com \
--cc=tiwai@suse.de \
/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®