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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YIJ+l4ScIua4RBKt@arch>
Date:   Fri, 23 Apr 2021 10:00:23 +0200
From:   Tomasz Duszynski <tomasz.duszynski@...akon.com>
To:     Alexandru Ardelean <ardeleanalex@...il.com>
CC:     Tomasz Duszynski <tomasz.duszynski@...akon.com>,
        linux-iio <linux-iio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH] iio: core: fix ioctl handlers removal

On Fri, Apr 23, 2021 at 10:17:42AM +0300, Alexandru Ardelean wrote:
> On Thu, Apr 22, 2021 at 11:26 PM Tomasz Duszynski
> <tomasz.duszynski@...akon.com> wrote:
> >
> > Currently ioctl handlers are removed twice. For the first time during
> > iio_device_unregister() then later on inside
> > iio_device_unregister_eventset() and iio_buffers_free_sysfs_and_mask().
> > Double free leads to kernel panic.
> >
> > Fix this by not touching ioctl handlers list directly but rather
> > letting code responsible for registration call the matching cleanup
> > routine itself.
> >
>
> This change is missing this tag:
>
> Fixes: 8dedcc3eee3ac ("iio: core: centralize ioctl() calls to the main chardev")
>
> With that tag added:
> Acked-by: Alexandru Ardelean <ardeleanalex@...il.com>
>
> Apologies for the breakage.

No worries. Will append you ack to v2 then.

> Also, I wasn't sure if Jonathan or anyone else wanted to do this change.
>
> Thanks for the patch
> Alex
>
> > Signed-off-by: Tomasz Duszynski <tomasz.duszynski@...akon.com>
> > ---
> >  drivers/iio/industrialio-core.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> > index d92c58a94fe4..98944cfc7331 100644
> > --- a/drivers/iio/industrialio-core.c
> > +++ b/drivers/iio/industrialio-core.c
> > @@ -1939,9 +1939,6 @@ void iio_device_unregister(struct iio_dev *indio_dev)
> >
> >         indio_dev->info = NULL;
> >
> > -       list_for_each_entry_safe(h, t, &iio_dev_opaque->ioctl_handlers, entry)
> > -               list_del(&h->entry);
> > -
> >         iio_device_wakeup_eventset(indio_dev);
> >         iio_buffer_wakeup_poll(indio_dev);
> >
> > --
> > 2.31.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ