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

Dave Hansen dave at linux.vnet.ibm.com
Fri May 29 10:26:27 PDT 2009


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

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list