Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1531813rdb; Mon, 19 Feb 2024 21:19:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQLi/EPdXFlzuGB9G+Gu5ez7r3ecQz7GB9inKSPPUIY33Fc15+P0f1ynVXzDHgPu2JxdNYxc/2v/rgwJKMBuGLcvGlyJXtpL66RqyDHg== X-Google-Smtp-Source: AGHT+IEEtNq9kqPnDTyV60CXH1+yjuHfYNx/sXExPWoNjc/UBuFuaZFtxJpnF/xuLshtdR5W9Upo X-Received: by 2002:a05:620a:29ca:b0:787:4002:feef with SMTP id s10-20020a05620a29ca00b007874002feefmr15655295qkp.54.1708406357705; Mon, 19 Feb 2024 21:19:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708406357; cv=pass; d=google.com; s=arc-20160816; b=Nqy38cicJ63sBTnaa0agzosVdJ0X1PKmN92z2LMottcdZm+EJ7qMS41+09zBq/UVYj KYuWyUV43CCPFwxCCszbZaooL/KvoyYfJGgEUxTUme6gljxUL4Ok786S65MGSL5Piw2m 2MnNUf1PWlDoeoUj1sssX561Df47LYvqse26F9tj4gjQ47gnGppR23QYhDYBtPmg88vw 3G7txBj3y84vID6YXGeMUZoFVqZKael4ZdRjr0N3e5bzYkdPmVV4KaRRyywc1nYW87hB x+Io9J1J65IiYHQ2lUPsiLwoTTLOT9hYpNsm5bjU6BJ6AHvQVtd/x17flxJ5SbpB5ZXA t79g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=PRvTW/Fxx7IuAl9WsFt4Rq5lAEduBniw16BQ7ekF7OM=; fh=v2fz/sRMjgxucNwET7tjkZ34H/eAm68AEQbRczZvf7Y=; b=N0Z6/bazgWR+b3IKaLuAhPQUv0ieKPGVs2hUh4GHLKO2I55CdrFneBTPPD/JdjrvnZ IAqqdGGr38bE7hreqqTUoPVohvVVjHrbObNZNlVneVAmMLk+lBNkO3VoA26lqKDtyCtu HkibHwQB6dR7xiy8QOYTo0PVYGywSzgmEsII4hiuVF+hTgsnv2K0avZ+l1rSxFwN6jZp 9WqhbMDpZppoL2AULrDExLgPun0x8xZvF6cIcrpCx/b+2NA8hxHtjO2ZHIp3yc9a3t8g JwVjbyhITNmom9GbTnV/GkvSQ+yuTbZsP5a/AKl4SaqOVz84x7AwPN0CUVX4g0ikKVoI TGRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-72341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72341-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y8-20020ae9f408000000b0078773b7760fsi1536444qkl.751.2024.02.19.21.19.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 21:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-72341-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72341-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 725B81C21893 for ; Tue, 20 Feb 2024 05:19:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11ABB56B96; Tue, 20 Feb 2024 05:19:08 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 0F060482D0; Tue, 20 Feb 2024 05:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708406347; cv=none; b=OmgTYeYRsM1e6Jj7khyqF3hR/mN95VwppG6RmY2FmIqDgcoXMLBZljEbpgkiGU9hurwrv6ipb4dD6BhdvXl3RtylKelmghrBo7v5CdEtvOTjpd2p3J5EFusGvUq/Q9OKWkpTZ6Cu1GzhVTn5zqpooAwL2hteph5t7O8tLEA3aU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708406347; c=relaxed/simple; bh=WW6nBO6M2oCGgiocdFG4e1PF8PO+zS+gCZmKFpHIpp8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=SyW6wyixAF3KZRDpUYrJPyus1bECDYjWhxnrHDBuFBT7h25zWYdUf4ie0TJGiNhH8Wyw9g2utMoiNxqKlcPkvpS2uz+8uHPtFDHdatKhCN65d6Hzj9ApHyjpAJ1ISMRLVk6gkUVQsVd6WF0DHlRHU3Cdy0w9tw/5fAwGah6p1Jw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id BD124602610CC; Tue, 20 Feb 2024 13:18:37 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: viro@zeniv.linux.org.uk, brauner@kernel.org, ebiederm@xmission.com, keescook@chromium.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?exec:=20Remove=20unnecessary=20=E2=80=98NULL?= =?UTF-8?q?=E2=80=99=20values=20from=20vma?= Date: Tue, 20 Feb 2024 13:18:30 +0800 Message-Id: <20240220051830.61099-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vma is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index af4fbb61cd53e..7be0527f5ff25 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -254,7 +254,7 @@ static void flush_arg_page(struct linux_binprm *bprm, unsigned long pos, static int __bprm_mm_init(struct linux_binprm *bprm) { int err; - struct vm_area_struct *vma = NULL; + struct vm_area_struct *vma; struct mm_struct *mm = bprm->mm; bprm->vma = vma = vm_area_alloc(mm); -- 2.18.2