From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD35C2D0DB for ; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7A7C214AF for ; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RoRmfeGN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7A7C214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8ABF18619F; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rW8OWzb2dc-c; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 388D5859B1; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 223DAC0175; Tue, 28 Jan 2020 15:00:00 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0B7C6C0171 for ; Tue, 28 Jan 2020 14:59:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EE1898628E for ; Tue, 28 Jan 2020 14:59:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yQLl8HMDndR4 for ; Tue, 28 Jan 2020 14:59:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5F06784B89 for ; Tue, 28 Jan 2020 14:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580223597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BbkQzI2OT5qwL33e/dmyxTt6JaLNl9+AOWiQKWYEhPs=; b=RoRmfeGNvGXRdZ8D7N7lji5cvUi9vk7iQ3R59I5h0aJSGq7It6SaBz5gvOYAuEUW5sal1g y2WGookJ0s3+417iV8PKZIA+C6AgWxe7Jnec7bx9atad0s+2bud8fx8POozq5ALmy+sBUo OTnegliKv85nOWURj8KSBJ+ARWbdaDA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-385-fwA69Ao3McuaMqHdt6RuLQ-1; Tue, 28 Jan 2020 09:59:52 -0500 X-MC-Unique: fwA69Ao3McuaMqHdt6RuLQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47CEF189F760; Tue, 28 Jan 2020 14:59:50 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.70]) by smtp.corp.redhat.com (Postfix) with SMTP id 6C74A84BC4; Tue, 28 Jan 2020 14:59:48 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 28 Jan 2020 15:59:49 +0100 (CET) Date: Tue, 28 Jan 2020 15:59:46 +0100 From: Oleg Nesterov To: madhuparnabhowmik10@gmail.com Message-ID: <20200128145946.GE17943@redhat.com> References: <20200127175821.10833-1-madhuparnabhowmik10@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200127175821.10833-1-madhuparnabhowmik10@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Cc: paulmck@kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, joel@joelfernandes.org, christian.brauner@ubuntu.com, linux-kernel-mentees@lists.linuxfoundation.org, mingo@kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer() X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On 01/27, madhuparnabhowmik10@gmail.com wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1508,7 +1508,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk) > return 0; > } > sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL); > - rcu_assign_pointer(tsk->sighand, sig); > + RCU_INIT_POINTER(tsk->sighand, sig); Acked-by: Oleg Nesterov _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees