Re: [PATCH] Btrfs: use rcu to protect device->name V3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 13, 2012 at 10:05:59AM -0400, Josef Bacik wrote:
> 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,
> 
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxx>
Reviewed-by: David Sterba <dsterba@xxxxxxx>

I'm not going to stall this patch further due to minor things, thanks
for addressing the comments, leaving the rest for later.

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux