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: <78362ecd-3f80-471f-8e08-e487f0792c11@huaweicloud.com>
Date: Thu, 15 Jan 2026 17:22:13 +0800
From: Zheng Qixing <zhengqixing@...weicloud.com>
To: yukuai@...as.com
Cc: cgroups@...r.kernel.org, linux-block@...r.kernel.org,
 linux-kernel@...r.kernel.org, mkoutny@...e.com, yi.zhang@...wei.com,
 yangerkun@...wei.com, houtao1@...wei.com, tj@...nel.org,
 josef@...icpanda.com, axboe@...nel.dk, hch@...radead.org,
 Zheng Qixing <zhengqixing@...wei.com>
Subject: Re: [PATCH v2 2/3] blk-cgroup: skip dying blkg in
 blkcg_activate_policy()

>> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
>> index 600f8c5843ea..5dbc107eec53 100644
>> --- a/block/blk-cgroup.c
>> +++ b/block/blk-cgroup.c
>> @@ -1622,9 +1622,10 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
>>    			 * GFP_NOWAIT failed.  Free the existing one and
>>    			 * prealloc for @blkg w/ GFP_KERNEL.
>>    			 */
>> +			if (!blkg_tryget(blkg))
>> +				continue;
> So, why this check is still before the pd_alloc_fn()?
You mean 'after'?
> See blkg_destroy(), can you replace this by the same checking:
>
> list_for_each_entry_reverse()
> 	if (hlist_unhashed(&blkg->blkcg_node))
> 		continue;
> 	if (blkg->pd[pol->plid])
> 		continue;

This change makes sense.

This issue can be resolved by either doing tryget(blkg) before
pd_alloc_fn() or by accessing blkg->blkcg_node.

To keep the behavior consistent with blkg_destroy() and blkg_destroy_all(), I will revise this in v3.

Thank,

Qixing


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ