]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: read entire device info under lock
authorDavid Sterba <dsterba@suse.cz>
Fri, 26 Apr 2013 15:20:23 +0000 (15:20 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:25 +0000 (15:55 -0400)
commite6132c01f4de61696096bf36124d3bd4d56bb69a
tree580c9b7f5562e314bf13a8cdb92b342bc17db75a
parentc6e800df8f5ae7047f4b9377f4cf4905b89fcd1e
btrfs: read entire device info under lock

There's a theoretical possibility of reading stale (or even more
theoretically, freed) data from DEV_INFO ioctl when the device would
disappear between an early mutex unlock and data being copied from the
device structure.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ioctl.c