summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-06-04 14:03:51 -0400
committerChris Mason <chris.mason@oracle.com>2012-06-14 21:29:16 -0400
commit606686eeac4550d2212bf3d621a810407ef5e9bf (patch)
tree50adade3a750137b68304dc280d7a75436417b12 /fs/btrfs/super.c
parent17ca04aff7e6171df684b7b65804df8830eb8c15 (diff)
downloadlinux-606686eeac4550d2212bf3d621a810407ef5e9bf.tar.gz
linux-606686eeac4550d2212bf3d621a810407ef5e9bf.tar.bz2
linux-606686eeac4550d2212bf3d621a810407ef5e9bf.zip
Btrfs: use rcu to protect device->name
Al pointed out that we can just toss out the old name on a device and add a new one arbitrarily, so anybody who uses device->name in printk could possibly use free'd memory. Instead of adding locking around all of this he suggested doing it with RCU, so I've introduced a struct rcu_string that does just that and have gone through and protected all accesses to device->name that aren't under the uuid_mutex with rcu_read_lock(). This protects us and I will use it for dealing with removing the device that we used to mount the file system in a later patch. Thanks, Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/super.c')
0 files changed, 0 insertions, 0 deletions