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: <20110120154327.GD18875@redhat.com>
Date:	Thu, 20 Jan 2011 10:43:27 -0500
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:	Jens Axboe <jaxboe@...ionio.com>,
	Philipp Reisner <philipp.reisner@...bit.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Lars Ellenberg <lars.ellenberg@...bit.com>,
	"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] loop: queue_lock NULL pointer derefence in
 blk_throtl_exit (v2)

On Thu, Jan 20, 2011 at 05:18:22PM +0200, Sergey Senozhatsky wrote:
> On (01/20/11 09:35), Vivek Goyal wrote:
> > Hi Sergey,
> >
> 
> Hi Vivek,
> 
> > Can we expand a little bit on comment that why do we need to have
> > q->queue_lock initialized here now. Basically in the past nobody tried
> > to take q->queue_lock in blk_cleanup_queue() path hence things just
> > worked. Now blk throttling code is new and it takes q->queue_lock hence we
> > run into issues. This could be true for some other future code too.
> > 
> > Secondly currently blk throttle code seems to be the only user dependent
> > on this lock initialization. So it might make sense to move this code
> > closer to the actual call and blk_release_queue() might be even better
> > place to do it atleast for now.
> > 
> 
> I'm afraid it's not safe to move NULL-check-and-fix out from blk_cleanup_queue, 
> since we're performing elevator_exit(q->elevator) call, which may depend on 
> q->queue_lock. For example, (./cfq-iosched.c: .elevator_exit_fn = cfq_exit_queue)
> cfq_exit_queue uses q->queue_lock.

ok, actually cfq_exit_queue() will be called only if elevator has been
initilialzed and if elevator has been initialialized that means
q->queue_lock also has been initilalized so that should not be a problem.

I am not very particular about this thing. So I will leave it to you.

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