From: Wolfram Sang <w.sang@pengutronix.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 12/24] media/video: fix dangling pointers
Date: Tue, 23 Mar 2010 01:35:25 +0100 [thread overview]
Message-ID: <20100323003525.GC5762@pengutronix.de> (raw)
In-Reply-To: <20100322213358.31e50b3c@hyperion.delvare>
[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]
> > > Personally I'd much rather just not bother setting the driver data in
> > > the removal path, it seems unneeded. I had assumed that the subsystem
> > > code cared for some reason when I saw the patch series.
> >
> > Anyway, should this really be necessary, then for the media drivers this
> > should be done in v4l2_device_unregister_subdev() and not in every driver.
> >
> > But this just feels like an i2c core thing to me. After remove() is called
> > the core should just set the client data to NULL. If there are drivers that
> > rely on the current behavior, then those drivers should be reviewed first as
> > to the reason why they need it.
>
> I tend to agree, now.
>
> Wolfram, how do you feel about this? I feel a little sorry that I more
> or less encouraged you to submit this patch series, and now I get to
> agree with the objections which were raised against it.
Well, this is a valuable outcome in my book. Maybe seeing the actual amount of
modifications necessary for cleaning up clientdata helped the process. While
working on it, I also got the impression that it should be handled differently
in the future, of course. Although I was thinking of something different
('i2c_(allocate|free)_clientdata' as mentioned before), I prefer the above
proposal as it is most simple.
> My key motivation was that I wanted i2c_set_clientdata() to be called
> before kfree(). Now that everybody seems to agree that the latter
> belongs to the drivers while the former belongs to lower layers
> (i2c-core or even driver core), this is not going to happen. So I guess
> we want to remove calls to i2c_set_clientdata(NULL) from all drivers
> and have only one in i2c-core for now?
Fine with me. Let me know if I can assist you with the series.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-03-23 0:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1269094385-16114-1-git-send-email-w.sang@pengutronix.de>
2010-03-20 14:12 ` [PATCH 10/24] media/radio: fix dangling pointers Wolfram Sang
2010-03-20 14:12 ` [PATCH 11/24] media/radio/si470x: " Wolfram Sang
2010-03-20 14:12 ` [PATCH 12/24] media/video: " Wolfram Sang
2010-03-20 22:02 ` Hans Verkuil
2010-03-21 11:31 ` Wolfram Sang
2010-03-21 13:46 ` Jean Delvare
2010-03-21 14:14 ` Mark Brown
2010-03-21 16:09 ` Hans Verkuil
2010-03-22 20:33 ` Jean Delvare
2010-03-22 21:51 ` Mark Brown
2010-03-23 0:35 ` Wolfram Sang [this message]
2010-03-30 12:39 ` Wolfram Sang
2010-04-01 8:32 ` Hans Verkuil
2010-03-22 20:36 ` Jean Delvare
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=20100323003525.GC5762@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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