Message ID | 20231205014612.99243-1-kunyu@nfschina.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3157833vqy; Mon, 4 Dec 2023 17:46:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGe/72T8/+xZQVScWw0pfkDjJQJyltXt5sQhyk0MWvc9/BXYf9d5nECOBpJye5a1uaTEYMO X-Received: by 2002:a92:c683:0:b0:35d:4db2:4ed3 with SMTP id o3-20020a92c683000000b0035d4db24ed3mr6493769ilg.3.1701740812539; Mon, 04 Dec 2023 17:46:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701740812; cv=none; d=google.com; s=arc-20160816; b=ak+kZA3psWH5laaBGB32i3kglMKXzdoPUfDeJ/I5pq7x3bRyjzprYEsdz8ZaIGH8tu mjws9ShjlFaunV6vYOua5KKhHDDv0irSI9PJwhPzX2Ehr7aKD4H3zHxas9AFlePkRj7K TOlXjv0mwUOJzJrInqf/Vt6ctFkQURK2xv/AZee0X2lXbYOrfZwXWtL7h+sPWF/T3v+D wt1h3T8o5q7uhkdZLAql+l6QiaOMfi1N+YFyBY8tm9N0+dzvp8Pe+hfv4cypOy2jsXN5 d8C+dwWHLVWAODTiow9g8ugzJx7/uKKeqFt4X0hGjGNKM6VmV+fzxQYbtn29+BCzC7F0 7O+g== 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=74P2TB2TGNP9e2pgRIrxzrzCn+I4eejGbvRhoF8RUAc=; fh=RchPSK+hLXNYg6Htbi7kH/HIP6G5G2+RtmjphvJ/yNM=; b=WwL6b/tg9X432vg6rb4U4IE2/tLmBmuwBl5nnNM6gWFCNy9HL2EgGQTjDGm8vf8O9k SL+M455gB572fA901PuS4FXKOoWJVqaa5StNIO9YFeXBrKikuzO7GFO3LQnUGPexUz/u 6HuKa+A2iOHD5MwU5xfFrFvNEWNCQlBoLuoGvGUYiiB63bIfDwV4mRHhUt2Lt3xNTOsk 80nXr6a90qCCEAsFwx4VJG5xTenOLJluf9gUD3f6/bgA2mFqDUWaoL6jPKxKoVO+zCLb Az+4eg0I0e3PnqJyxMVsUEdb8HJ5+WwPt/oi3bO9OFNywKKG2tEV+OW23dufCV6K/1EN 939w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s15-20020a63dc0f000000b005c6643c12basi4183294pgg.435.2023.12.04.17.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 17:46:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 91D52804705C; Mon, 4 Dec 2023 17:46:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231582AbjLEBqh (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 20:46:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjLEBqf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 20:46:35 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 53728B4; Mon, 4 Dec 2023 17:46:41 -0800 (PST) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 702F7605727E4; Tue, 5 Dec 2023 09:46:15 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu <kunyu@nfschina.com> 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 <kunyu@nfschina.com> Subject: [PATCH] =?utf-8?q?fs=3A_exec=3A_Remove_unnecessary_=E2=80=98NULL?= =?utf-8?q?=E2=80=99_values_from_mm?= Date: Tue, 5 Dec 2023 09:46:12 +0800 Message-Id: <20231205014612.99243-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 17:46:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784404574029031414 X-GMAIL-MSGID: 1784404574029031414 |
Series |
fs: exec: Remove unnecessary ‘NULL’ values from mm
|
|
Commit Message
Li kunyu
Dec. 5, 2023, 1:46 a.m. UTC
mm is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
fs/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exec.c b/fs/exec.c index 6518e33ea813c..b01d2d40ace03 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -368,7 +368,7 @@ static bool valid_arg_len(struct linux_binprm *bprm, long len) static int bprm_mm_init(struct linux_binprm *bprm) { int err; - struct mm_struct *mm = NULL; + struct mm_struct *mm; bprm->mm = mm = mm_alloc(); err = -ENOMEM;