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: <20120315170100.GF3253@redhat.com>
Date:	Thu, 15 Mar 2012 13:01:00 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Fengguang Wu <fengguang.wu@...el.com>,
	Jens Axboe <axboe@...nel.dk>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH block/for-3.4/core] cfq: fix cfqg ref handling when
 BLK_CGROUP && !CFQ_GROUP_IOSCHED

On Thu, Mar 15, 2012 at 09:50:57AM -0700, Tejun Heo wrote:

> > [..]
> > > @@ -3533,7 +3551,7 @@ static int cfq_init_queue(struct request
> > >  
> > >  	spin_lock_irq(q->queue_lock);
> > >  	cfq_link_cfqq_cfqg(&cfqd->oom_cfqq, cfqd->root_group);
> > > -	blkg_put(cfqg_to_blkg(cfqd->root_group));
> > > +	cfqg_put(cfqd->root_group);
> > 
> > This seems to be a spurious cfqg_put()? Which reference we are putting
> > down here?
> 
> The extra ref from cfq_link_cfqq_cfqg() for oom_cfqq; otherwise, we
> need an extra cfq_put() in cfq_exit_queue().  I thought I wrote
> comment about that somewhere.  Hmmm.... apparently not.  The thing is
> that oom_cfqq doesn't go through proper cfqq destruction and thus
> never puts the extra ref to root cfqg.

Ok. Is cfq_exit_queue() a better place to put down this reference
explicitly with a comment. Even if you keep it here, atleast a comment
is required. It is not obvious at all (atleast to me).

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