Peter Chubb napsal(a):
>In drivers/acpi/glue.c the address of an integer is cast to the
>address of an unsigned long. This breaks on systems where a long is
>larger than an int --- for a start the int can be misaligned; for a
>second the assignment through the pointer will overwrite part of the
>next variable.
>
>Patch is against linux-2.6.14-rc4
>
>Signed-off-by: Peter Chubb <[email protected]>
>
>Index: linux-2.6-import/drivers/acpi/glue.c
>===================================================================
>--- linux-2.6-import.orig/drivers/acpi/glue.c 2005-09-09 09:08:49.928854100 +1000
>+++ linux-2.6-import/drivers/acpi/glue.c 2005-10-20 13:32:32.126445742 +1000
>@@ -89,46 +89,46 @@ static int acpi_find_bridge_device(struc
> /* Get PCI root bridge's handle from its segment and bus number */
> struct acpi_find_pci_root {
> unsigned int seg;
> unsigned int bus;
> acpi_handle handle;
> };
>
> static acpi_status
> do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
> {
>- int *busnr = (int *)data;
>+ unsigned long *busnr = (unsigned long *)data;
>
>
Is the cast here really needed?
regards,
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ [email protected] ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E
-
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]