Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933879AbbHKIYx (ORCPT ); Tue, 11 Aug 2015 04:24:53 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36181 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932079AbbHKIYt (ORCPT ); Tue, 11 Aug 2015 04:24:49 -0400 Date: Tue, 11 Aug 2015 17:25:24 +0900 From: Sergey Senozhatsky To: Joonsoo Kim Cc: Minchan Kim , Sergey Senozhatsky , Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, peterz@infradead.org Subject: Re: [PATCH] zram: fix possible race when checking idle_strm Message-ID: <20150811082524.GA562@swordfish> References: <1438934609-16924-1-git-send-email-iamjoonsoo.kim@lge.com> <20150807091457.GL1891@swordfish> <20150807095816.GP1891@swordfish> <20150810003229.GA26074@js1304-P5Q-DELUXE> <20150810232633.GA7197@bgram> <20150811082527.GA351@js1304-P5Q-DELUXE> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150811082527.GA351@js1304-P5Q-DELUXE> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 30 On (08/11/15 17:25), Joonsoo Kim wrote: [..] > > "SLEEP AND WAKE-UP FUNCTIONS > > --------------------------- > > > > Sleeping and waking on an event flagged in global data ... > > ... > > ... > > ... > > > > A general memory barrier is interpolated automatically by set_current_state() > > after it has altered the task state:" > > > > So I think your T1-7 assumption is not true. > > > > As well, there are many examples under drivers/ to use the global data > > as event flag without locking or atomic. > > > > Okay. Now, I'm convinced that race is not possible. I will drop this > patch. yep, Minchan found it first. thanks guys. -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/