Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753421AbZI2SON (ORCPT ); Tue, 29 Sep 2009 14:14:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753304AbZI2SOM (ORCPT ); Tue, 29 Sep 2009 14:14:12 -0400 Received: from gate.lvk.cs.msu.su ([158.250.17.1]:44908 "EHLO lvk.cs.msu.su" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbZI2SOL (ORCPT ); Tue, 29 Sep 2009 14:14:11 -0400 From: "Nikita V. Youshchenko" To: Oren Laadan Subject: Re: [PATCH v18 49/80] c/r: support for UTS namespace Date: Tue, 29 Sep 2009 22:13:17 +0400 User-Agent: KMail/1.9.9 Cc: Andrew Morton , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, Serge Hallyn , Ingo Molnar , Pavel Emelyanov , Dan Smith , Oren Laadan References: <1253749920-18673-1-git-send-email-orenl@librato.com> <1253749920-18673-50-git-send-email-orenl@librato.com> In-Reply-To: <1253749920-18673-50-git-send-email-orenl@librato.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909292213.21266@blacky.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 26 > +static struct uts_namespace *do_restore_uts_ns(struct ckpt_ctx *ctx) > ... > +#ifdef CONFIG_UTS_NS > + uts_ns = create_uts_ns(); > + if (!uts_ns) { > + uts_ns = ERR_PTR(-ENOMEM); > + goto out; > + } > + down_read(&uts_sem); > + name = &uts_ns->name; > + memcpy(name->sysname, h->sysname, sizeof(name->sysname)); > + memcpy(name->nodename, h->nodename, sizeof(name->nodename)); > + memcpy(name->release, h->release, sizeof(name->release)); > + memcpy(name->version, h->version, sizeof(name->version)); > + memcpy(name->machine, h->machine, sizeof(name->machine)); > + memcpy(name->domainname, h->domainname, sizeof(name->domainname)); > + up_read(&uts_sem); Could you please explain what for is this down_read() / up_read() ? You operate only on local objects: 'name' points to just-created uts_ns, 'h' is also local data. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/