lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount
On Fri, Aug 30, 2013 at 02:03:59PM -0700, Linus Torvalds wrote:

> Yes, yes, you haev to be careful and cannot just blindly trust the
> length: you also have to check for NUL character as you are copying it
> and stop if you hit it. But that's trivial.

Point... Actually, I wonder if _that_ could be a solution for ->d_name.name
printk races as well. Remember that story? You objected against taking
spinlocks in printk, no matter how specialized and how narrow the area
over which those are taken, but rcu_read_lock/rcu_read_unlock should be
OK... Something like %pd expecting dentry pointer and producing dentry
name. Sure, we still get garbage if we race with d_move(), but at least
it's a contained garbage that way...


\
 
 \ /
  Last update: 2013-08-31 00:01    [W:0.231 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site