Re: [PATCH v3] drivers: core: Remove glue dirs early only when refcount is 1

From: Greg KH
Date: Fri May 24 2019 - 15:07:15 EST


On Wed, May 01, 2019 at 05:29:59PM +0530, Prateek Sood wrote:
> While loading firmware blobs parallely in different threads, it is possible
> to free sysfs node of glue_dirs in device_del() from a thread while another
> thread is trying to add subdir from device_add() in glue_dirs sysfs node.

<snip>

Is this the same fix that:
Subject: [PATCH v4] driver core: Fix use-after-free and double free on glue directory
is also trying to fix?

Why is it doing so in such a different way?

thanks,

greg k-h