From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035Ab3IMJSh (ORCPT ); Fri, 13 Sep 2013 05:18:37 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:39064 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678Ab3IMJSg (ORCPT ); Fri, 13 Sep 2013 05:18:36 -0400 Date: Fri, 13 Sep 2013 12:17:11 +0300 From: Sergey Senozhatsky To: Greg KH Cc: Dan Carpenter , Minchan Kim , driverdev-devel@linuxdriverproject.org, Jerome Marchand , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] staging: zram: fix handle_pending_slot_free() and zram_reset_device() race Message-ID: <20130913091710.GA2225@swordfish> References: <20130906151255.GE2238@swordfish.minsk.epam.com> <20130909123329.GZ19256@mwanda> <20130909124942.GA2221@swordfish.minsk.epam.com> <20130909132124.GY6329@mwanda> <522DD125.1030607@redhat.com> <522DF2DF.5060407@redhat.com> <20130910143416.GC2270@swordfish> <20130910145802.GD19256@mwanda> <20130910231250.GA2450@swordfish> <20130912221224.GA11463@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130912221224.GA11463@kroah.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/12/13 15:12), Greg KH wrote: > On Wed, Sep 11, 2013 at 02:12:50AM +0300, Sergey Senozhatsky wrote: > > Dan Carpenter noted that handle_pending_slot_free() is racy with > > zram_reset_device(). Take write init_lock in zram_slot_free(), thus > > preventing any concurrent zram_slot_free(), zram_bvec_rw() or > > zram_reset_device(). This also allows to safely check zram->init_done > > in handle_pending_slot_free(). > > > > Initial intention was to minimze number of handle_pending_slot_free() > > call from zram_bvec_rw(), which were slowing down READ requests due to > > slot_free_lock spin lock. Jerome Marchand suggested to remove > > handle_pending_slot_free() from zram_bvec_rw(). > > > > Link: https://lkml.org/lkml/2013/9/9/172 > > Signed-off-by: Sergey Senozhatsky > > I have multiple versions of this and the other zram patches from you, > with no idea of which to accept. yes, please, drop all patches. I did not Cc you in these two patches to stop spamming your inbox with multiply versions. I will send them back to you as soon as I get positive feedback. > So, I'm going to drop them all, can you please resend what you wish to > submit, and in the future, be a bit more obvious with your "vN" > markings? > sorry for that. -ss > thanks, > > greg k-h >