lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <53D527BB.30309@kernel.org>
Date:	Sun, 27 Jul 2014 17:24:27 +0100
From:	Jonathan Cameron <jic23@...nel.org>
To:	Himangi Saraogi <himangi774@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
CC:	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: questions regarding drivers/staging/iio/accel/sca3000_core.c

On 21/07/14 09:24, Himangi Saraogi wrote:
> Hi,
>
> I was looking at the possibility of using a managed interface for
> iio_device_register in sca3000_probe. But this will lead to the
> iio_device_unregister function being called after
> sca3000_unconfigure_ring in the remove function. I have a few
> queries:
>
> 1. Is it safe to move the unregister function over the
> sca3000_unconfigure_ring?
No, in fact it should be before various other things
(though it isn't currently).  The device unregister
removes the userspace interfaces.  Hence it should always
be called before anything else happens in a remove function.
>
> 2. Is it correct that on failure the probe function does not call
> sca3000_unconfigure_ring?
Nope. That's a bug.  Actually the whole probe function ordering is
suspicious. The device register should probably be a lot later
(i.e. last). There might be some esoteric reason that isn't the case
but I honestly can't remember.  Whilst I have one of these parts
the wire bodge needs repairing and I haven't fired the board it plugs
into up for a good while.  If it wasn't such and interesting part I'd
be tempted to suggest dropping the driver entirely (and find out if
anyone else actually has one in the process!)
>
> 3. If it is fine moving unregister after sca3000_unconfigure_ring, I
> propose to add a devm counterpart of iio_buffer_unregister. Is it a
> good idea?
I'm not sure there enough users to bother and some of those should
probably use the triggered_buffer helper functions.
>
> Thanks, Himangi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ