Re: [PATCH 18/38] C/R: core stuff

From: Dave Hansen
Date: Fri May 29 2009 - 13:26:43 EST

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at