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: <20120906165145.GE29092@google.com>
Date:	Thu, 6 Sep 2012 09:51:45 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/11 V5] workqueue: Add @bind arguement back without
 change any thing

Hello, Lai.

On Thu, Sep 06, 2012 at 09:04:06AM +0800, Lai Jiangshan wrote:
> > This doesn't change anything.  You're just moving the test to the
> > caller with comments there explaining how it won't change even if
> > gcwq->lock is released.  It seems more confusing to me.  The flag is
> > still protected by manager_mutex.  How is this an improvement?
> > 
> 
> Some other bit of gcwq->flags is accessed(modified) without manager_mutex.
> making gcwq->flags be accessed only form gcwq->lock C.S. will help the reviewer.
> 
> I don't like adding special things/code when not-absolutely-required.

I really fail to see this.  The flag has to stay stable while
manage_mutex is held no matter where you test it.  It doesn't make any
it any more readable whether you test it inside gcwq->lock with the
comment saying "this won't change while manager_mutex is held" or just
test it while manager_mutex is held.  It is a synchronization oddity
no matter what and as long as it's well documented, I don't really see
the point in the change.

Thanks.

-- 
tejun
--
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