From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755443AbbKDIqi (ORCPT ); Wed, 4 Nov 2015 03:46:38 -0500 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35605 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbbKDIqh convert rfc822-to-8bit (ORCPT ); Wed, 4 Nov 2015 03:46:37 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: [PATCH] mm: change tlb_finish_mmu() to be more simple From: yalin wang In-Reply-To: <20151104083610.GA403@swordfish> Date: Wed, 4 Nov 2015 16:46:25 +0800 Cc: Andrew Morton , "Kirill A. Shutemov" , Mel Gorman , Johannes Weiner , riel@redhat.com, raindel@mellanox.com, willy@linux.intel.com, boaz@plexistor.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <58D5B463-D8C3-40E2-A0B0-458DB1117338@gmail.com> References: <1446622531-316-1-git-send-email-yalin.wang2010@gmail.com> <20151104083610.GA403@swordfish> To: Sergey Senozhatsky X-Mailer: Apple Mail (2.3094) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 4, 2015, at 16:36, Sergey Senozhatsky wrote: > > On (11/04/15 15:35), yalin wang wrote: > [..] >> >> - for (batch = tlb->local.next; batch; batch = next) { >> - next = batch->next; >> + for (batch = tlb->local.next; batch; batch = batch->next) >> free_pages((unsigned long)batch, 0); > > accessing `batch->next' after calling free_pages() on `batch'? > > -ss oh, my mistake, my code is buggy here . Thanks