From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 1AD473FC9 for ; Mon, 5 Jan 2026 09:53:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767606827; cv=none; b=gypNsBk+wCFjc+iCddwcrSHkqBq3aXeA7yTBBAHzq9Yd8QA+s0JWSms/03fsf6ORi4Kf/pLrUdSq2eAdrJEG6V7Xd2uTY9tYe4DWBq8P+QfajoYpFr8sy6oU85mHizhzwHB8HPVURU2dMFpy86LDs+ECnfl2pZjk9CM0rD8P7j8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767606827; c=relaxed/simple; bh=JYCjSlwgfps6QXKtpDHggwUF1W61UlyY/X3NFqWnja4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VWBQ4Eu1swpnA9YiKPdXN/EjtADK36ekF1rea8PztUuWE7HHNTHhmN4McWb5beliTi6ynZ7xcU4oVBSBTQ45hdKQRhcjwPD/SpMd5h7mZSmOGznV70E3a7D4i82yfL+7HW5Pu0BVD5F3S1FKbgElydKGVHMRVpbU3Kt4AZFEQTY= 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=dZAcJ0Xi; arc=none smtp.client-ip=209.85.128.65 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dZAcJ0Xi" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-47775fb6c56so109963795e9.1 for ; Mon, 05 Jan 2026 01:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767606824; x=1768211624; 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=CpKgGSJ+75221h6VW5t4CNe4ZqtY9MVAIQyQca2c7b0=; b=dZAcJ0XijEWhAhHRBc+ptrpKijEbUiG8pQuLzZM0bzQI08MtcWbdx2Q9M0yOf+W/8G 0CnQ0bmCsQc1jUjoelEMvIYUzHFatEgZvhM5HqlYDaWNk6mg+E7k2wlPK0S+TL/SPNVf Tj7x/0kUqXbdl6WgO3n1px8Dg9PeJWdXb1f0PyqaF5ROhn1NJeQabB9f/eZnTi15ZHET Y4BP4VnEr/9j3jFZUNdnCFeg2mqs3ifRja8pY8ba3IQXlCLYjtW8oQcJflSuJgzmwMCw owR9N33hZI4f2FjFIsWtYmbw5nqkTrBq2g9KPsYc7G2KkqF1pka4wsmEhopXc0++eLBW T2dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767606824; x=1768211624; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CpKgGSJ+75221h6VW5t4CNe4ZqtY9MVAIQyQca2c7b0=; b=V6CABo3Awp2JvIjdtA10p77tlwzb9zgqGD9GwAkJkPW7p/sjPS2cCM3D8zeGTdW4Q2 JEydgNSs3kcJGejz0jKpHhyrq2wmCq2RaspeOieMKhXH8ydsBqzVWh7fqe68do3SIDw8 55DcoJWRxU8bjU7rPnEGX2EbBjxakJs2ewaCGQHjlesAYG8PNU5wi9Sws5XGm9HE57f5 4KhgD5I9frubgmbeSEqTQlHrEnloqktjch48RvfcfgAGxn3q7clGeoXd9iduhYXo1hzs Hs3SAbUZ5c9OXRHZjQE1I1K4P1Fzbi4pVwC82n/8/bTEfeVQHN/eKlx10nO/M9aU4hoo oF4Q== X-Forwarded-Encrypted: i=1; AJvYcCXtRvqTxEDoikE6bWc4LPviVKyKs4UfHShsj0Whkau+ubjzT+vFJ0dh4LSwgJqyrBsw++lKGMCyUq0i2ek=@vger.kernel.org X-Gm-Message-State: AOJu0Yxm9qmEUN9xtFLZ2o4Bdpu96+VlOAnwAtjCv6AO5AZoqk3iXMYp UiQwk1ODjw8rHAWusO0vagpQykfiwe+iXC6H8z9SLVn8ftgh2Snam/p60QKdUI6jsTM= X-Gm-Gg: AY/fxX4Vm42+gdyly+jN7KgrBjlFX3ZDsYRtTVP3zgHOYh2OaleX0gxf/9iM4yk8Oj0 xQzfA6YLm1Tkilg5QeqmvjJEWzUkvYKYeQHiO9oW+FkAR8eqKA280obzCeTC7+JrPYUsJ0wtok0 JjjmLVTRaYIVpwY54bInqlJNu6pVm9CNNe6kzGtAzq9gljOL/HpkFqgjkjkVYtvtt7zzo+97/UJ 2vww8NPRou1T6Z0bJl8/i1w+aLnAubaY0Z+zpDvMzHh3Q8Fg7sQXQpXMfQTGtYmgdtbDJ/ctkZx BiIe6/lPnS6CSnffUyRuz81QHS7b8dCv8LtswvyHBXyy7MpQ9pOkoZC1ODj3daf87ES+iBTSNPJ fXMAFid+xO0CHILW7j++Niw0s8aeoiu1cI69IA3MivC1PtXKa9bVsUWrbq0NDZ8vxScSV6t0vN/ mlXd0O5F4o8dC5qBF/ X-Google-Smtp-Source: AGHT+IHXrwODx43asw4XDeLwpdA69n/5YpE0Rwx18F/hMfT02cBwBEbmvIVlCR9Igb4Sdc+Zx1GaSw== X-Received: by 2002:a05:600c:3555:b0:47d:649b:5c48 with SMTP id 5b1f17b1804b1-47d649b5d5bmr189572735e9.36.1767606824441; Mon, 05 Jan 2026 01:53:44 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d6be5a555sm56806025e9.4.2026.01.05.01.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jan 2026 01:53:44 -0800 (PST) Date: Mon, 5 Jan 2026 12:53:40 +0300 From: Dan Carpenter To: Zilin Guan Cc: markus.elfring@web.de, James.Bottomley@hansenpartnership.com, jianhao.xu@seu.edu.cn, justin.tee@broadcom.com, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, paul.ely@broadcom.com Subject: Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post() Message-ID: References: <149a576a-6a21-48c6-b121-b20c6173f7cb@web.de> <20251230062008.1021449-1-zilin@seu.edu.cn> 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: <20251230062008.1021449-1-zilin@seu.edu.cn> On Tue, Dec 30, 2025 at 06:20:08AM +0000, Zilin Guan wrote: > On Mon, Dec 29, 2025 at 10:09:04AM +0100, Markus Elfring wrote: > > … > > > Fix this by adding mempool_free() in the error path. > > > > Please avoid duplicate source code here. > > https://elixir.bootlin.com/linux/v6.19-rc2/source/drivers/scsi/lpfc/lpfc_init.c#L563-L564 > > Thanks for pointing this out. I will use a goto label to unify the error > handling logic and avoid code duplication in v2. > > > See also: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc3#n262 > > > > Regards, > > Markus > > Regarding the stable kernel rules, do you consider this bug severe enough > to warrant a Cc: stable tag? Since this error path is unlikely to be > triggered during normal operation and the leak is small, I didn't think > it was critical enough to bother the stable maintainers. I don't agree with either of Markus's review comments. People have asked him to stop reviewing code or at least to stick to pointing out bugs or complaining about style and grammar issues but he doesn't listen. https://lore.kernel.org/all/2025121108-armless-earthling-7a6f@gregkh/ regards, dan carpenter