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
| ||
|
Date: Fri, 29 Dec 2017 16:22:50 +0000 From: Jonathan Cameron <jic23@...nel.org> To: Eugen Hristev <eugen.hristev@...rochip.com> Cc: <nicolas.ferre@...rochip.com>, <ludovic.desroches@...rochip.com>, <alexandre.belloni@...e-electrons.com>, <linux-iio@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>, <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <linux-input@...r.kernel.org>, <dmitry.torokhov@...il.com> Subject: Re: [PATCH 10/14] iio: adc: at91-sama5d2_adc: force trigger removal on module remove On Fri, 22 Dec 2017 17:07:17 +0200 Eugen Hristev <eugen.hristev@...rochip.com> wrote: > On module remove, if we do not call trigger remove, the trigger > stays in the subsystem, and on further module insert, we will have > multiple triggers, and the old one is not usable. > Have to call the remove function on module remove to solve this. > > Signed-off-by: Eugen Hristev <eugen.hristev@...rochip.com> This needs more explanation. I can't see why the managed removal isn't sufficient. On removal the dev should have gone away taking the trigger with it. If it isn't then it looks like a straight forward bug that needs fixing. Jonathan > --- > drivers/iio/adc/at91-sama5d2_adc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c > index 4eff835..7b9febc 100644 > --- a/drivers/iio/adc/at91-sama5d2_adc.c > +++ b/drivers/iio/adc/at91-sama5d2_adc.c > @@ -1180,6 +1180,9 @@ static int at91_adc_remove(struct platform_device *pdev) > struct iio_dev *indio_dev = platform_get_drvdata(pdev); > struct at91_adc_state *st = iio_priv(indio_dev); > > + if (st->selected_trig->hw_trig) > + devm_iio_trigger_unregister(&indio_dev->dev, st->trig); > + > iio_device_unregister(indio_dev); > > at91_adc_dma_disable(pdev);
Powered by blists - more mailing lists