aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_out.c
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2011-09-10 17:20:21 +1000
committerNeilBrown <[email protected]>2011-09-10 17:20:21 +1000
commit94007751bb02797ba87bac7aacee2731ac2039a3 (patch)
treeac45ec9aef327e0a77f3ffd8c09eff9ef1609f95 /net/lapb/lapb_out.c
parent43220aa0f22cd3ce5b30246d50ccd696d119edea (diff)
Avoid dereferencing a 'request_queue' after last close.
On the last close of an 'md' device which as been stopped, the device is destroyed and in particular the request_queue is freed. The free is done in a separate thread so it might happen a short time later. __blkdev_put calls bdev_inode_switch_bdi *after* ->release has been called. Since commit f758eeabeb96f878c860e8f110f94ec8820822a9 bdev_inode_switch_bdi will dereference the 'old' bdi, which lives inside a request_queue, to get a spin lock. This causes the last close on an md device to sometime take a spin_lock which lives in freed memory - which results in an oops. So move the called to bdev_inode_switch_bdi before the call to ->release. Cc: Christoph Hellwig <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Wu Fengguang <[email protected]> Acked-by: Wu Fengguang <[email protected]> Cc: [email protected] Signed-off-by: NeilBrown <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions