All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: Simplify IIO provider access locking mechanism
Date: Fri, 09 Jan 2015 18:14:43 +0200	[thread overview]
Message-ID: <1420820083.28652.7.camel@mm-sol.com> (raw)
In-Reply-To: <54AFF9D3.7000007@metafoo.de>


On Fri, 2015-01-09 at 16:54 +0100, Lars-Peter Clausen wrote:
> On 01/09/2015 04:50 PM, Ivan T. Ivanov wrote:
> > On Fri, 2015-01-09 at 16:41 +0100, Lars-Peter Clausen wrote:
> > > On 01/09/2015 04:38 PM, Ivan T. Ivanov wrote:
> > > > Instead of checking whether provider module is still
> > > > loaded on every access to device just lock module to
> > > > memory when client get reference to provider device.
> > > > 
> > > 
> > > This has nothing to do with the module, it's about the device. In the Linux
> > > device driver model as device can be unbound at any time and the IIO
> > > framework needs to handle this.
> > > 
> > 
> > Hm. Probably i am missing something here, but is this
> > still true if we have reference to device structure?
> 
> Yes, that only prevents the memory of device from being freed. But the
> device can still be unbound from the driver.
> 
> Think of e.g. a USB device that is pulled from the USB connector. Nothing
> you can do in software about having the device disappear.
> 

Agree, but I think that the patch is still valid. Module
have to be pinned in memory as long as there are device
driver users. 

Regards,
Ivan 

  reply	other threads:[~2015-01-09 16:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 15:38 [PATCH] iio: Simplify IIO provider access locking mechanism Ivan T. Ivanov
2015-01-09 15:41 ` Lars-Peter Clausen
2015-01-09 15:50   ` Ivan T. Ivanov
2015-01-09 15:54     ` Lars-Peter Clausen
2015-01-09 16:14       ` Ivan T. Ivanov [this message]
2015-01-09 16:16         ` Lars-Peter Clausen
2015-01-12 13:54           ` Ivan T. Ivanov
2015-01-12 16:11             ` Lars-Peter Clausen

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=1420820083.28652.7.camel@mm-sol.com \
    --to=iivanov@mm-sol.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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.