29 Sep, 2010
1 commit
-
libata depends on scsi_host_template for module reference counting and
sht's should be owned by each low level driver. During libahci split,
the sht was left with libahci.ko leaving the actual low level drivers
not reference counted. This made ahci and ahci_platform always
unloadable even while they're being actively used.Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
each low level ahci driver.stable: only applicable to 2.6.35.
Signed-off-by: Tejun Heo
Reported-by: Pedro Francisco
Tested-by: Michael Tokarev
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik
28 Sep, 2010
22 commits
-
* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile -
The PKT_CTRL_CMD_STATUS device ioctl retrieves a pointer to a
pktcdvd_device from the global pkt_devs array. The index into this
array is provided directly by the user and is a signed integer, so the
comparison to ensure that it falls within the bounds of this array will
fail when provided with a negative index.This can be used to read arbitrary kernel memory or cause a crash due to
an invalid pointer dereference. This can be exploited by users with
permission to open /dev/pktcdvd/control (on many distributions, this is
readable by group "cdrom").Signed-off-by: Dan Rosenberg
[ Rather than add a cast, just make the function take the right type -Linus ]
Signed-off-by: Linus Torvalds -
The configuration choice for the port on which the GDB stub listens has
a default of GDBSTUB_TTYSM0, but this should be GDBSTUB_ON_TTYSM0 to
match the option.Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/cxgb3: Turn off RX coalescing for iWARP connections -
* master.kernel.org:/home/rmk/linux-2.6-arm: (28 commits)
ARM: 6411/1: vexpress: set RAM latencies to 1 cycle for PL310 on ct-ca9x4 tile
ARM: 6409/1: davinci: map sram using MT_MEMORY_NONCACHED instead of MT_DEVICE
ARM: 6408/1: omap: Map only available sram memory
ARM: 6407/1: mmu: Setup MT_MEMORY and MT_MEMORY_NONCACHED L1 entries
ARM: pxa: remove pr_ uses of KERN_
ARM: pxa168fb: clear enable bit when not active
ARM: pxa: fix cpu_is_pxa*() not expanding to zero when not configured
ARM: pxa168: fix corrected reset vector
ARM: pxa: Use PIO for PI2C communication on Palm27x
ARM: pxa: Fix Vpac270 gpio_power for MMC
ARM: 6401/1: plug a race in the alignment trap handler
ARM: 6406/1: at91sam9g45: fix i2c bus speed
leds: leds-ns2: fix locking
ARM: dove: fix __io() definition to use bus based offset
dmaengine: fix interrupt clearing for mv_xor
ARM: kirkwood: Unbreak PCIe I/O port
ARM: Fix build error when using KCONFIG_CONFIG
ARM: 6383/1: Implement phys_mem_access_prot() to avoid attributes aliasing
ARM: 6400/1: at91: fix arch_gettimeoffset fallout
ARM: 6398/1: add proc info for ARM11MPCore/Cortex-A9 from ARM
... -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
net/9p: fix memory handling/allocation in rdma_request() -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
amd64_edac: Fix driver module removal -
…s/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
TOMOYO: Don't abuse sys_getpid(), sys_getppid() -
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel:
drm/i915/sdvo: Handle unsupported GET_SUPPORTED_ENHANCEMENTS gracefully
drm/i915/sdvo: Cleanup connector on error path
drm/i915: Fix 945GM regression in e259befd -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove
mmc: sdhci-s3c: fix incorrect spinlock usage after merge
mmc: MAINTAINERS: add myself as MMC maintainer -
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia: pd6729: Fix error path
pcmcia: preserve configuration information if request_io fails partly -
* git://git.infradead.org/iommu-2.6:
intel-iommu: Use symbolic values instead of magic numbers in Lenovo w/a
intel-iommu: Abort IOMMU setup for igfx if BIOS gave no shadow GTT space -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/amd-iommu: Fix rounding-bug in __unmap_single
x86/amd-iommu: Work around S3 BIOS bug
x86/amd-iommu: Set iommu configuration flags in enable-loop
x86, setup: Fix earlyprintk=serial,0x3f8,115200
x86, setup: Fix earlyprintk=serial,ttyS0,115200 -
…/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf, x86: Catch spurious interrupts after disabling counters
tracing/x86: Don't use mcount in kvmclock.c
tracing/x86: Don't use mcount in pvclock.c -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
It really has no business being there; short of a serious kernel bug
we should already have USER_DS at that point. It shouldn't have been
done on x86 either...Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
set ->orig_d0 to -1, same as what sigreturn does
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
force_sigsegv() is there for purpose...
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
get rid of a useless wrapper, while we are at it
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
The HW by default has RX coalescing on. For iWARP connections, this
causes a 100ms delay in connection establishement due to the ingress
MPA Start message being stalled in HW. So explicitly turn RX
coalescing off when setting up iWARP connections.This was causing very bad performance for NP64 gather operations using
Open MPI, due to the way it sets up connections on larger jobs.Signed-off-by: Steve Wise
Cc:
Signed-off-by: Roland Dreier
27 Sep, 2010
8 commits
-
The PL310 on the ct-ca9x4 tile for the Versatile Express does not need
to add additional latency when accessing its cache RAMs. Unfortunately,
the boot monitor sets this up for an 8-cycle delay on reads and writes,
resulting in greatly reduced memory performance when the L2 cache is
enabled.This patch sets the L2 RAM latencies to the correct value of 1 cycle
on the ct-ca9x4 tile before enabling the L2 cache.Acked-by: Catalin Marinas
Signed-off-by: Will Deacon
Signed-off-by: Russell King -
Return -ENOMEM when erroring on kmalloc and fix memory leaks when returning on error.
Signed-off-by: Davidlohr Bueso
Reviewed-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
f4347553b30ec66530bfe63c84530afea3803396 removed the edac polling
mechanism in favor of using a notifier chain for conveying MCE
information to edac. However, the module removal path didn't test
whether the driver had setup the polling function workqueue at all and
the rmmod process was hanging in the kernel at try_to_del_timer_sync()
in the cancel_delayed_work() path, trying to cancel an uninitialized
work struct.Fix that by adding a balancing check to the workqueue removal path.
Signed-off-by: Borislav Petkov
-
While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4
misoptimization of non-inlined constant_test_bit() due to non-volatile
addr when 'const volatile unsigned long *addr' cast to 'unsigned long *'
with subsequent unconditional jump to pause (and not to the test) leading
to hang.Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined
constant_test_bit() and correct jump, thus working around the kernel bug.Other arches than asm-x86 may implement this slightly differently;
2.6.29 mitigates the misoptimization by changing the function prototype
(commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue
itself is better.Signed-off-by: Alexander Chumachenko
Signed-off-by: Michael Shigorin
Acked-by: Linus Torvalds
Signed-off-by: H. Peter Anvin -
System call entry functions sys_*() are never to be called from
general kernel code. The fact that they aren't declared in header
files should have been a clue. These functions also don't exist on
Alpha since it has sys_getxpid() instead.Signed-off-by: Ben Hutchings
Acked-by: Tetsuo Handa
Signed-off-by: James Morris -
If not all clocks have been defined in platform data, the driver will
cause a null pointer dereference when it is removed. This patch fixes
this issue.Signed-off-by: Marek Szyprowski
Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Chris Ball -
In the commit f522886e202a34a2191dd5d471b3c4d46410a9a0 a merge conflict
in the sdhci-s3c driver been fixed. However the fix used incorrect
spinlock operation - it caused a race with sdhci interrupt service. The
correct way to solve it is to use spin_lock_irqsave/irqrestore() calls.Signed-off-by: Marek Szyprowski
Signed-off-by: Kyungmin Park
Signed-off-by: Andrew Morton
Signed-off-by: Chris Ball -
Signed-off-by: Chris Ball
Cc: Pierre Ossman
Cc:
Signed-off-by: Andrew Morton
26 Sep, 2010
6 commits
-
In error return path
call pci_disable_device() which was enabled earlier.Signed-off-by: Rahul Ruikar
Signed-off-by: Dominik Brodowski -
rdusp() gives us the right value only for the current thread...
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
We want interrupts disabled on all paths leading to RESTORE_ALL;
otherwise, we are risking an IRQ coming between the updates of
alpha_mv->hae_cache and *alpha_mv->hae_register and set_hae()
within the IRQ getting badly confused.RESTORE_ALL used to play with disabling IRQ itself, but that got
removed back in 2002, without making sure we had them disabled
on all paths. It's cheaper to make sure we have them disabled than
to revert to original variant...Remove the detritus left from that commit back in 2002; we used to
need a reload of $0 and $1 since swpipl would change those, but
doing that had become pointless when we stopped doing swpipl in
there...Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: prevent merges of discard and write requests -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory
ALSA: hda - Fix auto-parse of SPDIF input of Realtek codecs
ASoC: Fix multi-componentism
ASoC: Fix soc-cache buffer overflow bug
ALSA: oxygen: fix analog capture on Claro halo cards
ALSA: hda - Add Dell Latitude E6400 model quirk
ASoC: fix clkdev API usage in sh/migor.c -
Thomas Pollet noticed that the remap_file_pages() system call in
fremap.c has a potential overflow in the first part of the if statement
below, which could cause it to process bogus input parameters.
Specifically the pgoff + size parameters could be wrap thereby
preventing the system call from failing when it should.Reported-by: Thomas Pollet
Signed-off-by: Larry Woodman
Signed-off-by: Linus Torvalds
25 Sep, 2010
3 commits
-
The SNDRV_HDSP_IOCTL_GET_CONFIG_INFO and
SNDRV_HDSP_IOCTL_GET_CONFIG_INFO ioctls in hdspm.c and hdsp.c allow
unprivileged users to read uninitialized kernel stack memory, because
several fields of the hdsp{m}_config_info structs declared on the stack
are not altered or zeroed before being copied back to the user. This
patch takes care of it.Signed-off-by: Dan Rosenberg
Cc:
Signed-off-by: Takashi Iwai