lkml.org 
[lkml]   [2011]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] break out page allocation warning code
From
Date
On Wed, 2011-04-20 at 11:19 +0900, KOSAKI Motohiro wrote:
> > + memcpy(tmp_comm, tsk->comm_buf, TASK_COMM_LEN);
> > + tsk->comm = tmp;
> > /*
> > - * Threads may access current->comm without holding
> > - * the task lock, so write the string carefully.
> > - * Readers without a lock may see incomplete new
> > - * names but are safe from non-terminating string reads.
> > + * Make sure no one is still looking at tsk->comm_buf
> > */
> > - memset(tsk->comm, 0, TASK_COMM_LEN);
> > - wmb();
> > - strlcpy(tsk->comm, buf, sizeof(tsk->comm));
> > + synchronize_rcu();
>
> The doc says,
>
> /**
> * synchronize_rcu - wait until a grace period has elapsed.

Yeah, yeah... see "completely untested". :)

I'll see if dropping the locks or something else equally hackish can
help.

-- Dave



\
 
 \ /
  Last update: 2011-04-20 04:49    [W:0.076 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site