Michael Hunold [Wed, 14 Jul 2004 02:27:27 +0000 (19:27 -0700)]
[PATCH] fix saa7146 compilation
From: Colin Leroy <colin@colino.net>
This patch fixes a compilation error on 2.6.8-rc1. Here's the error:
drivers/media/common/saa7146_video.c:3: conflicting types for `memory'
include/asm-m68k/setup.h:365: previous declaration of `memory' make[3]: ***
[drivers/media/common/saa7146_video.o] Error 1
Signed-off-by: Colin Leroy <colin@colino.net> Signed-off-by: Michael Hunold <hunold@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Fix 3c59x.c uses of plain integer as NULL pointer
This patch will fix 3Com "Vortex" and "Boomerang" ethernet driver sparse
warnings about using plain integer as NULL pointer.
Signed-off-by: Petri T. Koistinen <petri.koistinen@iki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Tue, 13 Jul 2004 04:30:17 +0000 (21:30 -0700)]
[PATCH] compat_fillonedir() warning fix
access_ok() expects a pointer, not unsigned long. It's not a
problem on platforms that have this guy done as a macro (or ones that
do not use fs/compat.c at all), but that's still wrong and on some
platforms that care we actually have access_ok() as inlined function.
Bogus cast removed.
Alexander Viro [Tue, 13 Jul 2004 04:16:58 +0000 (21:16 -0700)]
[PATCH] __vfs_follow_link() made inline again
__vfs_follow_link() really should be inline; that's a special case since
we are in the middle of recursion and really want to conserve stack
space. Moved before the first use, made inline again.
Alexander Viro [Tue, 13 Jul 2004 04:03:08 +0000 (21:03 -0700)]
[PATCH] sparse: gemtek ioctl fix
Dumb Typo(tm) - the first bug caught by 0/NULL checks (arg is
really a kernel pointer there, so memset() is actually OK - results
will be copied to userland by caller. Or would be, if we would not
oops ;-)
Alexander Viro [Tue, 13 Jul 2004 04:02:33 +0000 (21:02 -0700)]
[PATCH] sparse: signal annotation
ss_sp in struct sigaltstack made __user
->si_addr and ->sival_ptr made __user
your ->sa_restorer and ->sa_handler changes propagated
users of these guys annotated on i386/amd64/alpha/sparc/sparc64
Alexander Viro [Tue, 13 Jul 2004 04:02:10 +0000 (21:02 -0700)]
[PATCH] sparse: alpha sparse infrastructure
* added usual CHECK assignment in Makefile
* switched uaccess.h to __check_uptr()
* added L on long constants (ones missed earlier)
* added __user in osf_sys.c (duh - I've added __user to cast in
the initializer, but forgot to add it in declaration)
Alexander Viro [Tue, 13 Jul 2004 04:01:35 +0000 (21:01 -0700)]
[PATCH] sparse: drivers/sbus fixes
a) vfc is not 64bit-clean, marked as such in Kconfig
b) aurora is simply broken - still uses tqueues. Marked as broken.
c) vfc does dereferencing of userland pointer, right after having
carefully copied the data to kernel space ;-) Fixed.
d) vfc ->mmap() had missed prototype change. Fixed.
e) BPP ioctls are misdeclared - they should've been _IO(...) instead
of _IOR(..., void). Too late to fix, but we can at least make them
_IOR(..., char) - same value, but doesn't try to find sizeof(void).
Alexander Viro [Tue, 13 Jul 2004 04:01:12 +0000 (21:01 -0700)]
[PATCH] sparse: tms380tr.c fix
tms380tr is used both by ISA and PCI drivers. Enabling/disabling
DMA is done only for ISA ones (it's protected by if (dev->dma > 0) and
PCI ones leave it 0), but it's compiled unconditionally. Which breaks
on platforms that don't have that ISA crap at all, but support PCI just
fine. Code in question placed under ifdef CONFIG_ISA.
Alexander Viro [Tue, 13 Jul 2004 04:00:39 +0000 (21:00 -0700)]
[PATCH] sparse: isdn compile fix for platforms with HZ > 1000
Division by zero is an ugly thing... We are safe wrt overflows,
since the maximal value we ever pass is 10000 - not enough to overflow
unless you've got a platform with HZ > 200000.
Alexander Viro [Tue, 13 Jul 2004 04:00:16 +0000 (21:00 -0700)]
[PATCH] sparse: VIDIOCSWIN compat_ioctl fixes
In handling of VIDIOCSWIN for 32bit on 64bit platforms:
* switched to compat_alloc_user_space()
* fixed memory corruption in copying arguments from userland
* fixed arithmetic overflows
* added missing checks for get_user() results
and corresponding returns with -EFAULT.
Fixes calculation of how many bytes in the RX/TX FIFOs.
Previous code failed to check wether the full flags
where set before returning the byte counter. This
should ensure that the serial driver behaves correctly
when the FIFO fills, and not just ignore the input
data
Jack Steiner [Mon, 12 Jul 2004 07:27:49 +0000 (00:27 -0700)]
[PATCH] ia64: Reduce TLB flushing during process migration
This patch adds an architecture-specific callout after explicit
processor migrations. The callout allows architectures (or platforms)
to update TLB specific information (ex., cpu_vm_mask).
Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: David Mosberger <davidm@hpl.hp.com>
copy_from_user() moved from dvb_ringbuffer_{write,pkt_write}() to callers;
these functions are always getting kernel pointer now. "usermem" argument
killed, code annotated.
x86: fix stackframe ownership confusion in sys_sigaltstack()
gcc doesn't understand that "asmlinkage" routines have the
argument stack owned by the assembly-language caller, and the
recent sparse cleanup made gcc think it owns enough stack
frame space to make a tailcall by overwriting "struct pt_regs"
that is set up by the low-level system call code.
Hide that problem again.
The real fix would be to tell gcc that the caller owns the
stack frame that it set up, but we don't have any such
interfaces, so for now the best we can do is to hide it.
Martin Josefsson [Sun, 11 Jul 2004 10:49:02 +0000 (03:49 -0700)]
[NETFILTER]: Add timestamping to ipt_ULOG
After Andi's timestamp optimizations we don't have any timestamps on the
packets unless someone requested them. Here's a patch for 2.6 to
explicitly timestamp the packets before we log them.
Harald approved it some time ago, he's pretty busy so I'm sending it
instead.
Signed-off-by: Martin Josefsson <gandalf@netfilter.org> Signed-off-by: David S. Miller <davem@redhat.com>
Adrian Bunk [Sun, 11 Jul 2004 02:39:27 +0000 (19:39 -0700)]
[PATCH] kill IKCONFIG_VERSION
The patch below (already ACK'ed by Randy Dunlap) kills the unused
IKCONFIG_VERSION from kernel/configs.c .
This patch is based on a previous patch by Anton Blanchard and an idea of
Bartlomiej Zolnierkiewicz. (I hope I haven't forgotten anyone who contributed
to this patch. ;-) )
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>
Adrian Bunk [Sun, 11 Jul 2004 02:39:05 +0000 (19:39 -0700)]
[PATCH] remove outdated ext2 help text parts
The patch below solves Bugzilla #3014 by removing much outdated information
from the ext2 help text.
The help text is now very short, but few correct information is better than
outdated information - and if you think it's too short, feel free to send a
patch that adds more current information.
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>
From: Ursula Braun-Krahl <braunu@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
iucv driver changes:
- Fix iucv declare/retrieve buffer which the cpu hotplug patch has broken.
- Make smp_call_function_on call func(info) in non-smp kernels.
- Use a spinlock to get smp_get_cpu/smp_put_cpu race free.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
From: Ulrich Weigand <uweigand@de.ibm.com>
s390 core changes:
- Add signo between signal frame and the signal return instruction on the
user stack for backtrace over signal handlers.
- Add hfp floating point exceptions.
- Use a single function for region, segment and page translation exceptions.
- Discard SIGTRAP for single stepped instructions if the trapping instruction
is repeated (normal memory faults) or if another signal is delivered anyway.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrea Arcangeli [Sun, 11 Jul 2004 02:38:19 +0000 (19:38 -0700)]
[PATCH] mpage_writepages() i_size reading fix
I believe reading the i_size from memory multiple times can generate fs
corruption. The "offset" and the "end_index" were not coherent. this is
writepages and it runs w/o the i_sem, so the i_size can change from under
us anytime. If a parallel write happens while writepages run, the i_size
could advance from 4095 to 4100. With the current 2.6 code that could
translate in end_index = 0 and offset = 4. That's broken because end_index
and offset could be not coherent. Either end_index=1 and offset =4, or
end_index = 0 and offset = 4095. When they lose coherency the memset can
zeroout actual data. The below patch fixes that (it's at least a
theoretical bug).
I don't really expect this tiny race to fix the bug in practice after the
more serious bugs we covered yesterday didn't fix it (more likely the
compiler will get involved into the equation soon ;).
This is also an optimization for 32bit archs that needs special locking to
read 64bit i_size coherenty.
This patch also arranges for mpage_writepages() to always zero out the file's
final page between i_size and the end of the file's final block. This is a
best-effort correctness thing to deal with errant applications which write
into the mmapped page beyond the underlying file's EOF.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrea Arcangeli [Sun, 11 Jul 2004 02:37:57 +0000 (19:37 -0700)]
[PATCH] writepage fs corruption fix
Fix a data loss bug in mpage_writepages(), triggerable under extreme memory
pressure on ext2, JFS, hfs and hfsplus:
The bug is the marking of the bh clean despite we could still run into the
"confused" path. After that the confused path really becomes confused and it
writes nothing and fs corruption triggers silenty (the reugular writepage only
writes bh that are marked dirty, it never attempts to submit_bh anything
marked clean). The mpage-writepage code must never mark the bh clean as far
as it wants to still fallback in the regular writepage which depends on the bh
to be dirty (i.e. the "goto confused" path). This could only triggers with
memory pressure (it also needs buffer_heads_over_limit == 0, and that is
frequent under mm pressure).
Thanks a lot to Chris for his fine debugging that localized the problem in the
writepage code.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>