Linux CXL
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Dan Williams <dan.j.williams@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dave Jiang <dave.jiang@intel.com>, <linux-cxl@vger.kernel.org>
Cc: <dan.j.williams@intel.com>, <ira.weiny@intel.com>,
	<vishal.l.verma@intel.com>, <alison.schofield@intel.com>,
	<Jonathan.Cameron@huawei.com>, <dave@stgolabs.net>
Subject: Re: [PATCH] cxl: Fix unregister_region() callback parameter assignment
Date: Thu, 14 Dec 2023 14:39:31 -0800	[thread overview]
Message-ID: <657b84231ad12_27db80294bc@iweiny-mobl.notmuch> (raw)
In-Reply-To: <657b813a745a6_17c9712941e@dwillia2-xfh.jf.intel.com.notmuch>

Dan Williams wrote:
> Ira Weiny wrote:
> > Dave Jiang wrote:
> > > In devm_cxl_add_region(), devm_add_action_or_reset() is called by passing
> > > in unregister_region() with data ptr of 'cxlr'. However, in
> > > unregister_region(), the passed in parameter is incorrectly assumed to be
> > > a 'struct device' rather than the 'cxlr' pointer. The code has been
> > > working because 'struct device' is the first member of 'struct
> > > cxl_region'. Issue found by inspection. Fix the assignment so that cxlr is
> > > pointing directly to the passed in parameter.
> > > 
> > > Fixes: 23a22cd1c98b ("cxl/region: Allocate HPA capacity to regions")
> > 
> > Technically I think the essence of the bug existed in 
> > 
> > Fixes: 779dd20cfb56 ("cxl/region: Add region creation support") 
> 
> Agree, that's the correct Fixes: line, but I am also debating dropping
> Fixes because unless the definition of 'struct cxl_region' is changed
> there is no problem in practice. So a Fixes line will generate
> unncessary backport thrash. I'll just change it to be mentioned as the
> originator of thinko.

Yea that makes a lot of sense.

Ira

      reply	other threads:[~2023-12-14 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 19:13 [PATCH] cxl: Fix unregister_region() callback parameter assignment Dave Jiang
2023-12-14 21:25 ` Ira Weiny
2023-12-14 22:27   ` Dan Williams
2023-12-14 22:39     ` Ira Weiny [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=657b84231ad12_27db80294bc@iweiny-mobl.notmuch \
    --to=ira.weiny@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /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