[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160706153703.GN2671@ubuntu>
Date: Wed, 6 Jul 2016 08:37:03 -0700
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Peter Rosin <peda@...ntia.se>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Wolfram Sang <wsa@...-dreams.de>,
Jean Delvare <jdelvare@...e.com>, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
Johan Hovold <johan@...nel.org>, Alex Elder <elder@...aro.org>
Subject: Re: [PATCH 2/2] i2c-dev: Don't block the adapter from unregistering
On 06-07-16, 17:04, Peter Rosin wrote:
> Exactly, so the stored address had better be correct, and in
No.
> that case there is no need for the new adapter_nr in every
> client, you could just go with client->adapter->nr instead.
client->adapter may be a dangling pointer at this point if the adapter
is freed, so we can't use that blindly for sure.
> Which just shows that the whole thing is fishy and that the
> adapter has to remain alive. BTW, is there any guarantee that
> adapter numbers will not get reused?
We are allocating them from idr and that will reuse them once they get
freed.
--
viresh
Powered by blists - more mailing lists