Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754860Ab1FOKn7 (ORCPT ); Wed, 15 Jun 2011 06:43:59 -0400 Received: from merlin.infradead.org ([205.233.59.134]:42205 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173Ab1FOKn6 convert rfc822-to-8bit (ORCPT ); Wed, 15 Jun 2011 06:43:58 -0400 Subject: Re: [PATCH]mm: use correct address for pte_unmap_unlock in zap_pte_range From: Peter Zijlstra To: Shaohua Li Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, rostedt In-Reply-To: <20110615102909.GA23759@sli10-conroe.sh.intel.com> References: <20110615102909.GA23759@sli10-conroe.sh.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 15 Jun 2011 12:43:30 +0200 Message-ID: <1308134610.15315.35.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2163 Lines: 51 On Wed, 2011-06-15 at 18:29 +0800, Shaohua Li wrote: > Boot an i386 kernel, I got: > [ 3.766613] WARNING: at /workshop/kernel/git/my/linux/arch/x86/mm/highmem_32.c:81 __kunmap_atomic+0x6f/0x113() > [ 3.766615] Hardware name: Studio XPS 8000 > [ 3.766617] Modules linked in: > [ 3.766619] Pid: 214, comm: blkid Not tainted 3.0.0-rc3+ #529 > [ 3.766621] Call Trace: > [ 3.766625] [] warn_slowpath_common+0x6a/0x7f > [ 3.766628] [] ? __kunmap_atomic+0x6f/0x113 > [ 3.766631] [] warn_slowpath_null+0x14/0x18 > [ 3.766633] [] __kunmap_atomic+0x6f/0x113 > [ 3.766637] [] zap_pte_range+0x291/0x2b4 > [ 3.766641] [] ? get_parent_ip+0xb/0x31 > [ 3.766644] [] unmap_page_range+0x12a/0x147 > [ 3.766647] [] unmap_vmas+0xa6/0xe2 > [ 3.766650] [] exit_mmap+0x78/0xd3 > [ 3.766654] [] mmput+0x39/0x99 > [ 3.766657] [] exit_mm+0x101/0x109 > [ 3.766660] [] do_exit+0x1e6/0x312 > [ 3.766664] [] ? fput+0x18/0x1a > [ 3.766666] [] do_group_exit+0x67/0x8a > [ 3.766669] [] sys_exit_group+0x18/0x1c > [ 3.766673] [] syscall_call+0x7/0xb > > the zap_pte_range does: > pte = pte_offset_map_lock(mm, pmd, addr, &ptl); > do { > ... > if (force_flush) > break; > ... > } while (pte++, addr += PAGE_SIZE, addr != end); > > pte_unmap_unlock(pte - 1, ptl); > > the pte_unmap_unlock(pte - 1) only works if pte++ does once. > > this is a regression introduced by d16dfc550f5326a4000f3(mm: mmu_gather > rework) Already send by Steven and picked up by Andrew: lkml.kernel.org/r/1307158665.3667.86.camel@gandalf.stny.rr.com lkml.kernel.org/r/201106040413.p544D9ox027032@imap1.linux-foundation.org Apparently it hasn't made its way to Linus though. -- 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/