aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-06PERCPU : __percpu_alloc_mask() can dynamically size percpu_data storageEric Dumazet
Instead of allocating a fix sized array of NR_CPUS pointers for percpu_data, we can use nr_cpu_ids, which is generally < NR_CPUS. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Christoph Lameter <clameter@sgi.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Document I_SYNC and I_DATASYNCJoern Engel
After some archeology (see http://logfs.org/logfs/inode_state_bits) I finally figured out what the three I_DIRTY bits do. Maybe others would prefer less effort to reach this insight. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06alpha/parisc: remove config variable DEBUG_RWLOCKJiri Olsa
Remove config variable DEBUG_RWLOCK, since it is not used. Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Acked-by: Grant Grundler <grundler@parisc-linux.org> Acked-by: Kyle McMartin <kyle@mcmartin.ca> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fs: remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbolJiri Olsa
Remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol. Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06log2.h: Define order_base_2() macro for convenience.Robert P. J. Day
Given a number of places in the tree that need to calculate this value explicitly, might as well just create a macro for it. (akpm: must be implemented as a macro for callee typeof() usage) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06cciss: use upper_32_bits() macro to eliminate warningsRandy Dunlap
Use upper_32_bits(x) macro to handle shifts that may be >= the width of the data type. drivers/block/cciss.c: In function 'do_cciss_request': drivers/block/cciss.c:2655: warning: right shift count >= width of type drivers/block/cciss.c:2656: warning: right shift count >= width of type drivers/block/cciss.c:2657: warning: right shift count >= width of type drivers/block/cciss.c:2658: warning: right shift count >= width of type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06time: fix sysfs_show_{available,current}_clocksources() buffer overflow problemMiao Xie
I found that there is a buffer overflow problem in the following code. Version: 2.6.24-rc2, File: kernel/time/clocksource.c:417-432 -------------------------------------------------------------------- static ssize_t sysfs_show_available_clocksources(struct sys_device *dev, char *buf) { struct clocksource *src; char *curr = buf; spin_lock_irq(&clocksource_lock); list_for_each_entry(src, &clocksource_list, list) { curr += sprintf(curr, "%s ", src->name); } spin_unlock_irq(&clocksource_lock); curr += sprintf(curr, "\n"); return curr - buf; } ----------------------------------------------------------------------- sysfs_show_current_clocksources() also has the same problem though in practice the size of current clocksource's name won't exceed PAGE_SIZE. I fix the bug by using snprintf according to the specification of the kernel (Version:2.6.24-rc2,File:Documentation/filesystems/sysfs.txt) Fix sysfs_show_available_clocksources() and sysfs_show_current_clocksources() buffer overflow problem with snprintf(). Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06sound/oss/trident.c: fix incorrect test in trident_ac97_set()Roel Kluin
If count reaches zero, the loop ends, but the postfix decrement still subtracts: testing for 'count == 0' will not work. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Reviewed-by: Ray Lee <ray-lk@madrabbit.org> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06rd: use is_power_of_2() in drivers/block/rd.c.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06drivers/misc/lkdtm.c: cleanupsAdrian Bunk
- make needlessly global functions static - make lkdtm_module_{init,exit}() as __{init,exit} Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Ankita Garg <ankita@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06proper prototype for vty_init()Adrian Bunk
Add a proper prototype for vty_init() in include/linux/vt_kern.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fs/eventfd.c should #include <linux/syscalls.h>Adrian Bunk
Every file should include the headers containing the prototypes for its global functions (in this case sys_eventfd()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fs/signalfd.c should #include <linux/syscalls.h>Adrian Bunk
Every file should include the headers containing the prototypes for its global functions (in this case sys_signalfd()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fs/utimes.c should #include <linux/syscalls.h>Adrian Bunk
Every file should include the headers containing the prototypes for its global functions. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06proper prototype for get_filesystem_list()Adrian Bunk
Ad a proper prototype for migration_init() in include/linux/fs.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06kernel/notifier.c should #include <linux/reboot.h>Adrian Bunk
Every file should include the headers containing the prototypes for its global functions (in this case {,un}register_reboot_notifier()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06make srcu_readers_active() staticAdrian Bunk
Make the needlessly global srcu_readers_active() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06kernel/ptrace.c should #include <linux/syscalls.h>Adrian Bunk
Every file should include the headers containing the prototypes for its global functions (in this case sys_ptrace()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06proper prototype for signals_init()Adrian Bunk
Add a proper prototype for signals_init() in include/linux/signal.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06smbfs: fix calculation of kernel_recvmsg size parameter in smb_receive()Jeff Layton
smb_receive calls kernel_recvmsg with a size that's the minimum of the amount of buffer space in the kvec passed in or req->rq_rlen (which represents the length of the response). This does not take into account any data that was read in a request earlier pass through smb_receive. If the first pass through smb_receive receives some but not all of the response, then the next pass can call kernel_recvmsg with a size field that's too big. kernel_recvmsg can overrun into the next response, throwing off the alignment and making it unrecognizable. This causes messages like this to pop up in the ring buffer: smb_get_length: Invalid NBT packet, code=69 as well as other errors indicating that the response is unrecognizable. Typically this is seen on a smbfs mount under heavy I/O. This patch changes the code to use (req->rq_rlen - req->rq_bytes_recvd) instead instead of just req->rq_rlen, since that should represent the amount of unread data in the response. I think this is correct, but an ACK or NACK from someone more familiar with this code would be appreciated... Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06read_current_timer() cleanupsAndrew Morton
- All implementations can be __devinit - The function prototypes were in asm/timex.h but they all must be the same, so create a single declaration in linux/timex.h. - uninline the sparc64 version to match the other architectures - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value. [ezk@cs.sunysb.edu: fix build] Cc: "David S. Miller" <davem@davemloft.net> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06scheduled OSS driver removalAdrian Bunk
This patch contains the scheduled removal of OSS drivers whose config options have been removed in 2.6.23. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06FAT: Fix printk format stringsVegard Nossum
This makes sure printk format strings contain no more than a single line. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> [the message was tweaked.] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06proper show_interrupts() prototypeAdrian Bunk
Add a proper prototype for show_interrupts() in include/linux/interrupt.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06MNT_UNBINDABLE fixAndries E. Brouwer
Some time ago ( http://lkml.org/lkml/2007/6/19/128 ) I wrote about MNT_UNBINDABLE that it felt like a bug that it is not reset by "mount --make-private". Today I happened to see mount(8) and Documentation/sharedsubtree.txt and both document the version obtained by applying the little patch given in the above (and again below). So, the present kernel code is not according to specs and must be regarded as buggy. Specification in Documentation/sharedsubtree.txt: See state diagram: unbindable should become private upon make-private. Specification in mount(8): ... It's also possible to set up uni-directional propagation (with --make- slave), to make a mount point unavailable for --bind/--rbind (with --make-unbindable), and to undo any of these (with --make-private). Repeat of old fix-shared-subtrees-make-private.patch (due to Dirk Gerrits, René Gabriëls, Peter Kooijmans): Acked-by: Ram Pai <linuxram@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06remove mm_{ptov,vtop}()Adrian Bunk
This patch removes the unused mm_{ptov,vtop}(). Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Bryan Wu <bryan.wu@analog.com> Cc: Miles Bader <miles.bader@necel.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06cleanup after APUS removalAdrian Bunk
After the APUS removal, some code can be removed. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06make ipc/util.c:sysvipc_find_ipc() staticAdrian Bunk
sysvipc_find_ipc() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06register_cpu __devinit or __cpuinitRandy Dunlap
Is there some reason why register_cpu() is __devinit instead of __cpuinit ? Make it __cpuinit. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Allow auto-destruction of loop devicesDavid Woodhouse
This allows a flag to be set on loop devices so that when they are closed for the last time, they'll self-destruct. In general, so that we can automatically allocate loop devices (as with losetup -f) and have them disappear when we're done with them. In particular, right now, so that we can stop relying on the hackish special-case in umount(8) which kills off loop devices which were set up by 'mount -oloop'. That means we can stop putting crap in /etc/mtab which doesn't belong there, which means it can be a symlink to /proc/mounts, which means yet another writable file on the root filesystem is eliminated and the 'stateless' folks get happier... and OLPC trac #356 can be closed. The mount(8) side of that is at http://marc.info/?l=util-linux-ng&m=119362955431694&w=2 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Woodhouse <dwmw2@infradead.org> Cc: Bernardo Innocenti <bernie@codewiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06remove support for un-needed _extratext sectionRobin Getz
When passing a zero address to kallsyms_lookup(), the kernel thought it was a valid kernel address, even if it is not. This is because is_ksym_addr() called is_kernel_extratext() and checked against labels that don't exist on many archs (which default as zero). Since PPC was the only kernel which defines _extra_text, (in 2005), and no longer needs it, this patch removes _extra_text support. For some history (provided by Jon): http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jon Loeliger <jdl@freescale.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Parallel port: convert port_mutex to the mutex APIMatthias Kaehlcke
Parallel port: Convert port_mutex to the mutex API [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06dcdbas: add DMI-based module autloadingMatt Domsch
DMI autoload dcdbas on all Dell systems. This looks for BIOS Vendor or System Vendor == Dell, so this should work for systems both Dell-branded and those Dell builds but brands for others. It causes udev to load the dcdbas module at startup, which is used by tools called by HAL for wireless control and backlight control, among other uses. Thanks to Kay Sievers for figuring out how to do this with a single alias. Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Genericizing iova.[ch]David Miller
I would like to potentially move the sparc64 IOMMU code over to using the nice new drivers/pci/iova.[ch] code for free area management.. In order to do that we have to detach the IOMMU page size assumptions which only really need to exist in the intel-iommu.[ch] code. This patch attempts to implement that. [akpm@linux-foundation.org: build fix] Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06IPC: fix error check in all new xxx_lock() and xxx_exit_ns() functionsPierre Peiffer
In the new implementation of the [sem|shm|msg]_lock[_check]() routines, we use the return value of ipc_lock() in container_of() without any check. But ipc_lock may return a errcode. The use of this errcode in container_of() may alter this errcode, and we don't want this. And in xxx_exit_ns, the pointer return by idr_find is of type 'struct kern_ipc_per'... Today, the code will work as is because the member used in these container_of() is the first member of its container (offset == 0), the errcode isn't changed then. But in the general case, we can't count on this assumption and this may lead later to a real bug if we don't correct this. Again, the proposed solution is simple and correct. But, as pointed by Nadia, with this solution, the same check will be done several times (in all sub-callers...), what is not very funny/optimal... Signed-off-by: Pierre Peiffer <pierre.peiffer@bull.net> Cc: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Remove pointless casts from void pointersJeff Garzik
Mostly in and around irq handlers. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Luck Tony" <tony.luck@intel.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Karsten Keil <kkeil@suse.de> Acked-by: "John W. Linville" <linville@tuxdriver.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: David Brownell <david-b@pacbell.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06SIGIO-driven I/O with inotify queuesDmitry Antipov
Add SIGIO-driven I/O for descriptors returned by inotify_init(). The thing may be enabled by convenient fcntl (fd, F_SETFL, O_ASYNC) call. Signed-off-by: Dmitry Antipov <antipov@dev.rtsoft.ru> Cc: Robert Love <rlove@google.com> Cc: John McCutchan <ttb@tentacle.dhs.org> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06ext2: change the default behaviour on errorAneesh Kumar K.V
ext2 file system was by default ignoring errors and continuing. This is not a good default as continuing on error could lead to file system corruption. Change the default to mark the file system readonly. Debian and ubuntu already does this as the default in their fstab. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: <linux-ext4@vger.kernel.org> Cc: Eric Sandeen <sandeen@redhat.com> Cc: Jan Kara <jack@ucw.cz> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06ext2: return after ext2_error in case of failuresAneesh Kumar K.V
This fixes some instances where we were continuing after calling ext2_error. ext2_error call panic only if errors=panic mount option is set. So we need to make sure we return correctly after ext2_error call. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06sound/oss/sb_common.c: fix casting warningJeff Garzik
sound/oss/sb_common.c: In function 'probe_sbmpu': sound/oss/sb_common.c:1231: warning: cast to pointer from integer of different size Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06sound/oss/pss: set_io_base() always returns success, mark it voidJeff Garzik
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Remove inclusions of <linux/autoconf.h>Ralf Baechle
Nothing should ever include this file. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: "Mike Frysinger" <vapier.adi@gmail.com> Acked-by: "Bryan Wu" <cooloney.lkml@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06hash: add explicit u32 and u64 versions of hashMatthew Wilcox
The 32-bit version is more efficient (and apparently gives better hash results than the 64-bit version), so users who are only hashing a 32-bit quantity can now opt to use the 32-bit version explicitly, rather than promoting to a long. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06use __set_task_state() for TRACED/STOPPED tasksOleg Nesterov
1. It is much easier to grep for ->state change if __set_task_state() is used instead of the direct assignment. 2. ptrace_stop() and handle_group_stop() use set_task_state() which adds the unneeded mb() (btw even if we use mb() it is still possible that do_wait() sees the new ->state but not ->exit_code, but this is ok). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06taskstats scaled time cleanupMichael Neuling
This moves the ability to scale cputime into generic code. This allows us to fix the issue in kernel/timer.c (noticed by Balbir) where we could only add an unscaled value to the scaled utime/stime. This adds a cputime_to_scaled function. As before, the POWERPC version does the scaling based on the last SPURR/PURR ratio calculated. The generic and s390 (only other arch to implement asm/cputime.h) versions are both NOPs. Also moves the SPURR and PURR snapshots closer. Signed-off-by: Michael Neuling <mikey@neuling.org> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06riscom8: fix SMP brokennessJeff Garzik
After analyzing the elements that save_flags/cli/sti/restore_flags were protecting, convert their usages to a global spinlock (the easiest and most obvious next-step). There were some usages of flags being intentionally cached, because the code already knew the state of interrupts. These have been taken into account. This allows us to remove CONFIG_BROKEN_ON_SMP. Completely untested. [akpm@linux-foundation.org: use DEFINE_SPINLOCK] Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06A potential bug in inotify_user.cYan Zheng
Following comment is at fs/inotify_user.c:287 /* coalescing: drop this event if it is a dupe of the previous */ I think the previous event in the comment should be the last event in the link list. But inotify_dev_get_event return the first event in the list. In addition, it doesn't check whether the list is empty Signed-off-by: Yan Zheng<yanzheng@21cn.com> Acked-by: Robert Love <rlove@rlove.org> Cc: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fs/fat/: refine chmod checksJan Engelhardt
Prohibit mode changes in non-quiet mode that cannot be stored reliably with the on-disk format. Suppose a vfat filesystem is mounted with umask=0 and [not-quiet]. Then all files will have mode 0777. Trying to change the owner will fail, because fat does not know about owners or groups. chmod 0770, on the other hand, will succeed, even though fat does not know about the permission triplet [user/group/other]. So this patch changes fat's not-quiet behavior so that only UNIX modes are accepted that can be mapped lossless between the fat disk format and the local system. There is only one attribute, and that is the readonly attribute, which is mapped to the UNIX write permission bit(s). chmod 0555 is therefore valid (taking away the +w bits <=> setting the readonly attribute). Since chmod 0775 and chmod 0755 is an ambiguous case as to whether to set or clear the readonly bit, these modes are also denied. In quiet mode, chmod and chown will continue to "succeed" as they did before, meaning that a subsequent stat() will temporarily return the new mode as long as the inode is not reread from disk, and chown will silently do nothing, not even return the new uid/gid in stat(). Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06geode lists are subscriber onlyAlan Cox
This gave me bounces and moans when chasing CS5536 so document it. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06fix ! versus & precedence in various placesAlexey Dobriyan
Fix various instances of if (!expr & mask) which should probably have been if (!(expr & mask)) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Peter Osterlund <petero2@telia.com> Cc: Karsten Keil <kkeil@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>