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]
Date:   Thu, 25 Feb 2021 13:08:02 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Anton Yakovlev <anton.yakovlev@...nsynergy.com>
Cc:     <virtualization@...ts.linux-foundation.org>,
        <alsa-devel@...a-project.org>, <virtio-dev@...ts.oasis-open.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Jason Wang <jasowang@...hat.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 2/9] ALSA: virtio: add virtio sound driver

On Thu, 25 Feb 2021 12:51:36 +0100,
Anton Yakovlev wrote:
> 
> > Now I'm wondering whether it's safe to do that from this place.
> > Basically device_reprobe() unbinds the device that releases the full
> > resources once including the devm_* stuff.  And this work itself is in
> > a part of devm allocated resource, so it'll be released there.  That
> > said, we might hit use-after-free...  This needs to be verified.
> 
> It's safe. Suicide kernel workers are funny but possible things. Since
> the kernel itself (AFAIU) assumes such a situation and does not access
> the worker structure after the callback function call.

Indeed, process_one_work() in workqueue.c assures no access to the
work object after the callback.  Then this must be fine.  Good to
know!


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ