Re: [Probably regression] Possible circular locking dependencyfrom ATA in current mainline

From: Tejun Heo
Date: Mon Dec 27 2010 - 07:04:13 EST


Hello, Rafael.

On Sun, Dec 26, 2010 at 11:16:26PM +0100, Rafael J. Wysocki wrote:
> [ 319.281892] =======================================================
> [ 319.281893] [ INFO: possible circular locking dependency detected ]
> [ 319.281894] 2.6.37-rc7+ #16
> [ 319.281895] -------------------------------------------------------
> [ 319.281896] kworker/1:0/13333 is trying to acquire lock:
> [ 319.281897] (&bdev->bd_mutex){+.+.+.}, at: [<ffffffff811271a6>] revalidate_disk+0x56/0x90
> [ 319.281902]
> [ 319.281903] but task is already holding lock:
> [ 319.281903] (&ap->scsi_scan_mutex){+.+...}, at: [<ffffffff81360420>] ata_scsi_dev_rescan+0x30/0x120

This dependency is true.

> [ 319.281910] -> #3 (&ap->scsi_scan_mutex){+.+...}:
> [ 319.281927] -> #2 ((&ap->scsi_rescan_task)){+.+...}:
> [ 319.281937] -> #1 (events){+.+.+.}:
> [ 319.281970] -> #0 (&bdev->bd_mutex){+.+.+.}:

But the above is bogus. It's only linked through the system_wq. The
current lockdep notation assumes single execution resource and
triggers spuriously in certain cases. I'll think about how to relax
it.

Thank you.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/