Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4674223rdb; Fri, 29 Dec 2023 09:22:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2xDRXa+cqQbXOhakYiFx3ZyxgBcbbSaajLFpTsvvrHwlqG0wHMJ+INBQwmO4JWX5JhkZR X-Received: by 2002:a05:620a:b1c:b0:781:60e5:1d5e with SMTP id t28-20020a05620a0b1c00b0078160e51d5emr4729802qkg.99.1703870544923; Fri, 29 Dec 2023 09:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703870544; cv=none; d=google.com; s=arc-20160816; b=zqNYwsTK8Y5T4CismtK6B/4DI29wKBfaVHECB865HJT3eZ7sZWz2ya4zCug3f9yEg0 sDbUktzb7fZVzX5H67qL49P0ZcWlv9RSRe/8zxh5iTfUSTA4YZ6fHxxoZaMuCGQSrBU/ 2O3jbszs8IeLtndcuipTPRi90l6cEv87XOHo3w9pFs1M38815rjvAv9hdh829kecgK4A 0dT3qNQ7scKYTETtpQBhQnqxpbBUuEIPctVV3yVu3EWpyCa9ykGcHwx/zvOt7fQFn5nP NWc9oZ1o/VeeteZH5ricJvuszKDMcQXjyQIYGDMjVJQI3aU1SX1aUIzhUSKjdpVVn98p nkew== 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:user-agent:references:in-reply-to :date:cc:to:reply-to:from:subject:message-id:dkim-signature; bh=fwcdkaCUij5yMQvB9IpDdOOAZerCcpSDL4LNJpoz8vc=; fh=xnWyESOwckWe6xBqISpbw7I6uoDfPiIa8Ky9gaEICLA=; b=HoJvZGfYveNtNnZDvXc1JfvRVxkm/5dVPd3TaSd9F7oyqcV7fCorwXZvkBII7yXRxc O1+C2o6pXJDtplIX3KHUR6V3OU/oJG4IL5v53CHBPRii9i8PvShnUkeQRze+4cQfrtVj VcqlRgwoKe8ArBxmFGDxJyJD7glRpB231gQxgr7XgqCCGajApl07Yu7tLMZ28DNIgEeO qowPf4Ndx3s2DYnPpOJK9v/LvH5BHS+2HH2VrNWOKBJuuXbMEBcnT+L/RBlbvHyq1dzn vv5++0g7beKt2NMTXItWH8FDx8nrp/tP2zv+ejeeF6bNf3hXJL8iV3aKDN4+2Z/K0wnS W6Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JL459liT; spf=pass (google.com: domain of linux-kernel+bounces-13179-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u4-20020a05620a454400b00781477d51a1si12032446qkp.583.2023.12.29.09.22.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 09:22:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13179-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JL459liT; spf=pass (google.com: domain of linux-kernel+bounces-13179-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AC8C11C2184B for ; Fri, 29 Dec 2023 17:22:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12BE212B8B; Fri, 29 Dec 2023 17:22:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="JL459liT" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 3485F12E43; Fri, 29 Dec 2023 17:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BTHGLij012282; Fri, 29 Dec 2023 17:22:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : reply-to : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=fwcdkaCUij5yMQvB9IpDdOOAZerCcpSDL4LNJpoz8vc=; b=JL459liTqPfTX2+BsfTjJO6EhVNcplMwS4nAYAo5aWosnUY8KVUUEahd74dvZhEpGtX7 EGc4R7GHt7loHpCacTgznhpslV8bUryCHe90nRkAwMhdsluxvYG0iU3+S+U0aSXUmj2Q V/7cO3aWpsgjkGzdkoytWVqLmwk/g298pDhRsc4iWpwsgHAwjjv2aHi0+LDoF3kE3T1D 2izOwtD2usKjjO3JKpUv5ksLpuCZSd2rwSIIEGHqr44hY5mMr5Fha4PYDxGDNHmDgMTo uKbtWDlaA79lzVSqH9nJsffsX9EY6MJNzNUApbGFyYtUdn5ZELaN4P56IOlFAyplCos1 nA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v9xdy4tmt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Dec 2023 17:22:03 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BTHGQjq012612; Fri, 29 Dec 2023 17:22:02 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v9xdy4tmj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Dec 2023 17:22:02 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BTETeFN029970; Fri, 29 Dec 2023 17:22:01 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3v6avnxn2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Dec 2023 17:22:01 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BTHM0nk5767882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Dec 2023 17:22:01 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAFE358062; Fri, 29 Dec 2023 17:22:00 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8B4F58058; Fri, 29 Dec 2023 17:21:59 +0000 (GMT) Received: from [IPv6:2601:5c4:4302:c21::a774] (unknown [9.67.64.147]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 29 Dec 2023 17:21:59 +0000 (GMT) Message-ID: <9d24844f30604f969ac10da456801f594ce72f2d.camel@linux.ibm.com> Subject: Re: [PATCH] scsi: ses: Move a label in ses_enclosure_data_process() From: James Bottomley Reply-To: jejb@linux.ibm.com To: Markus Elfring , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, "Martin K. Petersen" Cc: LKML Date: Fri, 29 Dec 2023 12:21:58 -0500 In-Reply-To: <4616e325-e313-4078-9788-dd1e6e51b9e0@web.de> References: <4616e325-e313-4078-9788-dd1e6e51b9e0@web.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: qZE7s0ChTjg8c_yyLibzyuaPHFU-U6gz X-Proofpoint-GUID: j4x9ZtC_ak1gzxcY0GC3qeWNBneBWEmw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-29_07,2023-12-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 mlxlogscore=681 priorityscore=1501 bulkscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1011 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312290138 On Thu, 2023-12-28 at 15:48 +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 28 Dec 2023 15:38:09 +0100 > > The kfree() function was called in up to three cases by > the ses_enclosure_data_process() function during error handling > even if the passed variable contained a null pointer. > This issue was detected by using the Coccinelle software. Why is this an issue? The whole point of having kfree(NULL) be a nop is so we don't have to special case the free path. The reason we do that is because multiple special case paths through code leads to more complex control flows and more potential bugs. If coccinelle suddenly thinks this is a problem, it's coccinelle that needs fixing. James