From patchwork Tue Dec 5 01:51:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 173644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3159618vqy; Mon, 4 Dec 2023 17:51:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGyTtzAD/AKonehyBpqT9CXNU/aeOpnPV+QyLwGIzvGRXQCtvkf+PxiW7L+Z0YaMNZG6NY X-Received: by 2002:a17:902:e804:b0:1d0:98bf:f9fa with SMTP id u4-20020a170902e80400b001d098bff9famr3396837plg.131.1701741113222; Mon, 04 Dec 2023 17:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701741113; cv=none; d=google.com; s=arc-20160816; b=uKhGVYs/YnKBUUGrzKUy82WNWRKTYnOXIuIgbhVK+uHYoXlEdMAr5VfGjxNsPf7pth ONSyz7NacympMf06quccX9jI5fBYvEGmJ6ggp0lfRoPhfhHwkSdgaynU6h0Aumlx4IPC V2G9gyPnoLzi/fdBVRSAXFxRb7kRchOw+qIYyhqAR8s255la0i7c9mUWFVATcG6rJu1D TPiEzVEWzDwe/1uvMlFVluoh2zWqIE21Zkw/gidO+rsTJtcSRqh+8LFmC05bX89MHJui +O6AiahNyKRNdIXbAzsu55QSonZHhgQcwxOCHNKevk4qiBLUdkQO2Dt+xhbyQkyaJZZK bP9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TH5CHH40hHx7VWqR0Y5Y3VIe6m9V7diWPNd58800uxs=; fh=RchPSK+hLXNYg6Htbi7kH/HIP6G5G2+RtmjphvJ/yNM=; b=iFaG0AKDIxIQnStAk+8gZu4AdXvoza5YlqJxILYPsZdL5k1xYj7tBB+0PQKF6Taqra GHJtkMbIRkEbKLZTN9rTPH68pmqgMA1TddpZp6G1OHAHX7+eSGq8NSpzl7jdpH/rYjWo J+efh1w70+v+Zyc8KMZWsBOfwGXmn48Ha7XH3neNo0gsmVNkOV8OlmB30yzCqHZwJQkA mS0RN/lIRP0ha4t9+qU1cxkLKXmho3BCYEtXjiTc/o/frfLaBPt+BDCS0XzzNMwcV9Dg risc2PkkBJcfd5OZoQX/eo0cskRGoC0IKWQ8DsIeeWujf+kQZDRYF17fHBgSCZFclJkL tiOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id jk14-20020a170903330e00b001d09b00de2asi2708428plb.587.2023.12.04.17.51.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 17:51:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2DEED802AFBD; Mon, 4 Dec 2023 17:51:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344028AbjLEBvk (ORCPT + 99 others); Mon, 4 Dec 2023 20:51:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343980AbjLEBvj (ORCPT ); Mon, 4 Dec 2023 20:51:39 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 03614F0; Mon, 4 Dec 2023 17:51:44 -0800 (PST) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 68526605812FF; Tue, 5 Dec 2023 09:51:42 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu 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 kunyu Subject: [PATCH] =?utf-8?q?fs=3A_exec=3A_Remove_unnecessary_=E2=80=98NULL?= =?utf-8?q?=E2=80=99_values_from_vma?= Date: Tue, 5 Dec 2023 09:51:39 +0800 Message-Id: <20231205015139.99501-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 17:51:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784404889427940093 X-GMAIL-MSGID: 1784404889427940093 vma is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index b01d2d40ace03..cae37330e7442 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -253,7 +253,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);