lkml.org 
[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 18/38] C/R: core stuff
From
Date
On Fri, 2009-05-29 at 10:01 +0400, Alexey Dobriyan wrote:
> if (ctx->dump_live)
> down_read(&uts_sem);
> strncpy(i->sysname, (const char *)uts_ns->name.sysname, 64);
> strncpy(i->nodename, (const char *)uts_ns->name.nodename, 64);
> strncpy(i->release, (const char *)uts_ns->name.release, 64);
> strncpy(i->version, (const char *)uts_ns->name.version, 64);
> strncpy(i->machine, (const char *)uts_ns->name.machine, 64);
> strncpy(i->domainname, (const char *)uts_ns->name.domainname, 64);
> if (ctx->dump_live)
> up_read(&uts_sem);

Doesn't this turn a minor bug (like a task getting accidentally
unfrozen) into a oopsable bug?

I mean, doing this without a lock is nice and all, but it adds code to
make it selectable. What's the purpose of avoiding the semaphore
anyway? Performance?

-- Dave



\
 
 \ /
  Last update: 2009-05-29 19:29    [W:0.070 / U:3.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site