Skip to content
Commit 1cba0cdf authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Chris Mason
Browse files

btrfs: Init io_lock after cloning btrfs device struct



__btrfs_close_devices() clones btrfs device structs with
memcpy(). Some of the fields in the clone are reinitialized, but it's
missing to init io_lock. In mainline this goes unnoticed, but on RT it
leaves the plist pointing to the original about to be freed lock
struct.

Initialize io_lock after cloning, so no references to the original
struct are left.

Reported-and-tested-by: default avatarMike Galbraith <efault@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent e942f883
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment