OSDN Git Service
David Woodhouse [Thu, 28 Jun 2007 18:49:36 +0000 (19:49 +0100)]
[JFFS2] Fix suspend failure with JFFS2 GC thread.
The try_to_freeze() call was in the wrong place; we need it in the
signal-pending loop now that a pending freeze also makes
signal_pending() return true.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Fri, 29 Jun 2007 12:39:57 +0000 (13:39 +0100)]
[JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.
Otherwise they'll never actually get garbage-collected.
Noted by Jonathan Larmour.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Joakim Tjernlund [Sun, 24 Jun 2007 17:22:29 +0000 (19:22 +0200)]
[JFFS2] Prevent oops after 'node added in wrong place' debug check
jffs2_add_physical_node_ref() should never really return error -- it's
an internal debugging check which triggered. We really need to work out
why and stop it happening. But in the meantime, let's make the failure
mode a little less nasty.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Linus Torvalds [Thu, 2 Aug 2007 18:15:27 +0000 (11:15 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
[PATCH] sched: reduce task_struct size
[PATCH] sched: reduce debug code
[PATCH] sched: use schedstat_set() API
[PATCH] sched: add schedstat_set() API
[PATCH] sched: move load-calculation functions
[PATCH] sched: ->task_new cleanup
[PATCH] sched: uninline inc/dec_nr_running()
[PATCH] sched: uninline calc_delta_mine()
[PATCH] sched: calc_delta_mine(): use fixed limit
[PATCH] sched: tidy up left over smpnice code
[PATCH] sched: remove cache_hot_time
Linus Torvalds [Thu, 2 Aug 2007 18:14:54 +0000 (11:14 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
Net/Security: fix memory leaks from security_secid_to_secctx()
SELinux: remove redundant pointer checks before calling kfree()
SELinux: restore proper NetLabel caching behavior
Paul Moore [Wed, 1 Aug 2007 15:12:59 +0000 (11:12 -0400)]
Net/Security: fix memory leaks from security_secid_to_secctx()
The security_secid_to_secctx() function returns memory that must be freed
by a call to security_release_secctx() which was not always happening. This
patch fixes two of these problems (all that I could find in the kernel source
at present).
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Paul Moore [Wed, 1 Aug 2007 15:12:58 +0000 (11:12 -0400)]
SELinux: remove redundant pointer checks before calling kfree()
We don't need to check for NULL pointers before calling kfree().
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Paul Moore [Mon, 30 Jul 2007 20:33:26 +0000 (16:33 -0400)]
SELinux: restore proper NetLabel caching behavior
A small fix to the SELinux/NetLabel glue code to ensure that the NetLabel
cache is utilized when possible. This was broken when the SELinux/NetLabel
glue code was reorganized in the last kernel release.
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: reduce task_struct size
more task_struct size reduction, by moving the debugging/instrumentation
fields to under CONFIG_SCHEDSTATS:
(i386, nodebug):
size
----
pre-CFS 1328
CFS 1472
CFS+patch 1376
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: reduce debug code
move the rest of the debugging/instrumentation code to under
CONFIG_SCHEDSTATS too. This reduces code size and speeds code up:
text data bss dec hex filename
33044 4122 28 37194 914a sched.o.before
32708 4122 28 36858 8ffa sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: use schedstat_set() API
make use of the new schedstat_set() API to eliminate two #ifdef sections.
No functional changes:
text data bss dec hex filename
29009 4122 28 33159 8187 sched.o.before
29009 4122 28 33159 8187 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: add schedstat_set() API
add the schedstat_set() API, to allow the reduction of
CONFIG_SCHEDSTAT related #ifdefs. No code changed.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: move load-calculation functions
move load-calculation functions so that they can use the per-policy
declarations and methods.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: ->task_new cleanup
make sched_class.task_new == NULL a 'default method', this
allows the removal of task_rt_new.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: uninline inc/dec_nr_running()
uninline inc_nr_running() and dec_nr_running():
text data bss dec hex filename
29039 4162 24 33225 81c9 sched.o.before
29027 4162 24 33213 81bd sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: uninline calc_delta_mine()
uninline calc_delta_mine():
text data bss dec hex filename
29162 4162 24 33348 8244 sched.o.before
29039 4162 24 33225 81c9 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: calc_delta_mine(): use fixed limit
use fixed limit in calc_delta_mine() - this saves an instruction :)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Williams [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: tidy up left over smpnice code
1. The only place that RTPRIO_TO_LOAD_WEIGHT() is used is in the call to
move_tasks() in the function active_load_balance() and its purpose here
is just to make sure that the load to be moved is big enough to ensure
that exactly one task is moved (if there's one available). This can be
accomplished by using ULONG_MAX instead and this allows
RTPRIO_TO_LOAD_WEIGHT() to be deleted.
2. This, in turn, allows PRIO_TO_LOAD_WEIGHT() to be deleted.
3. This allows load_weight() to be deleted which allows
TIME_SLICE_NICE_ZERO to be deleted along with the comment above it.
Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 2 Aug 2007 15:41:40 +0000 (17:41 +0200)]
[PATCH] sched: remove cache_hot_time
remove the last unused remains of cache_hot_time.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jiri Kosina [Wed, 1 Aug 2007 10:32:27 +0000 (12:32 +0200)]
HID: Never call hid_free_buffers() when usbhid_device has been freed
We can't call hid_free_buffers() when the underlying usbhid_device
has already been freed.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Mon, 30 Jul 2007 13:40:06 +0000 (15:40 +0200)]
USB HID: fix memory leak of usbhid_device
Add forgotten freeing of usbhid_device structure.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jesper Juhl [Mon, 30 Jul 2007 13:15:26 +0000 (15:15 +0200)]
USB HID: fix a possible NULL pointer dereference when we fail to allocate memory
If, in usb_hid_configure(), we fail to allocate storage for 'usbhid',
"if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))",
then we'll jump to the 'fail:' label where we have this code:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
Since we got here because we couldn't allocate storage for 'usbhid',
what we have here is a NULL pointer dereference - ouch...
This patch solves that little problem by adding a new
'fail_no_usbhid:' label after the problematic calls to
usb_free_urb() and jumps to that one instead, in the problem case.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Christian Lamparter [Mon, 30 Jul 2007 12:38:26 +0000 (14:38 +0200)]
USB HID: add ASUS LCM to the blacklist
Some of ASUS' notebooks (e.g G Series) include a tiny oled display, which is
attached to an internal USB bus. Unfortunatly the device reports a wrong
DeviceDescriptor and is therefore identified as a HID device...
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Phil Dibowitz [Mon, 30 Jul 2007 10:00:48 +0000 (12:00 +0200)]
USB HID: Add all Logitech Harmonies to blacklist
This patch adds the entire range of Logitech's ProductIDs that are reserved
for their Harmony remotes. The in-kernel HID driver can't do anything with
these, and now there is a GPL user-space application that can handle them:
http://www.sf.net/projects/harmonycontrol
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Wed, 11 Jul 2007 10:12:11 +0000 (12:12 +0200)]
USB HID: update description of USBHID in MAINTAINERS
Make it more clear to users what kinds of hardware USBHID handles,
so that they can send reports and queries properly.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tino Keitel [Wed, 11 Jul 2007 22:11:34 +0000 (00:11 +0200)]
HID: remove the Applie IR sensor from the hid_blacklist
The IR sensor in some newer Apple computers has no other
driver in the kernel, yet. However, the macmini driver in lirc
requires a HID device for the IR sensor.
Cc: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Linus Torvalds [Thu, 2 Aug 2007 03:48:54 +0000 (20:48 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] ITC: Reduce rating for ITC clock if ITCs are drifty
[IA64] SN2: Fix up sn2_rtc clock
[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().
[IA64] Fix possible race in destroy_and_reserve_irq()
[IA64] Fix registered interrupt check
[IA64] Remove a few duplicate includes
[IA64] Allow smp_call_function_single() to current cpu
[IA64] fix a few section mismatch warnings
Linus Torvalds [Thu, 2 Aug 2007 03:48:42 +0000 (20:48 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
scc_pata: PIO fixes
piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)
jmicron: PIO fixes
it8213: PIO fixes (take 2)
cs5535: PIO fixes
cs5520: fix PIO auto-tuning in ->ide_dma_check method
drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
ide: eliminate warnings in ide-tape.c
ide: fix runtogether printk's in cmd64x IDE driver
sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops
alim15x3: Correct HP detect
ide: Fix an overrun found in the CS5535 IDE driver
David Howells [Wed, 1 Aug 2007 18:04:51 +0000 (19:04 +0100)]
FRV: Enable the MB86943 PCI arbiter correctly
Enable the MB93090 motherboard's MB86943 PCI arbiter correctly by assigning to
the register rather than comparing against it. This is required to support
bus mastering.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 2 Aug 2007 03:47:00 +0000 (20:47 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets
libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ
ata_piix: add Tecra M3 to broken suspend blacklist
ata_piix: implement piix_borken_suspend()
pci: rename __pci_reenable_device() to pci_reenable_device()
libata-sff; Unbreak non DMA capable controllers again
pata_cmd64x: Correct the speed ranges
Thomas Gleixner [Wed, 1 Aug 2007 15:13:19 +0000 (17:13 +0200)]
genirq: temporary fix for level-triggered IRQ resend
Marcin Slusarz reported a ne2k-pci "hung network interface" regression.
delayed disable relies on the ability to re-trigger the interrupt in the
case that a real interrupt happens after the software disable was set.
In this case we actually disable the interrupt on the hardware level
_after_ it occurred.
On enable_irq, we need to re-trigger the interrupt. On i386 this relies
on a hardware resend mechanism (send_IPI_self()).
Actually we only need the resend for edge type interrupts. Level type
interrupts come back once enable_irq() re-enables the interrupt line.
I assume that the interrupt in question is level triggered because it is
shared and above the legacy irqs 0-15:
17: 12 IO-APIC-fasteoi eth1, eth0
Looking into the IO_APIC code, the resend via send_IPI_self() happens
unconditionally. So the resend is done for level and edge interrupts.
This makes the problem more mysterious.
The code in question lib8390.c does
disable_irq();
fiddle_with_the_network_card_hardware()
enable_irq();
The fiddle_with_the_network_card_hardware() might cause interrupts,
which are cleared in the same code path again,
Marcin found that when he disables the irq line on the hardware level
(removing the delayed disable) the card is kept alive.
So the difference is that we can get a resend on enable_irq, when an
interrupt happens during the time, where we are in the disabled region.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Heiko Carstens [Wed, 1 Aug 2007 22:18:38 +0000 (00:18 +0200)]
Fix WARN_ON() on bitfield ops for all other archs
Fixes WARN_ON() on bitfiels ops for all architectures that have
been left out in
8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f.
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
scc_pata: PIO fixes
* Use pio == 255 == "auto-tune" in scc_config_drive_for_dma() instead of
forcing PIO4 on PIO fallback. Fix comment while at it.
* Rename scc_tuneproc() to scc_tune_pio() and add scc_tuneproc() wrapper.
Move finding of the best PIO mode and setting of transfer mode on the device
to the new wrapper.
* Fix scc_tune_chipset() to tune PIO modes. Do a small cleanup while at it.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
piix/slc90e66: fix PIO1 handling in ->speedproc method (take 2)
* Don't call {piix,slc90e66}_dma_2_pio() for PIO modes in
{piix,slc90e66}_tune_chipset().
* Add PIO1 handling to {piix,slc90e66}_tune_chipset().
* Bump driver version.
v2:
* Remove PIO modes from {piix,slc90e66}_dma_2_pio(), they are no longer needed
there (Noticed by Sergei)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
jmicron: PIO fixes
* Set transfer mode on the device in jmicron_tuneproc(),
also add pio == 255 == "auto-tune" handling.
* Use jmicron_tuneproc() in jmicron_config_drive_for_dma().
* Remove no longer needed config_jmicron_chipset_for_pio().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:46 +0000 (23:46 +0200)]
it8213: PIO fixes (take 2)
* Rename it8213_tuneproc() to it8213_tune_pio() and add it8213_tuneproc()
wrapper. Move finding of the best PIO mode to the new wrapper.
* Add setting of transfer mode on the device to it8213_tuneproc().
* Don't call it8213_dma_2_pio() for PIO modes in it8213_tune_chipset().
* Use it8213_tuneproc() in it8213_config_drive_for_dma().
v2:
* Remove PIO modes from it8213_dma_2_pio(), they are no longer needed there
(Noticed by Sergei)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
cs5535: PIO fixes
* Fix cs5535_tuneproc() to pass PIO transfer mode value instead of PIO mode
number to cs5535_set_speed() (fixes random PIO timings being programmed
and a possible OOPS). Do a little cleanup while at it.
* Fix cs5535_set_speed() to check if the mate device is present (fixes PIO0
taskfile timings being used if there is no other device on the cable).
* Use cs5535_tuneproc() in cs5535_dma_check(). The old code had the same
issue as cs5535_tuneproc() and add additionally caused 0x00-0x04 transfer
mode values (== default PIO, default PIO w/ IORDY + two invalid values)
being set on the device instead of values 0x08-0x0c (XFER_PIO_[0,4]).
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
cs5520: fix PIO auto-tuning in ->ide_dma_check method
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mariusz Kozlowski [Wed, 1 Aug 2007 21:46:45 +0000 (23:46 +0200)]
drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
drivers/scsi/ide-scsi.c | 34642 -> 34536 (-106 bytes)
drivers/scsi/ide-scsi.o | 171728 -> 171524 (-204 bytes)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mariusz Kozlowski [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
Is this a bug? In original verison memset cleared sizeof(state) bytes
instead of sizeof(*state). If it was intentional then this patch is invalid.
If not intentional -> valid :) Please review.
Bart: Yes, it is a bug so this patch is a valid bugfix. :-)
drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Stephen Rothwell [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
ide: eliminate warnings in ide-tape.c
drivers/ide/ide-tape.c: In function '__idetape_kmalloc_stage':
drivers/ide/ide-tape.c:2588: warning: large integer implicitly truncated to unsigned type
drivers/ide/ide-tape.c:2616: warning: large integer implicitly truncated to unsigned type
b_size in struct idetape_bh is an unsigned short. We sometimes assigne
PAGE_SIZE to it and PAGE_SIZE can be 64K or larger, so make it a u32.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Meelis Roos [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
ide: fix runtogether printk's in cmd64x IDE driver
Fix a couple of runtogether printks in cmd64x.c IDE driver by adding
proper newlines.
Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
David Lamparter [Wed, 1 Aug 2007 21:46:44 +0000 (23:46 +0200)]
sis5513: Add FSC Amilo A1630 PCI subvendor/dev to laptops
Recognise the FSC Amilo A1630's incarnation of a SiS5513 chip as laptop to
get UDMA100 support.
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Lionel Bouton <Lionel.Bouton@inet6.fr>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Wed, 1 Aug 2007 21:46:43 +0000 (23:46 +0200)]
alim15x3: Correct HP detect
Direct port of Alan's fix for pata_ali.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Jordan Crouse [Wed, 1 Aug 2007 21:46:42 +0000 (23:46 +0200)]
ide: Fix an overrun found in the CS5535 IDE driver
As found by the Coverity checker, and reported by Adrian Bunk, this
fixes a overrun error in the CS5535 IDE driver. Somebody got a little
excited with the if() statement - the CS5535 only supports UDMA 0-4.
Bart:
Not a bug per se since the upper layer will never feed this function
with speed > XFER_UDMA_4 (thanks to ->ultra_mask being set to 0x1f).
Worth fixing anyway.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Christoph Lameter [Wed, 1 Aug 2007 20:49:45 +0000 (13:49 -0700)]
[IA64] ITC: Reduce rating for ITC clock if ITCs are drifty
Make sure to reduce the rating of the ITC clock if ITCs are drifty. If they
are drifting then we have not synchronized the ITC values, nor are we doing
the jitter compensation (useless since drift may increase the differentials
arbitrarily).
Without this patch it is possible that the ITC clock becomes selected as
the system clock on systems with drifty ITCs which will result in
nanosleep hanging.
One can still select the itc clock manually on such systems via
clocksource=itc
(Produces nice hangs on SGI Altix.)
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Christoph Lameter [Wed, 1 Aug 2007 19:37:17 +0000 (12:37 -0700)]
[IA64] SN2: Fix up sn2_rtc clock
If the sn2_rtc clock is present then it is a must have since sn2_rtc
provides a synchronized time source on Altix systems. So elevate
the priority to 450. Otherwise the ITC would take precendence. Altix
systems currently do not boot because the ITC clocksource is broken. It
seems to assume that ITCs are synchronized and as a result nanosleep
hangs (may be fixed in a different patch).
While we are at it: Remove the sn2_mc definition. The sn2_rtc has a fixed
address. No point in reading the address from memory. Removing it avoids
touching one cacheline.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Kenji Kaneshige [Wed, 1 Aug 2007 12:18:44 +0000 (21:18 +0900)]
[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().
In error path we must unlock irq_desc[irq].lock before we change
'irq'.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Bartlomiej Zolnierkiewicz [Tue, 31 Jul 2007 20:02:41 +0000 (22:02 +0200)]
pata_sis: fix MWDMA for <= UDMA66 chipsets and UDMA for UDMA33 chipsets
* Fix MWDMA timings setup in sis_old_set_dmamode() and sis_66_set_dmamode().
The old timings were overclocked (even worse behavior than sis5513 IDE driver
which depends on BIOS to program correct timings), the new timings are taken
from the datasheet (they match timings from ATA spec).
* Fix UDMA timings setup in sis_old_set_dmamode().
Misplaced pci_write_config_word() call resulted in UDMA timings never
being set.
* Fix comments for sis_133_early_set_dmamode() and sis_133_set_dmamode():
- only the former function handles early SiS 961 bridges
- both functions lack MWDMA timings setup
* Fix typos in sis_100_set_piomode() and sis_133_set_piomode() comments.
* Bump driver version.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Sat, 28 Jul 2007 07:25:25 +0000 (16:25 +0900)]
libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ
SAMSUNG HD401LJ / ZZ100-15 does spurious completion of NCQ commands.
Disable NCQ. Reported by Ulrich in bugzilla #8805.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Ulrich <stellplatz-nr.13a@datenparkplatz.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Fri, 27 Jul 2007 05:55:07 +0000 (14:55 +0900)]
ata_piix: add Tecra M3 to broken suspend blacklist
Add Tecra M3 to the broken suspend blacklist. Tecra M3 doesn't have
proper DMI_PRODUCT_NAME but has an OEM_STRING instead. Match it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Fri, 27 Jul 2007 05:53:28 +0000 (14:53 +0900)]
ata_piix: implement piix_borken_suspend()
Separate out broken suspend blacklist matching into
piix_broken_suspend().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo [Fri, 27 Jul 2007 05:43:35 +0000 (14:43 +0900)]
pci: rename __pci_reenable_device() to pci_reenable_device()
Rename __pci_reenable_device() to pci_reenable_device().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Alan Cox [Thu, 26 Jul 2007 17:41:30 +0000 (18:41 +0100)]
libata-sff; Unbreak non DMA capable controllers again
Seems nobody else is checking/testing this case as it keeps getting
horked.
If we have no BAR4 mapping on an SFF controller this is *NOT* an error,
it just means it isn't doing BMDMA.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Alan Cox [Thu, 26 Jul 2007 17:43:01 +0000 (18:43 +0100)]
pata_cmd64x: Correct the speed ranges
I must have been half asleep when doing the original code
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Linus Torvalds [Wed, 1 Aug 2007 04:12:07 +0000 (21:12 -0700)]
Fix WARN_ON() on bitfield ops
Alexey Dobriyan noticed that the new WARN_ON() semantics that were
introduced by commit
684f978347deb42d180373ac4c427f82ef963171 (to also
return the value to be warned on) didn't compile when given a bitfield,
because the typeof doesn't work for bitfields.
So instead of the typeof trick, use an "int" variable together with a
"!!(x)" expression, as suggested by Al Viro.
To make matters more interesting, Paul Mackerras points out that that is
sub-optimal on Power, but the old asm-coded comparison seems to be buggy
anyway on 32-bit Power if the conditional was 64-bit, so I think there
are more problems there.
Regardless, the new WARN_ON() semantics may have been a bad idea. But
this at least avoids the more serious complications.
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 1 Aug 2007 03:43:52 +0000 (20:43 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (28 commits)
[WATCHDOG] Fix pcwd_init_module crash
[WATCHDOG] ICH9 support for iTCO_wdt
[WATCHDOG] 631xESB/632xESB support for iTCO_wdt - add all LPC bridges
[WATCHDOG] 631xESB/632xESB support for iTCO_wdt
[WATCHDOG] omap_wdt.c - default error for IOCTL is -ENOTTY
[WATCHDOG] Return value of nonseekable_open
[WATCHDOG] mv64x60_wdt: Rework the timeout register manipulation
[WATCHDOG] mv64x60_wdt: disable watchdog timer when driver is probed
[WATCHDOG] mv64x60_wdt: Support the WDIOF_MAGICCLOSE feature
[WATCHDOG] mv64x60_wdt: Add a module parameter to change nowayout setting
[WATCHDOG] mv64x60_wdt: Add WDIOC_SETOPTIONS ioctl support
[WATCHDOG] mv64x60_wdt: Support for WDIOC_SETTIMEOUT ioctl
[WATCHDOG] mv64x60_wdt: Fix WDIOC_GETTIMEOUT return value
[WATCHDOG] mv64x60_wdt: Check return value of nonseekable_open
[WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support
[WATCHDOG] mv64x60_wdt: Get register address from platform data
[WATCHDOG] mv64x60_wdt: set up platform_device in platform code
[WATCHDOG] ensure mouse and keyboard ignored in w83627hf_wdt
[WATCHDOG] s3c2410_wdt: fixup after arch include moves
[WATCHDOG] git-watchdog-typo
...
Linus Torvalds [Wed, 1 Aug 2007 03:41:53 +0000 (20:41 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (50 commits)
[MIPS] Add smp_call_function_single()
[MIPS] thread_info.h: kmalloc + memset conversion to kzalloc
[MIPS] Kexec: Fix several 64-bit bugs.
[MIPS] Kexec: Fix several warnings.
[MIPS]
DDB5477: Remove support
[MIPS] Fulong: Remove unneeded header file
[MIPS] Cobalt: Enable UART on RaQ1
[MIPS] Remove unused GROUP_TOSHIBA_NAMES
[MIPS] remove some duplicate includes
[MIPS] Oprofile: Fix rm9000 performance counter handler
[MIPS] Use -Werror on subdirectories which build cleanly.
[MIPS] Yosemite: Fix warning.
[MIPS] PMON: Fix cpustart declaration.
[MIPS] Yosemite: Only build ll_ht_smp_irq_handler() if HYPERTRANSPORT.
[MIPS] Yosemite: Fix build error due to undeclared titan_mailbox_irq().
[MIPS] Yosemite: Don't declare titan_mailbox_irq() as asmlinkage.
[MIPS] Yosemite: Fix warnings in i2c-yoesmite by deleting the unused code.
[MIPS] Delete unused arch/mips/gt64120/common/
[MIPS] Fix build warning in unaligned load/store emulator.
[MIPS] IP32: Don't ignore request_irq's return value.
...
Linus Torvalds [Wed, 1 Aug 2007 03:40:50 +0000 (20:40 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
hwmon: fscher read control bugfix
hwmon: (adm1031) Fix broken links in documentation
hwmon: make abituguru3_read_increment_offset() static
hwmon: Fix regression caused by typo in lm90.c
hwmon: (applesmc) add temperature sensors set for Macbook
hwmon: fscher control update bugfix
hwmon: fix dme1737 temp fault attribute
hwmon: Add missing __devexit tags in various drivers
hwmon: clean up duplicate includes
hwmon: fix lm78 detection regression
hwmon: fix array overruns in lm93.c
hwmon: add support for THMC50 and ADM1022
Len Brown [Wed, 1 Aug 2007 03:27:10 +0000 (23:27 -0400)]
ACPI: delete CONFIG_ACPI_PROCFS_SLEEP (again)
CONFIG_ACPI_PROCFS_SLEEP is a NO-OP -- delete it (again).
Apparently
296699de6bdc717189a331ab6bbe90e05c94db06 creating CONFIG_SUSPEND
and CONFIG_PM_SLEEP was based on an out-dated version of drivers/acpi/Kconfig,
as it erroneously restored this recently deleted config option.
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Tue, 31 Jul 2007 23:10:46 +0000 (16:10 -0700)]
Fix up "remove the arm26 port"
scripts/kconfig/conf -o arch/arm/Kconfig
arch/arm/Kconfig:994: can't open file "drivers/acorn/block/Kconfig"
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 31 Jul 2007 22:51:37 +0000 (15:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
[x86 setup] EDD: Fix the computation of the MBR sector buffer
[x86 setup] Newline after setup signature failure message
x86 boot code comments typos
Linus Torvalds [Tue, 31 Jul 2007 22:51:00 +0000 (15:51 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
[RTNETLINK]: Fix warning for !CONFIG_KMOD
[IPV4] ip_options.c: kmalloc + memset conversion to kzalloc
[DECNET]: kmalloc + memset conversion to kzalloc
[NET]: ethtool_perm_addr only has one implementation
[NET]: ethtool ops are the only way
[PPPOE]: Improve hashing function in hash_item().
[XFRM]: State selection update to use inner addresses.
[IPSEC]: Ensure that state inner family is set
[TCP]: Bidir flow must not disregard SACK blocks for lost marking
[TCP]: Fix ratehalving with bidirectional flows
[PPPOL2TP]: Add CONFIG_INET Kconfig dependency.
[NET]: Page offsets and lengths need to be __u32.
[AF_UNIX]: Make code static.
[NETFILTER]: Make nf_ct_ipv6_skip_exthdr() static.
[PKTGEN]: make get_ipsec_sa() static and non-inline
[PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location
[PPPoX/E]: return ENOTTY on unknown ioctl requests
[IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses.
[NET]: Fix prio_tune() handling of root qdisc.
[NET]: Fix sch_api to properly set sch->parent on the root.
...
Linus Torvalds [Tue, 31 Jul 2007 22:50:35 +0000 (15:50 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[BBC_I2C]: kmalloc + memset conversion to kzalloc
[BBC_ENVCTRL]: kmalloc + memset conversion to kzalloc
[SPARC]: Fix exec failures on sun4c.
[SPARC] Videopix Frame Grabber: Fix unreleased lock in vfc_debug()
[SPARC64]: Add missing dma_get_cache_alignment().
[SUNLANCE]: Fix sparc32 crashes by using of_*() interfaces.
Mark Zhan [Tue, 31 Jul 2007 07:39:47 +0000 (00:39 -0700)]
rtc-m48t59 driver NO_IRQ mode fixup
Since irq in m48t59_private struct is defined as 'unsigned int', which will
make the following if sentence to be never true:
if (m48t59->irq < 0)
m48t59->irq = NO_IRQ;
And thus it will make the m48t59_rtc_probe() is failed when the driver is
working in a no irq mode:
Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Engelhardt [Tue, 31 Jul 2007 07:39:46 +0000 (00:39 -0700)]
Use menuconfig objects: RTC
Change Kconfig objects from "menu, config" into "menuconfig" so that the
user can disable the whole feature without having to enter the menu first.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Charlie Shepherd [Tue, 31 Jul 2007 07:39:45 +0000 (00:39 -0700)]
Remove 'isdn_* is defined but unused' warnings
Move the #ifdef guard above these functions to remove the warnings.
Signed-off-by: Charlie Shepherd <masterdriverz@gentoo.org>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Tue, 31 Jul 2007 07:39:45 +0000 (00:39 -0700)]
spi device setup gets better error checking
This updates some error reporting paths in SPI device setup:
- Move validation logic for SPI chipselects to spi_new_device(),
which is where it should always have been.
- In spi_new_device(), emit error messages if the device can't
be created. This is LOTS better than a silent failure; though
eventually, the calling convention should probably change to
use the <linux/err.h> conventions.
- Includes one previously-missing check: SPI masters must always
have at least one chipselect, even for dedicated busses which
always keep it selected!
It also adds a FIXME (IDR for dynamic ID allocation) so the issue doesn't live
purely in my mailbox.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Tue, 31 Jul 2007 07:39:44 +0000 (00:39 -0700)]
spi kerneldoc update
This adds kerneldoc to the SPI framework. The "spi_driver" and
"spi_board_info" structs were previously not described.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Meelis Roos [Tue, 31 Jul 2007 07:39:41 +0000 (00:39 -0700)]
fix integer overflow warning in i2o_block
drivers/message/i2o/i2o_block.c: In function 'i2o_block_transfer':
drivers/message/i2o/i2o_block.c:837: warning: integer overflow in expression
msg->u.head[1] = cpu_to_le32(I2O_CMD_PRIVATE << 24 | HOST_TID << 12 | tid);
and I2O_CMD_PRIVATE is defined as 0xFF. This gets "0xFF0100 | tid" and fits
into 32-bit unsigned but not into 32-bit signed integer properly. Target
value is defined as u32 so the claculation does not fit during computation.
Change local variable tid to u32 so the whole expression is of u32 type and
fits well into u32 result.
Signed-off-by: Meelis Roos <mroos@linux.ee>
Cc: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Tue, 31 Jul 2007 07:39:41 +0000 (00:39 -0700)]
ip2main warning fix
CONFIG_PCI=n:
drivers/char/ip2/ip2main.c: In function `ip2_loadmain':
drivers/char/ip2/ip2main.c:503: warning: unused variable `status'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cyrill Gorcunov [Tue, 31 Jul 2007 07:39:40 +0000 (00:39 -0700)]
UDF: fix UID and GID mount option ignorance
This patch fix weird behaviour of UDF mounting procedure. To get UID
changed (for now) we have to type
mount -t udf -o uid=some_user,uid=ignore /dev/device /mnt/moun_point
and specifying two uid at once is strange a bit. So with the patch we are
able to mount without additional 'uid=ignore' option. The same for GID
option is done.
This patch will not break current mount scheme (with two option).
Btw this does fix (I hope) the following
[BUG 6124] mount of UDF fs ignores UID and GID options
http://bugzilla.kernel.org/show_bug.cgi?id=6124
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Michael <auslands-kv@gmx.de>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jesper Juhl [Tue, 31 Jul 2007 07:39:39 +0000 (00:39 -0700)]
cciss: fix memory leak
There's a memory leak in the cciss driver.
in alloc_cciss_hba() we may leak sizeof(ctlr_info_t) bytes if a
call to alloc_disk(1 << NWD_SHIFT) fails.
This patch should fix the issue.
Spotted by the Coverity checker.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Boldi [Tue, 31 Jul 2007 07:39:23 +0000 (00:39 -0700)]
Kconfig: remove top level menu "Code maturity level options"
Remove the top level menu "Code maturity level options", and moves its
options into menu "General setup".
This makes Kconfig less cluttered and easier to setup.
Signed-off-by: Al Boldi <a1426z@gawab.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matthias Kaehlcke [Tue, 31 Jul 2007 07:39:23 +0000 (00:39 -0700)]
Videopix Frame Grabber: Fix unreleased lock in vfc_debug()
Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Christoph Hellwig [Tue, 31 Jul 2007 07:39:22 +0000 (00:39 -0700)]
rename setlease to generic_setlease
Make it a little more clear that this is the default implementation for
the setleast operation.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maciej W. Rozycki [Tue, 31 Jul 2007 07:39:22 +0000 (00:39 -0700)]
sb1250-duart: __maybe_unused, etc. fixes
This is a set of small fixes addressing points raised with the original
driver submission. In particular, __maybe_unused is used rather than a
local hack and sbd_ops is made const. Additionally I have made two local
string variables automatic as rodata space was wasted for pointers
unnecessarily.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Josh Triplett [Tue, 31 Jul 2007 07:39:21 +0000 (00:39 -0700)]
x86_64: include asm/bugs.h in bugs.c for check_bugs prototype
C files should include the header files that prototype their functions.
Eliminates a sparse warning:
warning: symbol 'check_bugs' was not declared. Should it be static?
Signed-off-by: Josh Triplett <josh@kernel.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Josh Triplett [Tue, 31 Jul 2007 07:39:20 +0000 (00:39 -0700)]
i386: include asm/bugs.h in bugs.c for check_bugs prototype
C files should include the header files that prototype their functions.
Eliminates a sparse warning:
warning: symbol 'check_bugs' was not declared. Should it be static?
Signed-off-by: Josh Triplett <josh@kernel.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Gabriel Craciunescu [Tue, 31 Jul 2007 07:39:19 +0000 (00:39 -0700)]
Typo fixes errror -> error
Typo fixes errror -> error
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Oleg Nesterov [Tue, 31 Jul 2007 07:39:19 +0000 (00:39 -0700)]
idr_remove_all: kill unused variable
"error" is always equal to 0.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jesper Juhl [Tue, 31 Jul 2007 07:39:18 +0000 (00:39 -0700)]
Fix a use after free bug in kernel->userspace relay file support
Coverity spotted what looks like a real possible case of using a variable
after it has been freed. The problem is in
kernel/relay.c::relay_open_buf()
If the code hits "goto free_buf;" it ends up in this code :
free_buf:
relay_destroy_buf(buf); <--- calls kfree() on 'buf'.
free_name:
kfree(tmpname);
end:
return buf; <-- use after free of 'buf'.
I read through the callers and they all handle a NULL return from this
function as an error (and hitting the 'free_buf' label only happens on
failure to chan->cb->create_buf_file(), so that looks like a clear error to
me).
The patch simply sets 'buf' to NULL after the call to
relay_destroy_buf(buf); - as far as I can see that should take care of the
problem.
The patch also corrects a reference to a documentation file while
I was at it.
Note from Mathieu: the documentation reference change should have been
done in a separate patch, but I guess no one will really care.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "David J. Wilder" <wilder@us.ibm.com>
Tested-by: "David J. Wilder" <wilder@us.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Tom Zanussi <zanussi@us.ibm.com>
Cc: Karim Yaghmour <karim@opersys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Satyam Sharma [Tue, 31 Jul 2007 07:39:16 +0000 (00:39 -0700)]
kthread: silence bogus section mismatch warning
WARNING: kernel/built-in.o(.text+0x16910): Section mismatch:
reference to .init.text: (between 'kthreadd' and 'init_waitqueue_head')
comes because kernel/kthread.c:kthreadd() is not __init but calls
kthreadd_setup() which is __init. But this is ok, because kthreadd_setup()
is only ever called at init time, and then kthreadd() proceeds into its
"for (;;)" loop. We could mark kthreadd __init_refok, but kthreadd_setup()
with just one callsite and 4 lines in it (it's been that small since
10ab825bdef8df51) doesn't need to be a separate function at all -- so let's
just move those four lines at beginning of kthreadd() itself.
Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Acked-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>
Mariusz Kozlowski [Tue, 31 Jul 2007 07:39:13 +0000 (00:39 -0700)]
fs: 9p/conv.c error path fix
When buf_check_overflow() returns != 0 we will hit kfree(ERR_PTR(err)) and
it will not be happy about it.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
david m. richter [Tue, 31 Jul 2007 07:39:12 +0000 (00:39 -0700)]
VFS: fix a race in lease-breaking during truncate
It is possible that another process could acquire a new file lease right
after break_lease() is called during a truncate, but before lease-granting
is disabled by the subsequent get_write_access(). Merely switching the
order of the break_lease() and get_write_access() calls prevents this race.
Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Tue, 31 Jul 2007 07:39:11 +0000 (00:39 -0700)]
use __val in __get_unaligned
Use "__val" rather than "val" in the __get_unaligned macro in
asm-generic/unaligned.h. This way gcc wont warn if you happen to also name
something in the same scope "val".
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Young [Tue, 31 Jul 2007 07:39:11 +0000 (00:39 -0700)]
hpet.txt: broken link fix
The specification link in hpet document is broken.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adrian Bunk [Tue, 31 Jul 2007 07:39:10 +0000 (00:39 -0700)]
ANON_INODES shouldn't be user visible
There doesn't seem to be a good reason for ANON_INODES being
an user visible option.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Tokarev [Tue, 31 Jul 2007 07:39:07 +0000 (00:39 -0700)]
Remove one more leftover reference to devfs
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Gabriel C [Tue, 31 Jul 2007 07:39:06 +0000 (00:39 -0700)]
broken lilo check on make install
On make install I get the this error:
...
sh /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh
2.6.22-g4eb6bf6b arch/i386/boot/bzImage System.map "/boot"
/work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh: line 54:
/etc/lilo/install: No such file or directory
make[1]: *** [install] Error 127
...
I don't use and don't have lilo installed on this system. The attached
patch fixes the problem for me.
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Tue, 31 Jul 2007 07:39:05 +0000 (00:39 -0700)]
NCP: delete test of long-deceased CONFIG_NCPFS_DEBUGDENTRY
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jesper Juhl [Tue, 31 Jul 2007 07:39:05 +0000 (00:39 -0700)]
ipmi: Fix mem leak in try_init_dmi()
This is only called at init time and only happens if the BIOS screws
something up, so the leak is slight and it is probably not worth sending to
2.6.22.x. The driver would not initialize the interface in the case, and I
have no reports of this happening. I have booted and run tests on a system
with this patch. Note that the original patch was munged by the mailer,
here's a new one.
If we ever hit the "default:" case in the switch in try_init_dmi(),
then we'll leak the storage allocated with kzalloc() and assigned
to 'info'.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Tue, 31 Jul 2007 07:39:04 +0000 (00:39 -0700)]
docbook bad file references
Fix docbook warnings:
Warning(linux-2.6.22-git12//drivers/base/power/main.c): no structured comments found
Warning(linux-2.6.22-git12//include/linux/splice.h): no structured comments found
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>
Randy Dunlap [Tue, 31 Jul 2007 07:39:03 +0000 (00:39 -0700)]
irq.h fix kernel-doc
Add kernel-doc entry in <linux/irq.h> for:
Warning(linux-2.6.22-git12//include/linux/irq.h:177): No description found for parameter 'last_unhandled'
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>
Randy Dunlap [Tue, 31 Jul 2007 07:39:02 +0000 (00:39 -0700)]
i2c.h kernel-doc additions
Add kernel-doc notation in <linux/i2c.h> for:
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'driver'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'usage_count'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'list'
Warning(linux-2.6.22-git12//include/linux/i2c.h:183): No description found for parameter 'released'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark A. Greer [Tue, 31 Jul 2007 07:39:01 +0000 (00:39 -0700)]
serial: MPSC: Fix coding style and whitespace issues
Fix up mpsc.c to be aligned with Documentation/CodingStyle. Also fix up some
whitespace issues.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark A. Greer [Tue, 31 Jul 2007 07:39:00 +0000 (00:39 -0700)]
serial: MPSC: Remove duplicate SUPPORT_SYSRQ definition
Remove the duplicate definition of SUPPORT_SYSRQ in mpsc driver.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stephane Chazelas [Tue, 31 Jul 2007 07:38:59 +0000 (00:38 -0700)]
serial: MPSC: Stop rx engine when CREAD cleared
Currently, the MPSC driver doesn't stop recieving characters when the CREAD
flag in termios->c_cflag is cleared. It should. Also, only start receiving
if its not already started.
Signed-off-by: Stephane Chazelas <stephane@artesyncp.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Carlos Sanchez [Tue, 31 Jul 2007 07:38:59 +0000 (00:38 -0700)]
serial: MPSC: Remove race between Rx stop & restart
The patch in commit ID
f7232056bff5fe2d3bfeab35252a66ebaeb5bbde stops (aborts)
the MPSC's receive engine just before restarting it. Unfortunately, it
doesn't wait for the abort to complete before restarting it which creates a
race between the abort and the restart. If the restart occurs first, the
in-progress abort stops it again and the rx engine remains stopped.
Instead, do the abort when the SDMA engine is being stopped. Make sure to
wait for the abort to complete before continuing.
Signed-off-by: Carlos Sanchez <carlos.sanchez@gecoinc.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kirill Kuvaldin [Tue, 31 Jul 2007 07:38:58 +0000 (00:38 -0700)]
isofs: mounting to regular file may succeed
It turned out that mounting a corrupted ISO image to a regular file may
succeed, e.g. if an image was prepared as follows:
$ dd if=correct.iso of=bad.iso bs=4k count=8
We then can mount it to a regular file:
# mount -o loop -t iso9660 bad.iso /tmp/file
But mounting it to a directory fails with -ENOTDIR, simply because
the root directory inode doesn't have S_IFDIR set and the condition
in graft_tree() is met:
if (S_ISDIR(nd->dentry->d_inode->i_mode) !=
S_ISDIR(mnt->mnt_root->d_inode->i_mode))
return -ENOTDIR
This is because the root directory inode was read from an incorrect
block. It's supposed to be read from sbi->s_firstdatazone, which is
an absolute value and gets messed up in the case of an incorrect image.
In order to somehow circumvent this we have to check that the root
directory inode is actually a directory after all.
Signed-off-by: Kirill Kuvaldin <kuvkir@epsmu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>