From: Dan Williams <dan.j.williams@intel.com>
To: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>,
<dan.j.williams@intel.com>
Cc: <vishal.l.verma@intel.com>, <dave.jiang@intel.com>,
<ira.weiny@intel.com>, <nvdimm@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, <yusongping@huawei.com>,
<artem.kuzin@huawei.com>, <kjain@linux.ibm.com>
Subject: RE: [PATCH] drivers: nvdimm: fix dereference after free
Date: Thu, 17 Aug 2023 08:51:00 -0700 [thread overview]
Message-ID: <64de41e4e5e7c_29e220294b2@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20230817114103.754977-1-konstantin.meskhidze@huawei.com>
[ add Kajol ]
Konstantin Meskhidze wrote:
> 'nd_pmu->pmu.attr_groups' is dereferenced in function
> 'nvdimm_pmu_free_hotplug_memory' call after it has been freed. Because in
> function 'nvdimm_pmu_free_hotplug_memory' memory pointed by the fields of
> 'nd_pmu->pmu.attr_groups' is deallocated it is necessary to call 'kfree'
> after 'nvdimm_pmu_free_hotplug_memory'.
Another one that would be fixed by static attribute groups.
I do think we should move forward with these fixes as is for ease of backport,
but long term this dynamically allocated attribute groups approach needs to be
jettisoned. ...unless I am missing a concrete reason it needs to remain dynamic?
prev parent reply other threads:[~2023-08-17 15:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 11:41 Konstantin Meskhidze
2023-08-17 14:31 ` Jeff Moyer
2023-08-17 15:45 ` Dave Jiang
2023-08-17 16:04 ` Dave Jiang
2023-08-17 15:51 ` Dan Williams [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=64de41e4e5e7c_29e220294b2@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=artem.kuzin@huawei.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=kjain@linux.ibm.com \
--cc=konstantin.meskhidze@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--cc=yusongping@huawei.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
all inboxes | Powered by JetHome®