Bug 29792

Summary: BUG: fs/inode.c:1422 when deleting device-mapper devices
Product: IO/Storage Reporter: Phillip Susi (phill)
Component: Block LayerAssignee: Jens Axboe (axboe)
Status: CLOSED DUPLICATE    
Severity: normal CC: agk, akpm, florian, maciej.rutecki, rjw, snitzer
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.38-rc[56]+ Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 27352    

Description Phillip Susi 2011-02-24 02:37:03 UTC
I first ran into this while testing a new build of gparted under Ubuntu Natty daily.  I have since been able to replicate it under Maverick while running a kernel built from Linus's tree.  Sometimes it happens when removing a partition within gparted, sometimes it happens when I just run dmraid -an.  The call stack appears to be:

bdput
free_dev
__dm_destroy
dev_remove
ctl_ioctl
dm_ioctl

My guess is that something else is calling dput() once too many times and when you go to remove the device, it is freed early and triggers the BUG().

I'm starting to bisect now.
Comment 1 Phillip Susi 2011-02-24 03:11:24 UTC
This is definitely a regression since 2.6.37.
Comment 2 Alasdair G Kergon 2011-02-24 11:17:20 UTC
(As well as bisecting, please attach the oops.)
Comment 3 Mike Snitzer 2011-02-24 15:09:52 UTC
The following patch (to fix bug 29202) may fix this bug too:
https://lkml.org/lkml/2011/2/24/179
Comment 4 Phillip Susi 2011-02-24 18:33:49 UTC
Yep, that fixed it.
Comment 5 Alasdair G Kergon 2011-02-24 22:30:11 UTC

*** This bug has been marked as a duplicate of bug 29202 ***