| Age | Commit message (Collapse) | Author |
|
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.
In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch. This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other. So if any
hunk rejects or gets in the way of other patches, just drop it. My scripts
will pick it up again in the next round.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
handling of %t... (ptrdiff_t) in vsnprintf
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
- Make sprintf call vsnprintf directly
- use INT_MAX for sprintf and vsprintf
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Adds support for 'hh' (store number in char *) and 'll' (proper C99 for
long long) modifiers to sscanf().
|
|
Use NULL, not 0, where appropriate.
|
|
I know it's simple_strtoul, but is it meant to be that simple? Fix up for
both simple_strtoul and simple_strtoull.
simple_strtoul(0x401b, NULL, 0) = 0x401b
simple_strtoul(0X401b, NULL, 0) = 0x0
simple_strtoul(0x401b, NULL, 16) = 0x0
simple_strtoul(0X401b, NULL, 16) = 0x0
simple_strtoull(0x401b, NULL, 0) = 0x401b
simple_strtoull(0X401b, NULL, 0) = 0x0
simple_strtoull(0x401b, NULL, 16) = 0x0
simple_strtoull(0X401b, NULL, 16) = 0x0
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: Juergen Quade <quade@hsnr.de>
Lots of places in the kernel are using [v]snprintf wrongly: they assume it
returns the number of characters copied. It doesn't. It returns the
number of characters which _would_ have been copied had the buffer not been
filled up.
So create new functions vscnprintf() and scnprintf() which have the
expected (sane) semaptics, and migrate callers over to using them.
|
|
From: <gb@phonema.ea.univpm.it>
The "%c" in sscanf actually reads and writes one extra character (i.e. 2
characters insted of just one), and may thus easily overflow caller's
buffer.
Also affects 2.4 tree, even if there "%c" seems not to be used at all.
|
|
From: Paul Jackson <pj@sgi.com>
Explain the snprintf() return value.
|
|
the size to "vsnprintf()".
That's a pretty clear case of overflow.
|
|
Expand printk's traditional handling of null pointers so that anything in the
first page is considered a null pointer.
This gives us better behaviour when someone (acpi..) accidentally prints a
string which is embedded in a struct, the pointer to which is null.
|
|
|
|
It used to depend on us having a signed type (which in turn is
incorrect for the later division).
|
|
- __div64_32(): remove __attribute_pure__ qualifier from the prototype
since this function obviously clobbers memory through &(n);
- do_div(): add a check to ensure (n) is type-compatible with uint64_t;
- as_update_iohist(): Use sector_div() instead of do_div().
(Whether the result of the addition should always be stored in 64bits
regardless of CONFIG_LBD is still being discussed, therefore it's
unadderessed here);
- Fix all places where do_div() was being called with a bad divisor argument.
|
|
My printf manpage says:
z A following integer conversion corresponds to a
size_t or ssize_t argument. (Linux libc5 has Z with
this meaning. Don't use it.)
And the opengroup spec says
z Specifies that a following d , i , o , u , x , or X conversion specifier
applies to a size_t or the corresponding signed integer type argument; or
that a following n conversion specifier applies to a pointer to a signed
integer type corresponding to a size_t argument.
yet our vsnprintf implementation has
/* 'z' support added 23/7/1999 S.H. */
/* 'z' changed to 'Z' --davidm 1/25/99 */
I guess the path of least surprise is to support both. gcc-3.2.1 doesn't
seem to care.
|
|
|
|
|
|
attached patch adds missing static modifiers for small_digits[] and
large_digits[] arrays in the number() function from lib/vsprintf.c
Patch against 2.5.25, should apply to 2.4.x.
Please consider applying.
|
|
Cset exclude: bcrl@redhat.com|ChangeSet|20020429021546|12619
|
|
In conjunction with some of the earlier problems found in /proc code,
now it turns out that snprintf doesn't work correctly in the kernel...
Without the following patch, snprintf can return lengths greater than
the size argument passed. The net effect is that code using the return
value from snprintf can still buffer overrun. This is fixed by not
updating the pointer in the buffer unless there is actually space.
|
|
- Al Viro: fix up silly problem in swapfile filp cleanups in 2.5.2
- Tachino Nobuhiro: fix another error return for swapfile filp code
- Robert Love: merge some of Ingo's scheduler fixes
- David Miller: networking, sparc and some scsi driver fixes
- Tim Waugh: parport update
- OGAWA Hirofumi: fatfs cleanups and bugfixes
- Roland Dreier: fix vsscanf buglets.
- Ben LaHaise: include file cleanup
- Andre Hedrick: IDE taskfile update
|
|
- Trond Myklebust: deadlock checking in lockd server
- Tim Waugh: fix up parport wrong #define
- Christoph Hellwig: i2c update, ext2 cleanup
- Al Viro: fix partition handling sanity check.
- Trond Myklebust: make NFS use SLAB_NOFS, and not play games with PF_MEMALLOC
- Ben Fennema: UDF update
- Alan Cox: continued merging
- Chris Mason: get /proc buffer memory sizes right after buf-in-page-cache
|
|
- Alan Cox: continued merging
- Mingming Cao: make msgrcv/shmat check the queue/segment ID's properly
- Greg KH: USB serial init failure fix, Xircom serial converter driver
- Neil Brown: nsfd/raid/md/lockd cleanups
- Ingo Molnar: multipath RAID personality, raid xor update
- Hugh Dickins/Marcelo Tosatti: swapin read-ahead race fix
- Vojtech Pavlik: fix up some of the infrastructure for x86-64
- Robert Love: AMD 761 AGP GART support
- Jens Axboe: fix SCSI-generic queue handling race
- me: be sane about page reference bits
|
|
- Greg KH: start migration to new "min()/max()"
- Roman Zippel: move affs over to "min()/max()".
- Vojtech Pavlik: VIA update (make sure not to IRQ-unmask a vt82c576)
- Jan Kara: quota bug-fix (don't decrement quota for non-counted inode)
- Anton Altaparmakov: more NTFS updates
- Al Viro: make nosuid/noexec/nodev be per-mount flags, not per-filesystem
- Alan Cox: merge input/joystick layer differences, driver and alpha merge
- Keith Owens: scsi Makefile cleanup
- Trond Myklebust: fix oopsable race in locking code
- Jean Tourrilhes: IrDA update
|
|
- Alan Cox: more merging
- L.C. Chang: new SiS IDE PCI id's.
- Maciej Rozycki: make MP table parsing more anal. Should fix broken P4 MP tables.
- Leonard Zubkoff: merge DAC960 completion changes
- Christoph Rohland: saner tmpfs mount-time limit behaviour (and remount)
- me: buffer.c logic update - faster and hopefully livelock-free
|
|
- David Miller: sparc rw semaphores moved over
- Alan Cox: yet more resyncs
- NIIBE Yutaka: Super-H driver update
- David Howells: more rw-sem cleanups, updates
- USB updates
- Al Viro: filesystem init cleanup
|
|
- Alan Cox: continued merging
- Urban Widmark: smbfs fix (d_add on already hashed dentry - no-no).
- Andrew Morton: 3c59x update
- Jeff Garzik: network driver cleanups and fixes
- Gérard Roudier: sym-ncr drivers update
- Jens Axboe: more loop cleanups and fixes
- David Miller: sparc update, some networking fixes
|
|
|