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: <mqzlqupbzt4zlsphipac4qz75uzzhcbiuxez2bupmcatp32hkw@y4ltledez5y2>
Date: Fri, 18 Jul 2025 14:55:14 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Zijiang Huang <huangzjsmile@...il.com>
Cc: tj@...nel.org, hannes@...xchg.org, cgroups@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Zijiang Huang <kerayhuang@...cent.com>, 
	Hao Peng <flyingpeng@...cent.com>
Subject: Re: [PATCH 1/2] cgroup-v1: Fix missing mutex_unlock in error paths

On Fri, Jul 18, 2025 at 07:54:08PM +0800, Zijiang Huang <huangzjsmile@...il.com> wrote:
> In the function, after acquiring the mutex with mutex_lock, multiple return
> paths (such as returning ERR_PTR, NULL, or normal pointers)fail to call
> mutex_unlock to release the lock, which could lead to deadlock risks.

You've almost convinced me that you've found a case for the scoped
locks. However, this patch doesn't look correct -- the lock is released
in cgroup_pidlist_stop() + the comment in fs/kernfs/file.c:

 * As kernfs_seq_stop() is also called after kernfs_seq_start() or
 * kernfs_seq_next() failure,

Or have you found a path where the pairing is unmatched?

Thanks,
Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ