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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211214170352.GA7969@blackbody.suse.cz>
Date:   Tue, 14 Dec 2021 18:03:52 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     torvalds@...uxfoundation.org, ebiederm@...ssion.com,
        axboe@...nel.dk, keescook@...omium.org, oleg@...hat.com,
        peterz@...radead.org, tglx@...utronix.de, jnewsome@...project.org,
        legion@...nel.org, luto@...capital.net, jannh@...gle.com,
        linux-kernel@...r.kernel.org, security@...nel.org,
        kernel-team@...com, Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 2/6] cgroup: Allocate cgroup_file_ctx for
 kernfs_open_file->priv

On Mon, Dec 13, 2021 at 09:18:29AM -1000, Tejun Heo <tj@...nel.org> wrote:
>  static int cgroup_file_open(struct kernfs_open_file *of)

IIUC, this is common to v1 files too, i.e. cgroup_pidlist_start too.

>  static void cgroup_file_release(struct kernfs_open_file *of)
>  {
>  	struct cftype *cft = of_cft(of);
> +	struct cgroup_file_ctx *ctx = of->priv;
>  
>  	if (cft->release)
>  		cft->release(of);
> +	kfree(ctx);

Here it could free a pointer to pidlist that has different lifecycle.

Perhaps add one more slot into cgroup_file_ctx for the pidlist pointer?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ