The same workqueue is used both for sending uevents and processing queued I/O. Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting for the queued I/O to be processed. Use scheduled_work() for the asynchronous uevents instead. This is backport of fe9cf30eb8186ef267d1868dc9f12f2d0f40835a from 2.6.29-rc1. Additional flush_scheduled_work() was added to avoid accessing freed memory in case the device is destroyed before keventd dispatches the event (the same fix for upstream is pending). This may fix BZ 472790 as well. Awaiting test results. Signed-off-by: Mikulas Patocka <mpatocka> diff -u -r -p linux-2.6.18.x86_64.p31/drivers/md/dm-mpath.c linux-2.6.18.x86_64/drivers/md/dm-mpath.c --- linux-2.6.18.x86_64.p31/drivers/md/dm-mpath.c 2009-04-22 14:09:08.000000000 +0200 +++ linux-2.6.18.x86_64/drivers/md/dm-mpath.c 2009-05-08 14:33:58.000000000 +0200 @@ -856,6 +856,7 @@ static void multipath_dtr(struct dm_targ flush_workqueue(kmpath_handlerd); flush_workqueue(kmultipathd); + flush_scheduled_work(); free_multipath(m); } @@ -913,7 +914,7 @@ static int fail_path(struct pgpath *pgpa dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti, pgpath->path.dev->name, m->nr_valid_paths); - queue_work(kmultipathd, &m->trigger_event); + schedule_work(&m->trigger_event); out: spin_unlock_irqrestore(&m->lock, flags); @@ -955,7 +956,7 @@ static int reinstate_path(struct pgpath dm_path_uevent(DM_UEVENT_PATH_REINSTATED, m->ti, pgpath->path.dev->name, m->nr_valid_paths); - queue_work(kmultipathd, &m->trigger_event); + schedule_work(&m->trigger_event); out: spin_unlock_irqrestore(&m->lock, flags); @@ -999,7 +1000,7 @@ static void bypass_pg(struct multipath * spin_unlock_irqrestore(&m->lock, flags); - queue_work(kmultipathd, &m->trigger_event); + schedule_work(&m->trigger_event); } /* @@ -1029,7 +1030,7 @@ static int switch_pg_num(struct multipat } spin_unlock_irqrestore(&m->lock, flags); - queue_work(kmultipathd, &m->trigger_event); + schedule_work(&m->trigger_event); return 0; }
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in kernel-2.6.18-148.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified.
*** Bug 472790 has been marked as a duplicate of this bug. ***
~~ Attention - RHEL 5.4 Beta Released! ~~ RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner! If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity. Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value. Questions can be posted to this bug or your customer or partner representative.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1243.html
*** Bug 476941 has been marked as a duplicate of this bug. ***