Re: 2.6.14-rc3-rt2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 6 Oct 2005, Ingo Molnar wrote:

>
> * Steven Rostedt <[email protected]> wrote:
>
> > Found the problem.  You're using a 64 bit machine and flags in the
> > acpi code is defined as u32 and not unsigned long.  Ingo's tests put
> > some checks in the flags at the MSBs and these are being truncated.
>
> ahh ... I would not be surprised if this caused actual problems on x64
> in the upstream kernel too: using save_flags() over u32 will corrupt a
> word on the stack ...
>

Actually, it's still safe upstream.  The locks are taken via a function
defined as:

unsigned long acpi_os_acquire_lock(acpi_handle handle)
{
	unsigned long flags;
	spin_lock_irqsave((spinlock_t *) handle, flags);
	return flags;
}

So a u32 flags with

  flags = acpi_os_acquire_lock(lock);

would be safe, unless a 64 bit machine stored the value of IR in the upper
word, which I don't know of any archs that do that.

-- Steve

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux