mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: len.brown@intel.com
Subject: Re: fix off-by-one error in ioremap()
Date: Thu, 18 Sep 2003 10:05:37 +0200	[thread overview]
Message-ID: <1063872336.5026.1.camel@laptop.fenrus.com> (raw)
In-Reply-To: <200309172107.h8HL7UBf011628@hera.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

On Fri, 2003-09-12 at 10:15, Linux Kernel Mailing List wrote:
> ChangeSet 1.1063.43.5, 2003/09/12 04:15:36-04:00, len.brown@intel.com
> 
> 	fix off-by-one error in ioremap()
> 	fixes kernel crash in acpi mode: http://bugzilla.kernel.org/show_bug.cgi?id=1085

> diff -Nru a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c
> --- a/arch/i386/mm/ioremap.c	Wed Sep 17 14:07:31 2003
> +++ b/arch/i386/mm/ioremap.c	Wed Sep 17 14:07:31 2003
> @@ -140,7 +140,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;
>  


A bit higher in that function is:
                                                                                                        
        /* Don't allow wraparound or zero size */
        last_addr = phys_addr + size - 1;
        if (!size || last_addr < phys_addr)
                return NULL;
                                                                                                        

so why do you undo the deliberate -1 there ?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

       reply	other threads:[~2003-09-18  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200309172107.h8HL7UBf011628@hera.kernel.org>
2003-09-18  8:05 ` Arjan van de Ven [this message]
2003-09-18 16:03   ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1063872336.5026.1.camel@laptop.fenrus.com \
    --to=arjanv@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®