[lkml]   [2009]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 097/108] dm mpath: flush keventd queue in destructor
    2.6.30-stable review patch.  If anyone has any objections, please let us know.


    From: Mikulas Patocka <>

    commit 53b351f972a882ea8b6cdb19602535f1057c884a upstream.

    The commit fe9cf30eb8186ef267d1868dc9f12f2d0f40835a moves dm table event
    submission from kmultipath queue to kernel kevent queue to avoid a

    There is a possibility of race condition because kevent queue is not flushed
    in the multipath destructor. The scenario is:
    - some event happens and is queued to keventd
    - keventd thread is delayed due to scheuling latency or some other work
    - multipath device is destroyed
    - keventd now attempts to process work_struct that is residing in already
    released memory.

    The patch flushes the keventd queue in multipath constructor.
    I've already fixed similar bug in dm-raid1.

    Signed-off-by: Mikulas Patocka <>
    Signed-off-by: Alasdair G Kergon <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/md/dm-mpath.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/md/dm-mpath.c
    +++ b/drivers/md/dm-mpath.c
    @@ -847,6 +847,7 @@ static void multipath_dtr(struct dm_targ

    + flush_scheduled_work();

     \ /
      Last update: 2009-07-01 03:33    [W:0.024 / U:2.684 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site