From: Andrew Morton <akpm@osdl.org>
To: matthieu castet <castet.matthieu@free.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix leakes in request_firmware_nowait
Date: Fri, 11 Nov 2005 18:13:22 -0800 [thread overview]
Message-ID: <20051111181322.7fbb887a.akpm@osdl.org> (raw)
In-Reply-To: <4373C03F.1070301@free.fr>
matthieu castet <castet.matthieu@free.fr> wrote:
>
> @@ -511,18 +511,23 @@
> {
> struct firmware_work *fw_work = arg;
> const struct firmware *fw;
> + int ret;
> if (!arg) {
> WARN_ON(1);
> return 0;
> }
> daemonize("%s/%s", "firmware", fw_work->name);
> - _request_firmware(&fw, fw_work->name, fw_work->device,
> + ret = _request_firmware(&fw, fw_work->name, fw_work->device,
> fw_work->hotplug);
> - fw_work->cont(fw, fw_work->context);
> - release_firmware(fw);
> + if (ret < 0)
> + fw_work->cont(NULL, fw_work->context);
> + else {
> + fw_work->cont(fw, fw_work->context);
> + release_firmware(fw);
> + }
> module_put(fw_work->module);
> kfree(fw_work);
> - return 0;
> + return ret;
> }
What does the call to fw_work->cont(NULL, ...) do?
next prev parent reply other threads:[~2005-11-12 2:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-10 21:45 [PATCH] fix leakes in request_firmware_nowait matthieu castet
2005-11-10 21:48 ` matthieu castet
2005-11-12 2:13 ` Andrew Morton [this message]
2005-11-12 13:48 ` matthieu castet
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=20051111181322.7fbb887a.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.