From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.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 93E6A3101A8 for ; Mon, 5 Jan 2026 10:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767608282; cv=none; b=Jit6azPRnTUTEpI3Y9W8NybiGee8PwPSZ/Imo9gyBKj68P5DuVDOweOtrRz2Tq25Ykry42v0o5paaVPDq4Vp2/J2s7dwi3YhvYGUecshQPWz37xAp8MShuGb/ud/JC5j9ix+b9H8SxpxvypCjzJXMIEWg7spfjBpAw67urb2nYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767608282; c=relaxed/simple; bh=NyXaMzDErEA3jOKkS6g7KIPNUYJqH4kB5dkra/tYLyE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XErSia8GQbiUBnF5vfPyx1U/8uy7UeXQaRGuaSn8Sdl15mMGZBpWjUA0FLXzVwXp2A5cvxc48qSasiLEPgZXKGcVoXnQpQaXQEzoWglDah61WAi0b26ggX73p4A7BrgYFfNf3lYyzvtVNlpl4ABfcjtDdiT6pS0e1Fu4lLACIls= 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=r+nB8QZV; arc=none smtp.client-ip=209.85.221.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="r+nB8QZV" Received: by mail-wr1-f65.google.com with SMTP id ffacd0b85a97d-42e2d02a3c9so9379112f8f.3 for ; Mon, 05 Jan 2026 02:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767608279; x=1768213079; 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=VMXZd0k2gZxn0kgU5s3lzwvKxk2LyOp4km2h9OrJH7Q=; b=r+nB8QZVDn4QauAWQvOzwAr4PH/K8EOtelqRKDJGW3qwdVvMn5cxsXsmnrrqWKmAeS sFyFFGtPjxFeQKkBuorQKDsSW0V+FaaIYsh6Fs607zMtIFqDbVQMWBdM69iZ7/0N7OI4 pHl+DUKJ7uzEIjAqddBTYJNrY2RCZ/ZerZDjhwgfp0KO/2BmxqvpsNmnA4Q9dBM7aqnS fbwCouy3EaR32n3mUYG1zwgYbekKuz+Tg1hZwZLcTZRC2Pj1BqTyiBnPx+h7h+ARK4jz 0puzKQ0aXeiTlV3YQtpfAlFhGMZ5qBZiPzsWkfVozfRuPRQqjkkZ9bydiKFgDWRvZOWq +DrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767608279; x=1768213079; 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=VMXZd0k2gZxn0kgU5s3lzwvKxk2LyOp4km2h9OrJH7Q=; b=X6pRZWX39r+VUaIxHipmh6gWOgHXD/2ytzbMFCCXyprz4zC20nj97aizxAHiFJPuMy /O6D1a/5oAY7Xx1R77vb6fKim8LaDopnYLaYozu9EioHnQqWmzJvyu/d7KK5nI3X0Ye6 PLHrNtqPDf+timYOu9JqGBz07mKTPMG/zztYMig7GyqW+UC4Ibv+FvbP5MjVy+fkCNVV n0pga4sxRjeod4q6XV8MIL3DMp2wpINvLlHjRJVE0qwWnPqjkXM6TTLa+Q7lvHe8K69Q 0sAIJT27a3AnYmRz5zTzf7p9lJGcfOAN3bijC5Ig/jAxBO96qNuemjdFe5Yq/l+M8xKQ PEhg== X-Forwarded-Encrypted: i=1; AJvYcCXPpr+CedwUnI3DuYm9xcO//QF1Y2BYUtqGzudquDBJXy3YvU8NlQL4L/C9TYC82euY14KCbKezZDsVTsI=@vger.kernel.org X-Gm-Message-State: AOJu0YyrqK11t6bktN/Ad3hIVnL7truaraYjAZVZK1zdprDEVzeiR/uJ CtNThAh9iZKPtGdyUg9Pa6Pn2KLNCRaD4tq66u1Zg39Gmx9/QPjdlxkIxYOhbcgE/4A= X-Gm-Gg: AY/fxX6v3tMNNJS87aRdF83k3Jt9vCHYqFDd3a9NnCIW1ruV3JwiRGGhUDU/EEQZlOL MK3+8ZBZyItZDBsyuKHjlJ0QyCMwJTonGL4n8rPBbprlnlVZbGm6iA3g1RJaJEv/Y1IFFb5sGd5 G8X0IrCIq7/TghUqFRVR2dY0fjXl20TfjeuEqvHCFKa8mH+Sdju2RXKHUBMQM4aD03QthoeJqZz pipqldWY6ekinrmCgBGrSF16ZEFT7GrU/pzZMmtv5B+JsCG4zjOD5rimnWSeL65UX0F+CkmJyXN z1Uk8Ewou9Y7CtEuqsRe+w1KxEtXJRYeaIv58wACUI3MZlBI1MNtNhVsAXbPEFsz5+Dc/fCEkeu MXv0IXymKkRMPQZ7L50CWYOgloFHedWy0h/EST+XR0ZHeXYxaQMxW9fZl22Vn3wEvOnN3aL5szR 66M+5fBJXWAZv9I8nD X-Google-Smtp-Source: AGHT+IEkiG6mOIxmE+qAmWBQCXghDrypzkvELGSywwjbqNdPJFgJnMlRBOP7ilekWub2UAgbWww8Tw== X-Received: by 2002:a05:6000:2c01:b0:430:f62e:d95b with SMTP id ffacd0b85a97d-4324e4c9cd6mr71242039f8f.15.1767608278863; Mon, 05 Jan 2026 02:17:58 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4327791d2f3sm69077587f8f.11.2026.01.05.02.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jan 2026 02:17:57 -0800 (PST) Date: Mon, 5 Jan 2026 13:17:54 +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: On Mon, Jan 05, 2026 at 12:53:40PM +0300, Dan Carpenter wrote: > 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. I meant "or at least stop complaining about style and grammar issues". regards, dan carpenter