From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbcAOFGN (ORCPT ); Fri, 15 Jan 2016 00:06:13 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33534 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbcAOFGM (ORCPT ); Fri, 15 Jan 2016 00:06:12 -0500 Date: Fri, 15 Jan 2016 14:07:22 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , Junil Lee , Andrew Morton , ngupta@vflare.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zsmalloc: fix migrate_zspage-zs_free race condition Message-ID: <20160115050722.GE1993@swordfish> References: <1452818184-2994-1-git-send-email-junil0814.lee@lge.com> <20160115023518.GA10843@bbox> <20160115032712.GC1993@swordfish> <20160115044916.GB11203@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160115044916.GB11203@bbox> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (01/15/16 13:49), Minchan Kim wrote: [..] > > > > or zs_free() can take spin_lock(&class->lock) earlier, it cannot free the > > Earlier? What do you mean? For getting right class, we should get a stable > handle so we couldn't get class lock first than handle lock. > If I misunderstand, please elaborate a bit. ohh... you're right. I didn't really check the code when I was writing this. please forget what I said. yeah, agree, record_obj() better be doing this. -ss