Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp362496rdb; Sun, 14 Jan 2024 22:25:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYR/1bvLum441MrqNSl5Ns0O2DeTb5WNlxa+V/unWcTasPhRjc52jQZH8ZyR35bEBLb7IR X-Received: by 2002:a17:903:40ca:b0:1d0:6ffd:6119 with SMTP id t10-20020a17090340ca00b001d06ffd6119mr6632700pld.59.1705299952265; Sun, 14 Jan 2024 22:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705299952; cv=none; d=google.com; s=arc-20160816; b=BtezZiOJ6G8SZO4MeOGobHbgGIYgXCh7r2fPQaHv0gMn9wHrswCHIVbP+4yFTeLbAU Xqwjp8wv3UQ2DrkzZN6BrmXGYX4XHrh/giZxvp1e90R+YENEjKEyiHJ3n063Y8SaSzhf cSwMQMj34NOrDlUlOiNeXxcigwQbE7w1z+00Nno6zXw1GTX656+wCH2CvFu/hP9C/FZc NVVhqK6caqKoMBRzoz9mORbFqYbw9vkaYOQnOkFYbfveoZPQBzzUhqcZrl/WH3ZxvJPV Q6dzpEtZYXn/ukB5DgtCcHS4gLsTINDNMQ00WDfP3lbwMgTuzV8amto70PfVoi6dXicC YgoQ== ARC-Message-Signature: i=1; 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=OnFRtUgbzl/uz9o4cO9kKlE+1P0hkrpJVpvZh0GW8Yo=; fh=xLdF9wIfJyjCaj3Qc5q9ZK3VBg26oZAGV3zJ9o5X7dA=; b=Wfwpl6i0aC+5vLdyaCFtcRxPd4e5wUNNgybVcpl7hgOVR7u6ziCxezNeWUDZFCtzrU 1MhoJUM/FJQwLvonM6r2RliFpWAtcRZRhhQ5D/ccgRRTyiiW/2B9aMRYqMjr0E88kQqG 8jKumDj8OaxUbsTgm5NcSGdrnr9GTkaXcAAltl2mB21uapn1x17cgamDeHXPtSh5oLz4 fz4nNwlBAMW1Obu2ZfjbFECRF6UN5tBABi4EgvZ6//yCx4Q/mULEV7wLLDSHlE22mSgN 7D9Hkfd/0oUPtksZU/43xDIaH0SJvJkK44CmzEAy/gE48tGKvR4ZF6XGtFq6Zz+NV/lH to4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25657-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s6-20020a170903320600b001d01ace7633si8045354plh.567.2024.01.14.22.25.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 22:25:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25657-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EC59D280CA5 for ; Mon, 15 Jan 2024 06:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCB285C98; Mon, 15 Jan 2024 06:25:38 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id E45ED5666 for ; Mon, 15 Jan 2024 06:25:29 +0000 (UTC) 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 450A36025325C; Mon, 15 Jan 2024 14:25:26 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: akpm@linux-foundation.org, rdunlap@infradead.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?user=5Fnamespace:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=98NULL=E2=80=99=20values=20from=20kbuf?= Date: Mon, 15 Jan 2024 14:25:19 +0800 Message-Id: <20240115062519.31298-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 kbuf is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/user_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 1d8e47bed3f11..6fabf388bb8a8 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -928,7 +928,7 @@ static ssize_t map_write(struct file *file, const char __user *buf, struct uid_gid_map new_map; unsigned idx; struct uid_gid_extent extent; - char *kbuf = NULL, *pos, *next_line; + char *kbuf, *pos, *next_line; ssize_t ret; /* Only allow < page size writes at the beginning of the file */ -- 2.18.2