From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Max Kellermann <max@duempel.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] drivers/media/rc: postpone kfree(rc_dev)
Date: Mon, 21 Mar 2016 09:24:57 -0300 [thread overview]
Message-ID: <20160321092457.39435fb8@recife.lan> (raw)
In-Reply-To: <145855998541.9135.18170484612406448203.stgit@woodpecker.blarg.de>
Hi Max,
Em Mon, 21 Mar 2016 12:33:05 +0100
Max Kellermann <max@duempel.org> escreveu:
> CONFIG_DEBUG_KOBJECT_RELEASE found this bug.
Please, always send us your Signed-off-by on your patches, as described at:
https://linuxtv.org/wiki/index.php/Development:_Submitting_Patches#Developer.27s_Certificate_of_Origin_1.1
> ---
> drivers/media/rc/rc-main.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 1042fa3..cb3e8db 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1248,6 +1248,9 @@ unlock:
>
> static void rc_dev_release(struct device *device)
> {
> + struct rc_dev *dev = to_rc_dev(device);
> +
> + kfree(dev);
> }
>
> #define ADD_HOTPLUG_VAR(fmt, val...) \
> @@ -1369,7 +1372,9 @@ void rc_free_device(struct rc_dev *dev)
>
> put_device(&dev->dev);
>
> - kfree(dev);
> + /* kfree(dev) will be called by the callback function
> + rc_dev_release() */
> +
> module_put(THIS_MODULE);
> }
> EXPORT_SYMBOL_GPL(rc_free_device);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks,
Mauro
next prev parent reply other threads:[~2016-03-21 12:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 11:33 [PATCH] drivers/media/rc: postpone kfree(rc_dev) Max Kellermann
2016-03-21 12:24 ` Mauro Carvalho Chehab [this message]
2016-03-21 12:26 ` Max Kellermann
-- strict thread matches above, loose matches on Subject: below --
2016-03-21 12:26 Max Kellermann
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=20160321092457.39435fb8@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=max@duempel.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