Bug 10504
Summary: | losetup possible circular locking | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Zdenek Kabelac (zdenek.kabelac) |
Component: | Block Layer | Assignee: | Jens Axboe (axboe) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | alan, bunk, hidave.darkstar, jirislaby, knikanth |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.25 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | don't hold mutex while fput in loop_clr_fd |
Description
Zdenek Kabelac
2008-04-22 06:27:15 UTC
This only happened when the backing file is a block device file. But IMO it's safe. There's two "bd_mutex -> lo_ctl_mutex" conditions 1. open The lo_refcnt could be changed to a atomic_t, it's not necessary using lo_ctl_mutex. 2. release If LO_FLAGS_AUTOCLEAR is set the lo_release will call loop_clr_fd, how can we fix it? Created attachment 15904 [details]
don't hold mutex while fput in loop_clr_fd
Don't hold the lo_ctl_mutex while fput to silence lockdep.
Jens, what do you think about this?
Ping, we hit this bug even in nowadays kernel. Care to send the patch to the list? > ------- Comment #3 from jirislaby@gmail.com 2009-02-27 00:13 ------- > Ping, we hit this bug even in nowadays kernel. > > Care to send the patch to the list? > > Please see: http://lkml.org/lkml/2008/4/27/322 Al Viro said there's side effect, but I have no better fixes for this, maybe I need learn more about block/fs part. |