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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130410215915.GB30871@google.com>
Date:	Wed, 10 Apr 2013 14:59:15 -0700
From:	Kent Overstreet <koverstreet@...gle.com>
To:	Theodore Ts'o <tytso@....edu>, linux-kernel@...r.kernel.org,
	linux-aio@...ck.org, akpm@...ux-foundation.org,
	Zach Brown <zab@...hat.com>, Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Mark Fasheh <mfasheh@...e.com>,
	Joel Becker <jlbec@...lplan.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Jens Axboe <axboe@...nel.dk>,
	Asai Thambi S P <asamymuthupa@...ron.com>,
	Selvan Mani <smani@...ron.com>,
	Sam Bradshaw <sbradshaw@...ron.com>,
	Jeff Moyer <jmoyer@...hat.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Benjamin LaHaise <bcrl@...ck.org>,
	Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH 30/33] block, aio: batch completion for bios/kiocbs

On Tue, Apr 02, 2013 at 03:48:03PM -0400, Theodore Ts'o wrote:
> On Thu, Mar 21, 2013 at 09:35:51AM -0700, Kent Overstreet wrote:
> > +		if (unlikely(req->ki_ctx != ctx)) {
> > +			kioctx_ring_unlock(ctx, tail);
> > +
> > +			ctx = req->ki_ctx;
> > +			tail = kioctx_ring_lock(ctx);
> > +		}
> 
> The only place where you're calling kioctx_ring_lock() is above, which
> is part of an unlock/lock pair.
> 
> There is also a kioctx_ring_unlock at the end of batch_complete_aio():
> 
> > +	kioctx_ring_unlock(ctx, tail);
> > +	local_irq_restore(flags);
> > +	rcu_read_unlock();
> 
> But I'm not seeing a matching kioctx_ring_lock() before the while loop
> in batch_complete_aio(), nor anywhere else in the file.  And since
> kioctx_ring_lock() is a static function....
> 
> Am I missing something?

We start out with ctx == NULL - we handle the initial kiocb the same way
we handle a kiocb with a different kioctx as the last one.
--
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