[PATCH] fix for integer overflow in hd6457[02] driver code
The attached patch fixes an integer overflow in drivers for N2, C101,
PCI200SYN WAN cards (brv * port->settings.clock_rate overflowed at
requested clock rate of 8*1024*1024 bps, problem noted by Nagaraj Kanniah).
Pierre Ossman [Sun, 5 Sep 2004 03:20:12 +0000 (20:20 -0700)]
[PATCH] x86-64: split timer resources
This splits timer resource from 0x40-0x5f to 0x40-0x43, 0x50-053 for
x86_64. A patch doing this for i386 was released earlier. Forgot that
we have two x86 platforms.
Alexander Viro [Sat, 4 Sep 2004 13:42:46 +0000 (06:42 -0700)]
[PATCH] UDF endianness fixes
Lots of crap. It looks like the thing had never been really tested on
big-endian boxen... Aside of usual "forgot to convert" bugs there's a cute
one - foo->le16field = cpu_to_le32(bar) does not work on big-endian...
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Sat, 4 Sep 2004 13:42:22 +0000 (06:42 -0700)]
[PATCH] msdos and vfat endianness fixes
Some callers of fat_date_unix2dos() (in msdos/namei.c and vfat/namei.c)
forgot to convert returned host-endian date and time to little-endian.
Since all callers want to get little-endian values, moved the conversion
into function itself.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Sat, 4 Sep 2004 13:42:10 +0000 (06:42 -0700)]
[PATCH] ext2 endianness fixes
Several places printk a little-endian number without any conversions.
Ones in super.c are particulary unpleasant - there we are getting told that
fs couldn't be mounted because of the following set of incompat features
and it would be nice to have the printed number matching what one could
find in headers...
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zwane Mwaikambo [Sat, 4 Sep 2004 09:18:26 +0000 (02:18 -0700)]
[PATCH] out-of-line locks / generic
This patch achieves out of line spinlocks by creating kernel/spinlock.c
and using the _raw_* inline locking functions.
Now, as much as this is supposed to be arch agnostic, there was still a
fair amount of rummaging about in archs, mostly for the cases where the
arch already has out of line locks and i wanted to avoid the extra call,
saving that extra call also makes lock profiling easier. PPC32/64 was
an example of such an arch and i have added the necessary profile_pc()
function as an example.
Size differences are with CONFIG_PREEMPT enabled since we wanted to
determine how much could be saved by moving that lot out of line too.
attached is a patch that polls the media setting for non GigE nForce
nics:
Without polling, media changes are not autodetected. This is fatal,
because the nic initialization is asynchroneous, thus "modprobe;ifup"
resulted in a dead network connection. The attached patch fixes that
problem.
It's a repost of a patch I sent around three weeks ago: you objected
that I rely on the nic irq instead of a software timer. I've documented
why this is ok.
Andrew Morton [Fri, 3 Sep 2004 18:14:54 +0000 (14:14 -0400)]
[PATCH] airo build fix
drivers/net/wireless/airo.c: In function `issuecommand':
drivers/net/wireless/airo.c:3812: warning: implicit declaration of function `kernel_locked'
*** Warning: "kernel_locked" [drivers/net/wireless/airo.ko] undefined!
Dave Jones [Fri, 3 Sep 2004 18:13:11 +0000 (14:13 -0400)]
[PATCH] 3c527 possible oops.
If the alloc_skb() fails, we dereference it in the skb_reserve() call.
Move the skb_reserve() call to after the NULL check.
Also clean up some CodingStyle violations whilst in the vicinity.
[PATCH] fix sched_domains hotplug bootstrap ordering vs. cpu_online_map issue
cpu_online_map is not set up at the time of sched domain initialization
when hotplug cpu paths are used for SMP booting.
At this phase of bootstrapping, cpu_possible_map can be used by the
various architectures using cpu hotplugging for SMP bootstrap, but the
manipulations of cpu_online_map done on behalf of NUMA architectures,
done indirectly via node_to_cpumask(), can't, because cpu_online_map
starts depopulated and hasn't yet been populated.
On true NUMA architectures this is a distinct cpumask_t from
cpu_online_map and so the unpatched code works on NUMA; on non-NUMA
architectures the definition of node_to_cpumask() this way breaks and
would require an invasive sweeping of users of node_to_cpumask() to
change it to e.g. cpu_possible_map, as cpu_possible_map is not suitable
for use at runtime as a substitute for cpu_online_map.
Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
a user can do echo 32000 > /proc/sys/vm/nr_hugepapges; at which point most
boxes will get spew about allocation failure. This of course isn't a real
bug so the patch below quiets that.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] radio/radio-maestro: replace schedule_timeout() with msleep()
Replaced sleep_125ms() with msleep(125), udelay2() with udelay(2),
udelay4() with udelay(4) and udelay16() with udelay(16) and removed the
replaced functions' definitions.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Sort the CREDITS file properly (and add Jesper)
Many entries in the CREDITS file are not properly sorted in alphabetical
order, despite the note in the file that it is supposed to be sorted like
that.
This patch attempts to sort the CREDITS file properly. No existing entries
were changed, merely moved around in the file. There where a few tricky
names that I was unsure how to sort (names with characters such as ü, ö,
and people with many names where it was unclear to me what name to sort by
etc), in those cases I've usually left the names where they were unless it
was glaringly obvious they were in the wrong spot.
I've also taken the liberty to add my own name to the file - I have
contributed several tiny/small fixes/cleanups etc over the years.
bad_page() only prints out 8 hexadecimal digits of page->flags regardless
of sizeof(page_flags_t). This leads to confusing and/or incomplete bug
reports. The following patch uses a field width argument to replace the
hardcoded %08lx so that bad_page() may print the whole of page->flags.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Disable colour conversion in the CPiA Video Camera driver
Since in-kernel colorspace conversion is not allowed, this patch disables it
in the CPiA video camera driver by default. Users should fix the applications
in case they don't work without conversion reenabled by setting the new
'colorspace_conv' module parameter to 1. This is a temporary solution, so
within a few months deprecated code will be entirely removed.
Alan Cox [Fri, 3 Sep 2004 03:28:40 +0000 (20:28 -0700)]
[PATCH] fix the barrier IDE detection logic
This fixes the logic so we always check for the cache. It also defaults to
safer behaviour for the non cache flush case now we have the right bits in
the right places. I've also played a bit with timings - the worst case
timings I can get for the flush are about 7 seconds (which I'd expect as
the engineering worst cases will include retries)
Probably what should happen is that the barrier logic is enabled providing
the wcache is disabled. I've not meddled with this as I don't know what
the intended semantics and rules are for disabling barrier on a live disk
(eg when a user uses hdparm to turn on the write cache). In the current
code as with Jens original that cannot occur.
I've also fixed the new printk's as per a private request from Matt Domsch.
Alan Cox [Fri, 3 Sep 2004 03:28:28 +0000 (20:28 -0700)]
[PATCH] Root reservations for strict overcommit
This was on my TODO list for a while and it turns out someone already fixed
the armwaving overcommit mode for the same problem. It is easy to get into
a situation where you have no overcommit and nothing can be done because
there is no memory to clean up the stable but non-useful state of the
machine.
The fix is trivial and duplicated from the armwaving overcommit code path.
The last 3% of the memory can be claimed by root processes only. It isn't
a cure but it does seem to solve the real world problems - at least
providing you have enough memory for 3% to be useful 8).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 3 Sep 2004 03:28:16 +0000 (20:28 -0700)]
[PATCH] pcxx.c build fix
CC drivers/char/pcxx.o
drivers/char/pcxx.c: In function `pcxe_cleanup':
drivers/char/pcxx.c:209: warning: unused variable `e2'
drivers/char/pcxx.c: At top level:
drivers/char/pcxx.c:229: `pcxe_init' undeclared here (not in a function)
drivers/char/pcxx.c:230: warning: type defaults to `int' in declaration of `module_cleanup'
drivers/char/pcxx.c:230: warning: parameter names (without types) in function declaration
drivers/char/pcxx.c:230: warning: data definition has no type or storage class
drivers/char/pcxx.c:1016: redefinition of `__initcall_pcxe_init'
drivers/char/pcxx.c:229: `__initcall_pcxe_init' previously defined here
drivers/char/pcxx.c:1016: `pcxe_init' undeclared here (not in a function)
drivers/char/pcxx.c:1017: `pcxe_exit' undeclared here (not in a function)
drivers/char/pcxx.c: In function `pcxe_tiocmget':
drivers/char/pcxx.c:2009: `mstat' undeclared (first use in this function)
drivers/char/pcxx.c:2009: (Each undeclared identifier is reported only once
drivers/char/pcxx.c:2009: for each function it appears in.)
drivers/char/pcxx.c: In function `pcxe_tiocmset':
drivers/char/pcxx.c:2072: warning: control reaches end of non-void function
drivers/char/pcxx.c: At top level:
drivers/char/pcxx.c:1044: warning: `pcxe_init' defined but not used
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>