lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20220303084235.356-1-sj@kernel.org> Date: Thu, 3 Mar 2022 08:42:35 +0000 From: SeongJae Park <sj@...nel.org> To: Xin Hao <xhao@...ux.alibaba.com> Cc: sj@...nel.org, akpm@...ux-foundation.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] mm/damon/sysfs: remove repeat container_of() in damon_sysfs_kdamond_release() Hi Xin, On Thu, 3 Mar 2022 15:53:14 +0800 Xin Hao <xhao@...ux.alibaba.com> wrote: > In damon_sysfs_kdamond_release(), we have use container_of() to get > "kdamond" pointer, so there no need to get it once again. Good catch! Thank you always :) > > Signed-off-by: Xin Hao <xhao@...ux.alibaba.com> Reviewed-by: SeongJae Park <sj@...nel.org> Thanks, SJ > --- > mm/damon/sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c > index a4ad6b473b0a..687e7c7e8dea 100644 > --- a/mm/damon/sysfs.c > +++ b/mm/damon/sysfs.c > @@ -2432,7 +2432,7 @@ static void damon_sysfs_kdamond_release(struct kobject *kobj) > > if (kdamond->damon_ctx) > damon_destroy_ctx(kdamond->damon_ctx); > - kfree(container_of(kobj, struct damon_sysfs_kdamond, kobj)); > + kfree(kdamond); > } > > static struct kobj_attribute damon_sysfs_kdamond_state_attr = > -- > 2.27.0
Powered by blists - more mailing lists