public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: yhlu.kernel@gmail.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, johfel@users.sourceforge.net
Subject: Re: [PATCH 2.6.27-rc6] pci: fix resource_size_t type errors
Date: Wed, 10 Sep 2008 13:02:51 -0700	[thread overview]
Message-ID: <200809101302.52206.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200809101942.m8AJgoXx029414@harpo.it.uu.se>

On Wednesday, September 10, 2008 12:42 pm Mikael Pettersson wrote:
> Fix type errors introduced by commits
> 9bf8a1a79d549a0cf3b26c88d1ac8cdf07deafee and
> 76fbc263ff7e42ce8b21b8aee176e3c74b45f81a, "pci: debug extra pci resources
> range" and "pci: debug extra pci bus resources".
>
> These commits added printks of resource_size_t values using "%llx" formats.
> This is wrong for two reasons:
> - resource_size_t may be u32 or u64, depending on arch and config options,
>   but "%llx" only works with 64-bit integers; if there is a size mismatch,
>   printk's argument pointer will move past the corresponding parameters on
>   the stack (undefined behaviour)
> - even if resource_size_t is u64, that type may be unsigned long or
>   unsigned long long, depending on arch; if resource_size_t isn't unsigned
>   long long, the compiler will generate type mismatch warnings
>
> On my 32-bit x86 laptop, the first problem is visible in obviously bogus
> kernel messages:

Thanks Mikael, but I already integrated patches from Johann to fix this issue 
(53bc88701be91e7f631ad31418b32392aa952e9b and 
4ca8a7726fb0e8094fdb56f2ae2d69fcf9254eae in my for-linus tree).  I've queued 
it up for 2.6.27.

Thanks,
Jesse

      reply	other threads:[~2008-09-10 20:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 19:42 [PATCH 2.6.27-rc6] pci: fix resource_size_t type errors Mikael Pettersson
2008-09-10 20:02 ` Jesse Barnes [this message]

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=200809101302.52206.jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=johfel@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=yhlu.kernel@gmail.com \
    /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