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]
Date:   Tue, 26 Feb 2019 09:48:12 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...hat.com, will.deacon@....com, tj@...nel.org,
        longman@...hat.com, johannes.berg@...el.com,
        linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Ming Lei <ming.lei@...hat.com>, Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH v7 21/23] block: Avoid that flushing triggers a lockdep
 complaint

On Tue, 2019-02-26 at 18:24 +0100, Peter Zijlstra wrote:
> On Thu, Feb 14, 2019 at 03:00:56PM -0800, Bart Van Assche wrote:
> > @@ -472,7 +473,8 @@ struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
> >  	if (!fq)
> >  		goto fail;
> >  
> > -	spin_lock_init(&fq->mq_flush_lock);
> > +	lockdep_register_key(&fq->key);
> > +	spin_lock_init_key(&fq->mq_flush_lock, &fq->key);
> 
> What's wrong with:
> 
> 	spin_lock_init(&fq->wq_flush_lock);
> 	lockdep_register_key(&fq->key);
> 	lockdep_set_class(&fq->wq_flush_lock, &fq->key);
> 
> ?

Hi Peter,

That's an approach that I had not yet considered. I'm fine with the
lockdep_set_class() version.

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ