From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: Remove debugfs entries in iio_device_unregister()
Date: Sat, 28 Sep 2013 12:01:33 +0100 [thread overview]
Message-ID: <5246B70D.9070708@kernel.org> (raw)
In-Reply-To: <1379776901-19429-2-git-send-email-lars@metafoo.de>
On 09/21/13 16:21, Lars-Peter Clausen wrote:
> Remove the the debugfs entries in iio_device_unregister(). Otherwise the debugfs
> entries might still be accessible even though the device used in the debugfs
> callback has already been freed.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the fixes-togreg branch of iio.git
Thanks,
> ---
> drivers/iio/industrialio-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index d189f6c..b8a16d7 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -853,7 +853,6 @@ static void iio_dev_release(struct device *device)
> iio_device_unregister_trigger_consumer(indio_dev);
> iio_device_unregister_eventset(indio_dev);
> iio_device_unregister_sysfs(indio_dev);
> - iio_device_unregister_debugfs(indio_dev);
>
> if (indio_dev->buffer)
> iio_buffer_put(indio_dev->buffer);
> @@ -1091,6 +1090,7 @@ void iio_device_unregister(struct iio_dev *indio_dev)
>
> if (indio_dev->chrdev.dev)
> cdev_del(&indio_dev->chrdev);
> + iio_device_unregister_debugfs(indio_dev);
>
> iio_disable_all_buffers(indio_dev);
>
>
next prev parent reply other threads:[~2013-09-28 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 15:21 [PATCH 1/2] iio: Add reference counting for buffers Lars-Peter Clausen
2013-09-21 15:21 ` [PATCH 2/2] iio: Remove debugfs entries in iio_device_unregister() Lars-Peter Clausen
2013-09-28 11:01 ` Jonathan Cameron [this message]
2013-09-28 11:00 ` [PATCH 1/2] iio: Add reference counting for buffers Jonathan Cameron
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=5246B70D.9070708@kernel.org \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).