Re: [PATCH] gpu: Initial GPU layer addition. (03/07)

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

 



Dave Airlie <[email protected]> ha scritto:
> diff --git a/drivers/video/gpu_layer.c b/drivers/video/gpu_layer.c
> new file mode 100644
> index 0000000..36e7037
> --- /dev/null
> +++ b/drivers/video/gpu_layer.c
> @@ -0,0 +1,393 @@
> +/*
> + * drivers/video/gpu_layer.c
> + *
> + * (C) Copyright Dave Airlie 2006
> + *
> + */
> +#include <linux/device.h>
> +#include <linux/list.h>
> +#include <linux/mutex.h>
> +#include <linux/pci.h>
> +#include <linux/gpu_layer.h>
> +
> +/* GPUs we manage */
> +LIST_HEAD(gpu_bus_list);
> +
> +/* used when allocating bus numbers */
> +#define GPU_MAXBUS             16
> +struct gpu_busmap {
> +       unsigned long busmap [GPU_MAXBUS / (8*sizeof (unsigned long))];
> +};

16 / (8 * 4) is zero (the same with sizeof(long) == 8). When doing bit
ops on that zero-sized array you are probably corrupting the BSS. 

Luca
-- 
Home: http://kronoz.cjb.net
Recursion n.:
	See Recursion.
-
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