Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 6 Mar 2003 16:47:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 6 Mar 2003 16:47:39 -0500 Received: from wpax13.physik.uni-wuerzburg.de ([132.187.42.13]:25618 "EHLO wpax13.physik.uni-wuerzburg.de") by vger.kernel.org with ESMTP id ; Thu, 6 Mar 2003 16:47:38 -0500 Date: Thu, 6 Mar 2003 22:58:09 +0100 (MET) From: Andreas Klein To: linux-kernel@vger.kernel.org cc: torvalds@transmeta.com, mantel@suse.de Subject: ioremap off by one bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 37 Hello, we have found an off by one bug in ioremap. The following patch fixes the problem. --- arch/i386/mm/ioremap.c.orig 2003-03-06 23:16:12.000000000 +0100 +++ arch/i386/mm/ioremap.c 2003-03-06 23:16:30.000000000 +0100 @@ -142,7 +142,7 @@ */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr) - phys_addr; + size = PAGE_ALIGN(last_addr+1) - phys_addr; /* * Ok, go for it.. bye, -- Andreas Klein asklein@cip.physik.uni-wuerzburg.de root / webmaster @cip.physik.uni-wuerzburg.de root / webmaster @www.physik.uni-wuerzburg.de _____________________________________ | | | Long live our gracious AMIGA! | |___________________________________| - 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/