forked from mirrors/linux
		
	dm mpath: fix lock order inconsistency in multipath_ioctl
Commit 3e9f1be1b4 ("dm mpath: remove process_queued_ios()") did not
consistently take the multipath device's spinlock (m->lock) before
calling dm_table_run_md_queue_async() -- which takes the q->queue_lock.
Found with code inspection using hint from reported lockdep warning.
Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									85ad643b7e
								
							
						
					
					
						commit
						4cdd2ad780
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1566,8 +1566,8 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (m->pg_init_required)
 | 
							if (m->pg_init_required)
 | 
				
			||||||
			__pg_init_all_paths(m);
 | 
								__pg_init_all_paths(m);
 | 
				
			||||||
		spin_unlock_irqrestore(&m->lock, flags);
 | 
					 | 
				
			||||||
		dm_table_run_md_queue_async(m->ti->table);
 | 
							dm_table_run_md_queue_async(m->ti->table);
 | 
				
			||||||
 | 
							spin_unlock_irqrestore(&m->lock, flags);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
 | 
						return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue