<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/btrfs/rcu-string.h, branch linux-4.4.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2012-06-15T01:29:16+00:00</updated>
<entry>
<title>Btrfs: use rcu to protect device-&gt;name</title>
<updated>2012-06-15T01:29:16+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2012-06-04T18:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=606686eeac4550d2212bf3d621a810407ef5e9bf'/>
<id>urn:sha1:606686eeac4550d2212bf3d621a810407ef5e9bf</id>
<content type='text'>
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-&gt;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-&gt;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 &lt;dsterba@suse.cz&gt;
Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
</content>
</entry>
</feed>
