Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2370072lqo; Mon, 20 May 2024 03:55:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUATdwIQY6iY1bDTh0SKEpO/kqcP1Wpc4n1pbyiUTHSB3XghPsHfulUlV1UlOkpk0V7L44YiTpa4Jw7hNA+5hKQMqSU/esFcS14eoS23A== X-Google-Smtp-Source: AGHT+IHtF7vitNR+h6A6zPfSBTEz3d4WaEQ713hJamvbFLUaYTh5b6+hAlB3XFO9LaFF+BNpMgO1 X-Received: by 2002:a05:6a00:b45:b0:6e6:5396:ce43 with SMTP id d2e1a72fcca58-6f4e029c29bmr34458519b3a.7.1716202549445; Mon, 20 May 2024 03:55:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716202549; cv=pass; d=google.com; s=arc-20160816; b=Fh/yDJe8zQi7JP5rhMSYh3WWSdCANLBAHmaf2cbDtkEYdNFA4a3vsKAEQ7xJv6K0eZ yKRL8LJQCfXYyYlrFTGpJa1O2PHYnv09nUZlfJpys09kipIKV2gFo55xJXpiPNDyFwyK E+x49u5zWfOZSLaTq15O5tMtmnBs1fOYKpjxw6VNt/7M5Bq9jbq/7/TeA28xgQTOJmdr O3moIuYCL8zApM4LVljPC/YihQRcZsbb6VBomIkDB3kXNVOFlga7B5foE9zYxVWS7l1z TT/vmQIGJJU18QJi2nPs1ICH9jd6n1ohPEP9kf9Ib9fuQ+bc/Jj7HByfyMvxjyezpWLO M4UQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:message-id:in-reply-to:subject:cc:to:date :from:dkim-signature; bh=oP+czblqI5kwwgCKLheCOokKRN1LxUPYqvlIkaiufZQ=; fh=sBM655tl30+jAHfkY6a91DnIzpyah87zWQCAyFt14C0=; b=ObiVv1HNfm1pWZ73PAuQjeyD3T+2lmlIhk6/OzTYpwFPo297g2jkykPn+rnWlT1Rhz h8REIKb7bla59C4JD6PfCTLYyLR+z/DPvhYpqdhtSgb7Fhu+zwtPZiP32sn33jthZAtY peuz44AwN9LvKDm9oooTxHoFitg4FdYdt1wW2/aD0yA4fK7JqC3G/IUxxLsmOTedFmhm xxrvJ0DGomSYnksKQ9hebFHqsBziShK6vV/LihCG/37AsejtuFHlxBHoG43Vk7Emc9oM BaAn30ZTddUY5x1SaoVwlXtiqUddRpOHKp5ff8BbDH2RkqT54+ilTRArOkWY/jS50o4X M69A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h2C1HHCx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-183548-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b42181si173504b3a.338.2024.05.20.03.55.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 03:55:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183548-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h2C1HHCx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-183548-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 9CD1928201B for ; Mon, 20 May 2024 09:39:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56BC2225A2; Mon, 20 May 2024 09:39:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h2C1HHCx" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BC13249E8; Mon, 20 May 2024 09:39:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716197943; cv=none; b=GMSa5AI6Rb1AgnxPhs1mZ3AgDMuzn4aRO7ZbKuUumiTfaXTyX+tWtFKe4+u/sqzNiRID8iS/WegkztBEzOfecIKqDZhvt/zB7hU58It+2qOov6kufgj0zcPWWi3iDXN/Giq6ai5TcQDhAPbc9s2Oud1+k3hnqSwTA8/w//6InZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716197943; c=relaxed/simple; bh=HnrE7YR5PqVfQJBFtQC0OlXuY+THNTwRfu9PcjEgXMA=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=A0kTBhsbDCe1rfKy40jSS+BQeHqTzDuMty3RtBBs1yclFNELJhy9p6uvaixD/smaWRPSPVi6exDNDOzSTD0AGWAW6u3A1G01qpCxF0r6SuRYV7DdS4JjMhHFSnzTUmZANvzSi55S3OeJSMioYV2E+Sf6kq81WuqBoAshromvlB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h2C1HHCx; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716197942; x=1747733942; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=HnrE7YR5PqVfQJBFtQC0OlXuY+THNTwRfu9PcjEgXMA=; b=h2C1HHCxaYwGHFrkI1DYGtN9Iu32MLH0qXCbxy5AjFohtWNwA0l+9H0p MygnO0YMapXQ2vKpxTa0LwRoV3KwZp/K2qSrbIdTq08CflurO+ULOLf4m LlM7Iu947xuQHY1qLy4vtmXqmPWLMMh9zNcJhMAOk6dZBu9DD2lgPlbfI vESuHuBE+OFA/Fzqa462bxIefS7u+bzMLO5ZwG74RbRPIEqfPPQApX4/k TCD/1M3iAkTrgtK5EgKZIw3LGIxlc8srGn3juOcZ9anFLAgtMHJATY4gg ST8QjQX+m4cvb4o/a9hvfauwoC7Oad93nx15jMmypxNAh35ZtqmIHtK+E Q==; X-CSE-ConnectionGUID: gJ1wBnz8SXerGMRkwEJ3Hw== X-CSE-MsgGUID: QYqpxxoERxW8R58FAT61WQ== X-IronPort-AV: E=McAfee;i="6600,9927,11077"; a="15260860" X-IronPort-AV: E=Sophos;i="6.08,174,1712646000"; d="scan'208";a="15260860" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 02:39:01 -0700 X-CSE-ConnectionGUID: FAPKg2nDSMSWRYVi5g54Ww== X-CSE-MsgGUID: Kmr3vay3RGyb+8t5T3ojIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,174,1712646000"; d="scan'208";a="33086025" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.113]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 02:38:58 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Mon, 20 May 2024 12:38:55 +0300 (EEST) To: Markus Elfring cc: Harshit Mogalapalli , platform-driver-x86@vger.kernel.org, kernel-janitors@vger.kernel.org, Hans de Goede , Srinivas Pandruvada , Zhang Rui , LKML , Dan Carpenter , Dan Carpenter Subject: Re: [PATCH v2] platform/x86: ISST: fix use-after-free in tpmi_sst_dev_remove() In-Reply-To: Message-ID: <6d1bf351-77cc-7fe9-2d62-8bd99789e4f1@linux.intel.com> References: <20240517144946.289615-1-harshit.m.mogalapalli@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323328-129071608-1716197769=:5522" Content-ID: <2d9bfb7c-a268-9795-b90f-6138f88f9a83@linux.intel.com> This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-129071608-1716197769=:5522 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <68320c4c-2329-261b-89c9-f624e9d11f16@linux.intel.com> On Sat, 18 May 2024, Markus Elfring wrote: > =E2=80=A6 > > Fix this by reordering the kfree() post the dereference. >=20 > Would a wording approach (like the following) be a bit nicer? >=20 > Move a kfree() call behind an assignment statement in the affected if = branch. No, the suggested wording would make it less precise ("post the=20 dereference" -> "behind an assignment") and also tries to tell pointless=20 things about the location in the codei that is visible in the patch itself. --=20 i. > > v1->v2: Add R.B from Hans and fix commit message wrapping to 75 chars. > > This is found by smatch and only compile tested. >=20 > * Can it occasionally be nicer to use an enumeration also for > version descriptions? >=20 > * Is it helpful to separate additional comments by blank lines? >=20 >=20 > > --- > > drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 +- >=20 > How do you think about to omit a repeated marker line here? >=20 > Regards, > Markus >=20 --8323328-129071608-1716197769=:5522--