Alexander Viro [Sat, 29 May 2004 12:36:13 +0000 (05:36 -0700)]
[PATCH] sparse: nf_sockopt() annotation
netfilter set/getsockopt annotated. That's a continuation of previous
patch - by now the only remaining place where setsockopt()/getsockopt()
userland pointers are not traced is vcc_[sg]etsockopt() and down into the
ATM drivers. Everything from that area in net/* should be done by now.
That's pretty much it as far as non-trivial splitting counts; remaining
patches in net/* are independent, tty and console stuff is also not hard to
split (not much of it, anyway) and what remains is arch-dependent code for
alpha and amd64. Of course there'll be more stuff coming, but as far as I'm
concerned the rest of my pile is managable - and finally below 200Kb. That'll
go tomorrow - right now I'm going down and getting some sleep...
Alexander Viro [Sat, 29 May 2004 11:44:03 +0000 (04:44 -0700)]
[PATCH] sparse: final bits of compat_ioctl
ethtool_ioctl() annotated; it would go in the first compat_ioctl
chunk (trivial ones) if it wouldn't be right after SIOCGIFCONF mess; was
easier to split in that order...
Alexander Viro [Sat, 29 May 2004 11:43:20 +0000 (04:43 -0700)]
[PATCH] sparse (compat_ioctl): font stuff
Annotated, cleaned up, wholesale copying of structure with
subsequeunt casts from hell replaced with get_user()/put_user() on
the fields we really need.
Alexander Viro [Sat, 29 May 2004 11:42:59 +0000 (04:42 -0700)]
[PATCH] sparse (compat_ioctl): raw_ioctl() fixes
Whoever had done the translation apparently never heard of
big-endian boxen. Replaced the kludge with get_user()/put_user() on
64bit values. Note that
struct raw_config_request
{
int raw_minor;
__u64 block_major;
__u64 block_minor;
};
has __u64 on _all_ platforms and it is used as an integer in raw.c code.
The only reason why translation is needed at all is alignment for 64bit
values; block_major and block_minor themselves should be passed as-is.
Alexander Viro [Sat, 29 May 2004 11:42:48 +0000 (04:42 -0700)]
[PATCH] sparse: compat_ioctl - easy part
Easy parts of compat_ioctl fixes - pure __user annotation.
In one place (SG_IO handling) replaced dereference of user pointer
with put_user() (why whoever had noticed that just put a FIXME instead
of obvios fix is a mistery...)
a bunch of trivial ->read() and ->write() instances (and their procfs
relatives) __user-annotated. All chunks are independent, but IMO not
worth splitting.
Alexander Viro [Sat, 29 May 2004 09:18:12 +0000 (02:18 -0700)]
[PATCH] sparse: bits and pieces
Independent minor bits caught by sparse:
- paride.h mixing void and int in ? :, used always in a void context
ide-iops.c return insw() - insw is void()
- scsi/constants.c uses undefined macros in #if; added #define to 0 in
case that used to leave it undefined
- usb/host/hcd.h: fixed-point arithmetics in constant
- fs/exec.c: missing UL on a large constant
- fs/locks.c: #if where #ifdef should've been
- fs.h: missing UL on MAX_LFS_FILESIZE in 64bit case
[NET]: Simplify netdev_sysfs_xxx if SYSFS is not configured.
Don't need all the network sysfs code if CONFIG_SYSFS is not enabled.
Also:
* netdev_sysfs_unregister is declaration mismatch
* if netdev_sysfs_register fails print a warning.
Need to still mark it as registered so the unregister_netdevice works,
but we will probably end up leaking memory in that case.
Andrew Morton [Sat, 29 May 2004 03:59:07 +0000 (20:59 -0700)]
[PATCH] CREDITS file update
From: <Valdis.Kletnieks@vt.edu>
Thomas Dunbar used to be working in one of the Dean's offices here. He's
now down the hall from me (and has been for several years, actually). So
let's fix the crufty pointers.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 29 May 2004 03:58:56 +0000 (20:58 -0700)]
[PATCH] fs/dcache.c: avoid race when updating nr_unused count of unused dentries.
From: NeilBrown <neilb@cse.unsw.edu.au>
d_count == 1 is no guarantee that dentry is on the dentry_unused list, even
if it has just been incremented inside dcache_lock, as dput can decrement
at any time.
This test from Greg Banks is much safer, and is more transparently correct.
Cc: Maneesh Soni <maneesh@in.ibm.com>, Dipankar Sarma <dipankar@in.ibm.com>
From: Greg Banks <gnb@melbourne.sgi.com> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 29 May 2004 03:57:19 +0000 (20:57 -0700)]
[PATCH] dm-ioctl: replace dm_[add|remove]_wait_queue() with dm_wait_event()
From: Kevin Corry <kevcorry@us.ibm.com>
Some testing of DM multipath has turned up a problem with the DEVICE_WAIT
command. In the tests, while performing a DEVICE_WAIT on a multipath device,
the command sometimes returns immediately, even though the event-number is
correct and no path-failure has occurred to trigger an event. The problem was
tracked down to the call to schedule() in dev_wait(), which would return even
though it was not woken up by a DM table event.
This patch moves the responsibility for waiting from the ioctl interface into
the core driver, and uses wait_event_interruptible() instead of relying on
wait-queues and schedule().
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 29 May 2004 03:56:58 +0000 (20:56 -0700)]
[PATCH] dm-ioctl.c: fix off-by-one error
From: Kevin Corry <kevcorry@us.ibm.com>
Fix an OB1 error when calculating an output buffer size, that could cause a
missing null termininator in the 'list devices' ioctl results. [Steffan
Paletta]
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 29 May 2004 03:56:47 +0000 (20:56 -0700)]
[PATCH] i386: put irq stacks in .bss.page_aligned section
From: Matt Mackall <mpm@selenic.com>
I noticed that my vmlinux BSS had grown from 17k to 45k between 2.6.5 and
2.6.6. 8k was moving a pair of objects in head.S from the text section to
bss, 8k was the introduction of IRQ stacks, while the remainder (12k) was
page alignment slop, some of it spurious. The following patch brings BSS
down to the expected 33k.
Throw the IRQ stacks into the page aligned section to avoided wasted BSS
space. While we'd expect this to save up to 4k, this saves over 10k of BSS
here due to gcc3.3 spuriously aligning other objects in the vicinity.
Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>