diff options
| author | Chandra Seetharaman <sekharan@us.ibm.com> | 2008-11-13 18:39:00 -0500 |
|---|---|---|
| committer | Alasdair G Kergon <agk@redhat.com> | 2008-11-13 18:39:00 -0500 |
| commit | b81aa1c79201cb424114fd198607951900babe18 (patch) | |
| tree | f05501c670fd9919779b6759e2ff816f574186fe | |
| parent | 6edebdee48729ab4ba564bbfcb8dbf6a6cd68a39 (diff) | |
dm mpath: avoid attempting to activate null path
Path activation code is called even when the pgpath is NULL. This could
lead to a panic in activate_path(). Such a panic is seen in -rt kernel.
This problem has been there before the pg_init() was moved to a
workqueue.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| -rw-r--r-- | drivers/md/dm-mpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 4840733cd903..58b1015260fa 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
| @@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work) | |||
| 441 | __choose_pgpath(m); | 441 | __choose_pgpath(m); |
| 442 | 442 | ||
| 443 | pgpath = m->current_pgpath; | 443 | pgpath = m->current_pgpath; |
| 444 | m->pgpath_to_activate = m->current_pgpath; | ||
| 445 | 444 | ||
| 446 | if ((pgpath && !m->queue_io) || | 445 | if ((pgpath && !m->queue_io) || |
| 447 | (!pgpath && !m->queue_if_no_path)) | 446 | (!pgpath && !m->queue_if_no_path)) |
| 448 | must_queue = 0; | 447 | must_queue = 0; |
| 449 | 448 | ||
| 450 | if (m->pg_init_required && !m->pg_init_in_progress) { | 449 | if (m->pg_init_required && !m->pg_init_in_progress && pgpath) { |
| 450 | m->pgpath_to_activate = pgpath; | ||
| 451 | m->pg_init_count++; | 451 | m->pg_init_count++; |
| 452 | m->pg_init_required = 0; | 452 | m->pg_init_required = 0; |
| 453 | m->pg_init_in_progress = 1; | 453 | m->pg_init_in_progress = 1; |
