Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Hannes Reinecke <hare@suse.de>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <James.Bottomley@suse.de>,
	Joe Eykholt <jeykholt@cisco.com>,
	Robert Love <robert.w.love@intel.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] scsi: libfc: fix directory server rport memory leak
Date: Thu, 24 Sep 2026 16:16:15 +0200	[thread overview]
Message-ID: <2026092455-country-unreached-47eb@gregkh> (raw)
In-Reply-To: <20260924133429.1587511-1-lgs201920130244@gmail.com>

On Thu, Sep 24, 2026 at 09:34:29PM +0800, Guangshuo Li wrote:
> fc_rport_create() does not add FC_FID_DIR_SERV rports to
> lport->disc.rports. If fc_frame_alloc() fails in
> fc_rport_recv_plogi_req() after creating a directory server rport, its
> initial reference is not released through the normal rport teardown
> path.
> 
> Normal rports are added to lport->disc.rports and removed from the list
> before their initial reference is dropped. The directory server rport
> bypasses both operations.
> 
> Add directory server rports to lport->disc.rports and use the existing
> list removal path when they are deleted. Keep the existing directory
> server callback and retry behavior unchanged.
> 
> The issue was identified by a static analysis tool I developed and
> confirmed by manual review.

Great, please document that as is asked for in the kernel documentation
in the changelog here please.

thanks,

greg k-h

      reply	other threads:[~2026-09-24 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 13:34 [PATCH v2] scsi: libfc: fix directory server rport memory leak Guangshuo Li
2026-09-24 14:16 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026092455-country-unreached-47eb@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=James.Bottomley@suse.de \
    --cc=hare@suse.de \
    --cc=jeykholt@cisco.com \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=robert.w.love@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox