[Letux-kernel] two accelerometers + iio_bridge considered harmful

H. Nikolaus Schaller hns at goldelico.com
Wed Aug 1 08:23:27 CEST 2018

> Am 31.07.2018 um 23:17 schrieb Andreas Kemnade <andreas at kemnade.info>:
> On Tue, 31 Jul 2018 21:12:29 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> [...]
>> Ok, it is unregistered twice...
>> Well, the code is simply not good for unregistering.
>> Proposal is attached. It should unregister only if anything is registered.
> Well, that fixes the oops, but not the case that one accelerometer is
> still registered.
> And re-registering of course does not work because you do not set
> idev to NULL and it is still happily accessed.

Yes, I already realized that we must do that in addition.

>> I don't know if it is really better - we might have to track
>> iio_input_unregister_accel_channel() and wipe out channel slots by
>> that. And have input_register_accel_channel() find an empty one.
>> And unregister the input device only when all slots are empty.
> well, there seems to be more work done. Well, I have unregistered iio
> devices a lot, but in general the problem is of less concern than the
> other races there.
> Regards,
> Andreas
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180801/38d8f5f2/attachment.asc>

More information about the Letux-kernel mailing list