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: <20120124155309.GA12906@google.com>
Date:	Tue, 24 Jan 2012 07:53:09 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	axboe@...nel.dk, ctalbott@...gle.com, rni@...gle.com,
	linux-kernel@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>
Subject: Re: [PATCH 14/16] blkcg: don't allow or retain configuration of
 missing devices

On Tue, Jan 24, 2012 at 10:42:24AM -0500, Vivek Goyal wrote:
> On Mon, Jan 23, 2012 at 03:09:51PM -0800, Tejun Heo wrote:
> > +	disk = get_gendisk(dev, &part);
> > +
> > +	if ((!disk || part) && temp) {
> > +		ret = -ENODEV;
> > +		goto out;
> > +	}
> > +
> > +	rcu_read_lock();
> > +
> > +	if (disk && !part) {
> > +		spin_lock_irq(disk->queue->queue_lock);
> > +		blkg = blkg_lookup_create(blkcg, disk->queue, plid);
> > +		spin_unlock_irq(disk->queue->queue_lock);
> 
> If queue is in bypass mode, is group creation and linking allowed when
> somebody is trying to set per device rules. (/me is thinking if there are
> any potential races between elevator switch and rule setting in cgroup).

Yeap, there is.  Nice catch.  blkg_lookup_create() should be testing
blk_queue_bypass() instead of blk_queue_dead() and parse_and_set
should probably retry after a bit.  Will update.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ