Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1403295ybl; Wed, 29 Jan 2020 22:23:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwJga+aBb2WiIhf2gZEMvwOfiY+msEdcS4C+W8FrZHDtO1LJNqHfgZyz1hTfT3XhkrAgpep X-Received: by 2002:aca:72cd:: with SMTP id p196mr1769483oic.99.1580365392832; Wed, 29 Jan 2020 22:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580365392; cv=none; d=google.com; s=arc-20160816; b=Fh4IxCbQMbbZMXdnEopFNxaJvc/1ei81i9OmLHwlFddCg6nwQkLLmTZID0PBT+a5TH 7VBMHBY5K8zxgth8Kys0A9cnjxkKgy+MApeZH4pnS0tkLvWqPU0f22+LDaFFzaK6rBw1 d2lDMidSyniyZE8s0IjdDVXbzFmE1yfUCoW4EB+1GjpyCO2dpZSoeMoTP1hI9FGQtn0m 9ttcKFzZi9i10cQrxCSfHS5nQV1CsAwHmPudoNavprMkMUKpRaj/AyL2xpjOh7znbHj8 ApsZ8tLGuHtRkbaD27ki/UXjsl+n9aSZ8y5c0XCdTPFxfS4uthcl8JDZzQeh+c5cNM1P H8fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=zMHEc0flI99qBQqzj4e4DXxEH1EhacSSKhwIiUnp+1c=; b=akwV3ud71s8/eDsEpHB8AJ96NLMb5INAa9U+VMowNdJbq3SCF6gkMYIWhOOC1GQsyK YwcvvSWCAufC4mYUotdddk/VKoTvdtNVO4ZlxPGutbI44X8Z7McD/gvy8QE2mNlEo7N+ orrL4ac4wTs7T4qXOwCov1UPOMgHDMmnmAlwRilQqAcDBGmT9xWTIjrfd5m8E+HZrdGq vg26PRZ0lcZMRmDJsDKmn+wf9ChPnnlgiOVFF2tRXFmbBQs5Pbhz3paBQIPmS3gVLzRi RypphCNOF0uIOFUScg4Gbd6DyEdjONC6OlOEQZ9dMJolO+/bJvCcCdFEJgSOXEwuBp68 aOWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VhtpN2xs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si2459648otp.220.2020.01.29.22.22.59; Wed, 29 Jan 2020 22:23:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VhtpN2xs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbgA3GUu (ORCPT + 99 others); Thu, 30 Jan 2020 01:20:50 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45256 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbgA3GUu (ORCPT ); Thu, 30 Jan 2020 01:20:50 -0500 Received: by mail-pg1-f196.google.com with SMTP id b9so1083317pgk.12; Wed, 29 Jan 2020 22:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zMHEc0flI99qBQqzj4e4DXxEH1EhacSSKhwIiUnp+1c=; b=VhtpN2xsAoab5j+OLu9VSC+ZOwi4XRzPI0yYbHyjphZYtfbtU8Jxg+H/BRglroO/f0 a0ITfk+IK607kmTkp+dIw0/dnJGuYSOXJoeVIDiFio4O0pfs7BE+jXmlKXBI1OZfXFJp NATXjkr1AF363UXRaXv1RHERVT9x+3eqmJiDEENZcPVuQsauRJ9YYnt2cCoURmUMIi/D AEDIqhUw/JhYlweTSumgx4F/HI2qCKUrvHxxzO5Bh2LmM1rEV/qWR15jZ18BlKGFHNwB HxzQuYAeGMKauOLO1w9ci8mb56YK5s78dME+mxfSu8PDKgTzENuuVwSLx8Z5Ll5Hv4Ox l/Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zMHEc0flI99qBQqzj4e4DXxEH1EhacSSKhwIiUnp+1c=; b=M7jSCpvjcTT1gfbPbKIsXPXihvKar6SsxTjYm85Jzln6kEa40sKgyxUIld2+0LxxDi kg64DWX1GGMzlJ4Jyiaq+fusLJZUuOt9oFNpJmmwfsCEuI/fsLP+1fyeN1zE5Bb4APKh Wg8hh/Wg+w5SULIvPDyvzZfvzXdWvEcHxJfiXTfD5yJEiVoWNMme/8HV5IMJbSgfl92U rl1FtnKVfLY3nc2OE7MoWmDETiu0jv9s4/qHQAOypFgzdHrAI/Svs9I7KMRDDrLGEAWO IcXXeQFcwonKmmVjurnAjNS9SxCPsFtdKhKbsjh9L6+LFI/yEXHjwJuGam0OWuNYERwX 9xKQ== X-Gm-Message-State: APjAAAXUi2YpU+wAn9HdA/7jkdPnnt7dUKmvKYy0dDKI2v1Da7tvPsuq SBpfwuYjL3U6Lo4is9+V8A== X-Received: by 2002:a63:597:: with SMTP id 145mr2947677pgf.384.1580365249786; Wed, 29 Jan 2020 22:20:49 -0800 (PST) Received: from madhuparna-HP-Notebook.nitk.ac.in ([2402:3a80:1eed:fc71:d421:7a49:b2e4:2bd6]) by smtp.gmail.com with ESMTPSA id s124sm5041496pfc.57.2020.01.29.22.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 22:20:49 -0800 (PST) From: madhuparnabhowmik10@gmail.com To: peterz@infradead.org, mingo@kernel.org, oleg@redhat.com, christian.brauner@ubuntu.com, paulmck@kernel.org Cc: linux-kernel@vger.kernel.org, joel@joelfernandes.org, linux-kernel-mentees@lists.linuxfoundation.org, rcu@vger.kernel.org, Madhuparna Bhowmik Subject: [PATCH] exit.c: Fix Sparse errors and warnings Date: Thu, 30 Jan 2020 11:50:28 +0530 Message-Id: <20200130062028.4870-1-madhuparnabhowmik10@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madhuparna Bhowmik This patch fixes the following sparse error: kernel/exit.c:627:25: error: incompatible types in comparison expression And the following warning: kernel/exit.c:626:40: warning: incorrect type in assignment Signed-off-by: Madhuparna Bhowmik --- kernel/exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index bcbd59888e67..daf827a4aa25 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -623,8 +623,8 @@ static void forget_original_parent(struct task_struct *father, reaper = find_new_reaper(father, reaper); list_for_each_entry(p, &father->children, sibling) { for_each_thread(p, t) { - t->real_parent = reaper; - BUG_ON((!t->ptrace) != (t->parent == father)); + RCU_INIT_POINTER(t->real_parent, reaper); + BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father)); if (likely(!t->ptrace)) t->parent = t->real_parent; if (t->pdeath_signal) -- 2.17.1