[dm-devel] [PATCH v2] Re: dm: wait until kobject is destroyed

Mike Snitzer snitzer at redhat.com
Tue Jan 14 03:02:02 UTC 2014


On Mon, Jan 13 2014 at  7:37pm -0500,
Mikulas Patocka <mpatocka at redhat.com> wrote:
 
> Here I'm sending the updated patch. (it reverts the patch that is already 
> in git and applies the new patch). The patch is untested, because I don't 
> use that git branch, but the same code was tested on Linus' 3.13-rc7.
> 
> Mikulas
> 
> 
> 
> From: Mikulas Patocka <mpatocka at redhat.com>
> 
> dm-sysfs: fix a module unload race
> 
> The code that calls the completion must be placed in non-module file,
> otherwise there is a module unload race (if the process is preempted and
> module unloaded after the completion is triggered, but before the function
> returns).
> 
> To fix this race, this patch moves the completion code to dm-builtin.c
> that is always compiled directly to the kernel.
> 
> The patch introduces a new structure struct dm_kobject_holder, its purpose
> is to keep the completion and the kobject at one place, so that it can be
> accessed from non-module code without the need to export the layout of
> struct mapped_device to that code.

Thanks for this v2 patch and updated header, I'll get it queued up.




More information about the dm-devel mailing list