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: <20120203214435.GC12616@redhat.com>
Date:	Fri, 3 Feb 2012 16:44:35 -0500
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	axboe@...nel.dk, ctalbott@...gle.com, rni@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH UPDATED 11/11] blkcg: unify blkg's for blkcg policies

On Fri, Feb 03, 2012 at 12:59:10PM -0800, Tejun Heo wrote:
> 
> > [..]
> > > @@ -776,43 +786,49 @@ blkiocg_reset_stats(struct cgroup *cgrou
> > >  #endif
> > >  
> > >  	blkcg = cgroup_to_blkio_cgroup(cgroup);
> > > +	spin_lock(&blkio_list_lock);
> > >  	spin_lock_irq(&blkcg->lock);
> > 
> > Isn't blkcg lock enough to protect against policy registration/deregistration.
> > A policy can not add/delete a group to cgroup list without blkcg list. 
> 
> But pol list can change regardless of that, no?

Ok, looks like now it is needed because blkcg lock will just gurantee that
blkg is around but blkg->pd[plid] can disappear if you are not holding
blkio_list lock (update_root_blkgs).

I am wondering if we should take blkcg->lock if blkg is on blkcg list and
is being modified in place. That way, once we are switching elevator,
we should be able to shoot down the policy data without taking blkio_list
lock.

Thanks
Vivek
--
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