Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2108799lqp; Sun, 24 Mar 2024 03:43:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtnwSuahbJSYusLC1qnRjj5RxRwh5K3VTdz/tTrAV1/tdMyl1oiDcaG0ntCncxsw/HnzacntZpYxjDvLjPSIYrWkUgAXGqdtgDRCcZcg== X-Google-Smtp-Source: AGHT+IHfiGf2a3+zREMCexwcMXRV+rhMm0kewGSL16syB1F+U9DtdgL0wLEodYGjF2McYxrXKM04 X-Received: by 2002:a17:906:a94d:b0:a46:36ee:cfac with SMTP id hh13-20020a170906a94d00b00a4636eecfacmr2855446ejb.77.1711277011178; Sun, 24 Mar 2024 03:43:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711277011; cv=pass; d=google.com; s=arc-20160816; b=QROAow8twNsEn9+lwdTsXMexwJO/h3NfpGWryqy6N+5tAB9DNcpB6zAI0fdr0Kidy5 5YgjKAaKLF9xGrcUaIqr4fkt8PjkDbcCuIGMRY1/lvSpyVRCqjsMzyyipOb7jaRTG5SO DeUZI2A+v7PHIhsb854ceVUuC8P/EIXJ2FwF49IjRq/m8lNSNqmcltgum25ix05rFKw7 ZdeZkQ6oyxG8KbGH7PzmvNEsScHaAHcpCj2BiPi+eDHbGY0QU1Jsa9pxyMHMwTvGW5k5 wBe+/1dw2kuBMnQhDDeO73c2vBzVvwzuH+EyP97Pz/gcgh5cWNCb/YYWcFMYHoL97Q7T cr2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ribv/O+whBGnqTci5nPx7uHIdlxoMvUZURqWTthedJw=; fh=hcLS08wf4aKk6XwGi9cx755yuy/nKJaD0YA3RZtArp4=; b=irADZn1XKfgZ1dqSwhsJfRgBOfwAa733AS0xMCgB01FEfvUDtWBZ0Rz/TIaDab3wI2 H2y6J0IEn55tOOUQBKdTQ0DCHkV3QtL43rxMnd7BEZqMVQ6l/pS5/FHoyLVUOP1P0MtT TvBbCKyTWT/7shkfkIb+1J3V9iYTLe255KguPn4OpxkAoGQ3yEPy78tqOLl0LnojsFXi 4bTdwl+xURG/N4XywdjZCcFncS8XTNdfw46/ta9qkNmtnWvoD2deaUilzjFoMKf86WiQ +kVHx882AJOlfJVntWA14W9a/74NVSv2rfKol6sV/bc82QSp6zbmJGHSrLo6jZPvdFUW jeeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+sp3ErF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-112634-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qf17-20020a1709077f1100b00a4753369966si363777ejc.328.2024.03.24.03.43.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 03:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112634-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+sp3ErF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-112634-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D7AB11F21560 for ; Sun, 24 Mar 2024 10:43:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5ACFD175BD; Sun, 24 Mar 2024 10:43:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="t+sp3ErF" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAAC7168B9 for ; Sun, 24 Mar 2024 10:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711277000; cv=none; b=J6UJ1IUSHGDvtaPEDvy2RFW2jOoBBWThTwuXUMBr1701vvM6lK4HcZ/gangUVJ0D5vk71wnbufnJeCbX1rHrK4gLOxdoDn/niEtuZE/vwtJRQbVaRAaG7W57kpU6A7KETc2A4i6/yr3c4XYmaNelSd5LMZt7/U/Gx0kzWy2j/1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711277000; c=relaxed/simple; bh=9MObCN77I7tUZOnnNXSJUXOLNM1PpU+2YR/y22SVpzg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NFCybdAAOa1id8KBeifdYIf+I9lpXBUHJdimf1P7WqBJtO8xTacYrSq7NZ/QbRvVhZ0Hzr/nekKXo6BLFJKTjWPYydnpe6KVLsAsZKV3nyyz/bZGkNtZ1ax/brjRvKEYbYuIu0xZ+udleiddrbqbmIXshxkOFTu0qXawvRXw+NA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=t+sp3ErF; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-515a86daf09so510229e87.3 for ; Sun, 24 Mar 2024 03:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711276997; x=1711881797; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Ribv/O+whBGnqTci5nPx7uHIdlxoMvUZURqWTthedJw=; b=t+sp3ErFqzNFszzBMy6tw6WIgal1gAoHxTi8DSEIS89alD/K1V8uSxLiuHsPubEeH9 XCB/kWFkmqFsX0PpZpMwWpkSbHW8Glptt0tvlM29pHmaO8niMED1fDuwugxlACvqhdpc egPjhfQnuohak0iE9JCZv57zaLcCFGV32ehBUAtQw2d6ZVeGyw5FzT7zqcwGw4DtwT8j 4GIAsFpu4isbHJiqmT1J/aZOlp+g5x8mgI/5iT782IS8eVQqiljC1RwPAHXz7e0BwC0Y 6v3fhShEnn2QHb0FhXcXPtXsLIgfE6xlWDp6qsak+xjdBrDX6uh1YCq9NgonLIXgtjcg 1HnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711276997; x=1711881797; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ribv/O+whBGnqTci5nPx7uHIdlxoMvUZURqWTthedJw=; b=jjgdd9Vzvv6IlIGHNndWOMjC74zDTJnNMJelYQL9XzMQg/yoHPCdel3ZrRyE8Q0rya RzYED4r4jAxdBlNkV+KjoY/gpqSJgB0RwDe+M88uGHCpW4eC2/5nWB3F9y36KsUbU8L2 zYM1wGeIMEvQ5A/tY1gO1xGU5nUL49KhibQZO1IVfyyvxDosEOZyN5NaLXox8hgaxtZp EKBpVkF+PohXifCL80Avbkzl/lTJoDBEyaGwDcbpnl+8gOgbcjZYiiIYGOoMerNnu85x gqugKl0GORL7jbBfzTO5pKxbxaq59zNpMdpbom/iIGNVVZxUNzycm/zxRenQ11w0qN6O NT6Q== X-Forwarded-Encrypted: i=1; AJvYcCWAxyC4MU48aYcyl28WGKij7Re7iJNMK5ZjOehte2P42W/okrSZHQv0bsC4GTCzn+PG5c1DQ/5pGg1TvjFIpL7hjqJf+Sxo5QVDLBoa X-Gm-Message-State: AOJu0Yyv6Khpio0O3V6PG/ockbeewQxNZG/kHfYwzAVoRzIT2TH5QNIk FEHgnyVzd2keiRGezAUkg+2cPXK8vZiGHhwgcgQ8fRLlVLh7OGjNFtlUyGTQCN0= X-Received: by 2002:ac2:5b9a:0:b0:512:dfa1:6a1c with SMTP id o26-20020ac25b9a000000b00512dfa16a1cmr3000023lfn.10.1711276996932; Sun, 24 Mar 2024 03:43:16 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id f13-20020a056402004d00b005689bfe2688sm1816184edu.39.2024.03.24.03.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 03:43:16 -0700 (PDT) Date: Sun, 24 Mar 2024 13:43:12 +0300 From: Dan Carpenter To: Markus Elfring Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, smatch@vger.kernel.org, LKML , Alexander Lobakin , Andy Shevchenko , David Laight , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jesse Brandeburg , Jiri Pirko , Jonathan Cameron , Julia Lawall , Kees Cook , Lukasz Czapnik , Paolo Abeni , Pucha Himasekhar Reddy , Dan Williams , Maciej Fijalkowski , Przemek Kitszel , Tony Nguyen Subject: Re: [PATCH v2 net] ice: Fix freeing uninitialized pointers Message-ID: References: <0efe132b-b343-4438-bb00-5a4b82722ed3@moroto.mountain> <08c9f970-3007-461a-b9f9-9ab414024f68@web.de> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <08c9f970-3007-461a-b9f9-9ab414024f68@web.de> On Sat, Mar 23, 2024 at 05:56:29PM +0100, Markus Elfring wrote: > > Automatically cleaned up pointers need to be initialized before exiting > > their scope. In this case, they need to be initialized to NULL before > > any return statement. > > * May we expect that compilers should report that affected variables > were only declared here instead of appropriately defined > (despite of attempts for scope-based resource management)? > We disabled GCC's check for uninitialized variables a long time ago because it had too many false positives. > * Did you extend detection support in the source code analysis tool “Smatch” > for a questionable implementation detail? Yes. Smatch detects this as an uninitialized variable. regards, dan carpenter