21 Aug, 2010
19 commits
-
Chapter 6 is right about mutex_trylock, but chapter 10 wasn't. This error
was introduced during semaphore-to-mutex conversion of the Unreliable
guide. :-)If user context which performs mutex_lock() or mutex_trylock() is
preempted by interrupt context which performs mutex_trylock() on the same
mutex instance, a deadlock occurs. This is because these functions do not
disable local IRQs when they operate on mutex->wait_lock.Signed-off-by: Stefan Richter
Acked-by: Rusty Russell
Cc: Matthew Wilcox
Cc: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
gcc-4.0.2:
drivers/scsi/qla4xxx/ql4_os.c: In function 'qla4_8xxx_error_recovery':
drivers/scsi/qla4xxx/ql4_glbl.h:135: sorry, unimplemented: inlining failed in call to 'qla4_8xxx_set_drv_active': function body not available
drivers/scsi/qla4xxx/ql4_os.c:2377: sorry, unimplemented: called from here
drivers/scsi/qla4xxx/ql4_glbl.h:135: sorry, unimplemented: inlining failed in call to 'qla4_8xxx_set_drv_active': function body not available
drivers/scsi/qla4xxx/ql4_os.c:2393: sorry, unimplemented: called from hereCc: Ravi Anand
Cc: Vikas Chaudhary
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix uml compile error:
include/linux/dma-mapping.h:145: error: redefinition of 'dma_get_cache_alignment'
arch/um/include/asm/dma-mapping.h:99: note: previous definition of 'dma_get_cache_alignment' was hereIntroduced by commit 4565f0170dfc ("dma-mapping: unify
dma_get_cache_alignment implementations")Signed-off-by: Miklos Szeredi
Cc: Jeff Dike
Cc: FUJITA Tomonori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dump_tasks() needs to hold the RCU read lock around its access of the
target task's UID. To this end it should use task_uid() as it only needs
that one thing from the creds.The fact that dump_tasks() holds tasklist_lock is insufficient to prevent the
target process replacing its credentials on another CPU.Then, this patch change to call rcu_read_lock() explicitly.
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
mm/oom_kill.c:410 invoked rcu_dereference_check() without protection!other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 1
4 locks held by kworker/1:2/651:
#0: (events){+.+.+.}, at: []
process_one_work+0x137/0x4a0
#1: (moom_work){+.+...}, at: []
process_one_work+0x137/0x4a0
#2: (tasklist_lock){.+.+..}, at: []
out_of_memory+0x164/0x3f0
#3: (&(&p->alloc_lock)->rlock){+.+...}, at: []
find_lock_task_mm+0x2e/0x70Signed-off-by: KOSAKI Motohiro
Signed-off-by: David Howells
Acked-by: Paul E. McKenney
Acked-by: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commit 0aad4b3124 ("oom: fold __out_of_memory into out_of_memory")
introduced a tasklist_lock leak. Then it caused following obvious
danger warnings and panic.================================================
[ BUG: lock held when returning to user space! ]
------------------------------------------------
rsyslogd/1422 is leaving the kernel with locks still held!
1 lock held by rsyslogd/1422:
#0: (tasklist_lock){.+.+.+}, at: [] out_of_memory+0x164/0x3f0
BUG: scheduling while atomic: rsyslogd/1422/0x00000002
INFO: lockdep is turned off.This patch fixes it.
Signed-off-by: KOSAKI Motohiro
Reviewed-by: Minchan Kim
Acked-by: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commit b940fd7035 ("oom: remove unnecessary code and cleanup") added an
unnecessary NULL pointer dereference. remove it.Signed-off-by: KOSAKI Motohiro
Reviewed-by: Minchan Kim
Acked-by: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There's some merge problem between sdhic core and sdhci-s3c host. After
mutex is changed to spinlock. It needs to use use spin lock functions and
use the correct card detection function.Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Some SDHCI controllers like s5pc110 don't have an HISPD bit in the HOSTCTL
register.Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
s5pc110 (aka s5pv210) uses the same SDHCI IP.
Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Each board can override the default sdhci host capabilities.
Some board has broken features by hardwares and support 8-bit bandwidth.Signed-off-by: Kyungmin Park
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When radix_tree_maxindex() is ~0UL, it can happen that scanning overflows
index and tree traversal code goes astray reading memory until it hits
unreadable memory. Check for overflow and exit in that case.Signed-off-by: Jan Kara
Cc: Christoph Hellwig
Cc: Nick Piggin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Revert commit 7721fea3d0fd93fb4d000eb737b444369358d6d3 ("hwmon:
f71882fg: add support for the Fintek F71808E").Hans said:
: A second review after I've received a data sheet for this device from
: Fintek has turned up a few bugs.
:
: Unfortunately Giel (nor I) have time to fix this in time for the 2.6.36
: cycle. Therefor I would like to see this patch reverted as not having any
: support for the hwmon function of this superio chip is better then having
: unreliable support.Cc: Giel van Schijndel
Cc: Jean Delvare
Cc: Hans de Goede
Cc: Jonathan Cameron
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide a check in all the kfifo examples to validate the correct
execution of each testcase.Signed-off-by: Andrea Righi
Acked-by: Stefani Seibold
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We use a dynamically allocated kfifo in the dma example, so we need to
free it when unloading the module.Signed-off-by: Andrea Righi
Acked-by: Stefani Seibold
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The scatterlist is used uninitialized in kfifo_dma_in_prepare(). This
triggers the following bug if CONFIG_DEBUG_SG=y:------------[ cut here ]------------
kernel BUG at include/linux/scatterlist.h:65!
invalid opcode: 0000 [#1] PREEMPT SMP
...
Call Trace:
[] setup_sgl+0x6b/0xe0
[] ? example_init+0x0/0x265 [dma_example]
[] __kfifo_dma_in_prepare+0x21/0x30
[] example_init+0x124/0x265 [dma_example]
[] ? trace_module_notify+0x25/0x370
[] ? free_pages_prepare+0x11e/0x1e0
[] ? get_parent_ip+0x11/0x50
[] ? trace_module_notify+0x25/0x370
[] ? trace_hardirqs_on+0xd/0x10
[] ? mutex_unlock+0xe/0x10
[] ? trace_module_notify+0x41/0x370
[] ? __blocking_notifier_call_chain+0x45/0x80
[] ? vfree+0x2a/0x30
[] ? up_read+0x23/0x40
[] ? __blocking_notifier_call_chain+0x65/0x80
[] do_one_initcall+0x43/0x180
[] sys_init_module+0xba/0x200
[] system_call_fastpath+0x16/0x1b
RIP [] setup_sgl_buf+0x1a1/0x1b0
RSP
---[ end trace a72b979fd3c1d3a5 ]---Add the proper initialization to avoid the bug.
Signed-off-by: Andrea Righi
Acked-by: Stefani Seibold
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide a static array of expected items that kfifo should contain at the
end of the test to validate it.Signed-off-by: Andrea Righi
Cc: Stefani Seibold
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a testcase for kfifo_skip() to the byte stream fifo example.
Signed-off-by: Andrea Righi
Cc: Greg KH
Acked-by: Stefani Seibold
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
kfifo_skip() is currently broken, due to the missing of the internal
helper function. Add it.Signed-off-by: Andrea Righi
Cc: Greg KH
Acked-by: Stefani Seibold
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Screen is completely corrupted since 2.6.34. Bisection revealed that it's
caused by commit 6175ddf06b61720 ("x86: Clean up mem*io functions.").H. Peter Anvin explained that memcpy_toio() does not copy data in 32bit
chunks anymore on x86.Signed-off-by: Ondrej Zary
Cc: Brian Gerst
Cc: H. Peter Anvin
Cc: Petr Vandrovec
Cc: Jean Delvare
Cc: [2.6.34.x, 2.6.35.x]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Aug, 2010
1 commit
-
…/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:
kprobes/x86: Fix the return address of multiple kretprobes
perf tools: Fix build error on read only source.
perf, x86: Fix Intel-nhm PMU programming errata workaround
19 Aug, 2010
15 commits
-
Fix the return address of subsequent kretprobes when multiple
kretprobes are set on the same function.For example:
# cd /sys/kernel/debug/tracing
# echo "r:event1 sys_symlink" > kprobe_events
# echo "r:event2 sys_symlink" >> kprobe_events
# echo 1 > events/kprobes/enable
# ln -s /tmp/foo /tmp/bar(without this patch)
# cat trace
ln-897 [000] 20404.133727: event1: (kretprobe_trampoline+0x0/0x4c
Reviewed-by: Masami Hiramatsu
Cc: Frederic Weisbecker
Cc: Ananth N Mavinakayanahalli
Cc: Peter Zijlstra
Cc: YOSHIFUJI Hideaki
LKML-Reference:
Signed-off-by: Ingo Molnar -
…/linux-2.6 into perf/urgent
-
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Fix an Oops in the NFSv4 atomic open code
NFS: Fix the selection of security flavours in Kconfig
NFS: fix the return value of nfs_file_fsync()
rpcrdma: Fix SQ size calculation when memreg is FRMR
xprtrdma: Do not truncate iova_start values in frmr registrations.
nfs: Remove redundant NULL check upon kfree()
nfs: Add "lookupcache" to displayed mount options
NFS: allow close-to-open cache semantics to apply to root of NFS filesystem
SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494) -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
HID: hiddev: fix memory corruption due to invalid intfdata
HID: hiddev: protect against disconnect/NULL-dereference race
HID: picolcd: correct ordering of framebuffer freeing
HID: picolcd: testing the wrong variable -
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Fix build error: conflicting types for ‘sys_execve’ -
Fix the declaration of sys_execve() in asm-generic/syscalls.h to have
various consts applied to its pointers.Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
arch/ia64/kernel/process.c:636: error: conflicting types for ‘sys_execve’
commit d7627467b7a8dd6944885290a03a07ceb28c10eb
Make do_execve() take a const filename pointerMissed the declaration of sys_execve in the ia64 asm/unistd.h (perhaps
because there is no reason for it to be there ... it might be a left over
from the COMPAT code?). Just delete the conflicting version.Signed-off-by: Tony Luck
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
fs: brlock vfsmount_lock
fs: scale files_lock
lglock: introduce special lglock and brlock spin locks
tty: fix fu_list abuse
fs: cleanup files_lock locking
fs: remove extra lookup in __lookup_hash
fs: fs_struct rwlock to spinlock
apparmor: use task path helpers
fs: dentry allocation consolidation
fs: fix do_lookup false negative
mbcache: Limit the maximum number of cache entries
hostfs ->follow_link() braino
hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy
remove SWRITE* I/O types
kill BH_Ordered flag
vfs: update ctime when changing the file's permission by setfacl
cramfs: only unlock new inodes
fix reiserfs_evict_inode end_writeback second call -
This fixes a build breakage introduced by commit 4c2ef25fe0b8 ("mmc: fix
all hangs related to mmc/sd card insert/removal during suspend/resume")Cc: David Brownell
Cc: Alan Stern
Cc: linux-mmc@vger.kernel.org
Cc: Andrew Morton
Signed-off-by: Uwe Kleine-König
Acked-by: Kukjin Kim
Acked-by: Maxim Levitsky
Acked-by: Randy Dunlap
Signed-off-by: Linus Torvalds -
Parts of the build process were generating files outside the specified
O= directory, causing the build to fail on systems where the sources are
in a read only file system.Fix it by using $(OUTPUT) on these locations.
Also check that $(OUTPUT) actually exists, just like the top level
kernel Makefile does. Otherwise the failure message emitted is
completely misleading.Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Paul Mackerras
LKML-Reference:
Signed-off-by: Kusanagi Kouichi
Signed-off-by: Arnaldo Carvalho de Melo -
…/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 tools: Fix build on POSIX shells
latencytop: Fix kconfig dependency warnings
perf annotate tui: Fix exit and RIGHT keys handling
tracing: Sanitize value returned from write(trace_marker, "...", len)
tracing/events: Convert format output to seq_file
tracing: Extend recordmcount to better support Blackfin mcount
tracing: Fix ring_buffer_read_page reading out of page boundary
tracing: Fix an unallocated memory access in function_graph -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)
ALSA: hda - Fix ALC680 base model capture
ASoC: Remove DSP mode support for WM8776
ALSA: hda - Add quirk for Dell Vostro 1220
ALSA: riptide - Fix detection / load of firmware files -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: include sched.h in ColdFire/SPI driver
m68knommu: formatting of pointers in printk()
m68knommu: arch/m68k/include/asm/ide.h fix for nommu -
* 'for-linus' of git://neil.brown.name/md:
md raid-1/10 Fix bio_rw bit manipulations again
md: provide appropriate return value for spare_active functions.
md: Notify sysfs when RAID1/5/10 disk is In_sync.
Update recovery_offset even when external metadata is used. -
* 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6:
spi.h: missing kernel-doc notation, please fix
of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers
of: Fix missing includes
ata: update for of_device to platform_device replacement
microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node
microblaze: Fix of/address: Merge all of the bus translation code
booting-without-of: Remove nonexistent chapters from TOC, fix numbering
18 Aug, 2010
5 commits
-
Adam Lackorzynski reports:
with 2.6.35.2 I'm getting this reproducible Oops:
[ 110.825396] BUG: unable to handle kernel NULL pointer dereference at
(null)
[ 110.828638] IP: [] encode_attrs+0x1a/0x2a4
[ 110.828638] PGD be89f067 PUD bf18f067 PMD 0
[ 110.828638] Oops: 0000 [#1] SMP
[ 110.828638] last sysfs file: /sys/class/net/lo/operstate
[ 110.828638] CPU 2
[ 110.828638] Modules linked in: rtc_cmos rtc_core rtc_lib amd64_edac_mod
i2c_amd756 edac_core i2c_core dm_mirror dm_region_hash dm_log dm_snapshot
sg sr_mod usb_storage ohci_hcd mptspi tg3 mptscsih mptbase usbcore nls_base
[last unloaded: scsi_wait_scan]
[ 110.828638]
[ 110.828638] Pid: 11264, comm: setchecksum Not tainted 2.6.35.2 #1
[ 110.828638] RIP: 0010:[] []
encode_attrs+0x1a/0x2a4
[ 110.828638] RSP: 0000:ffff88003bf5b878 EFLAGS: 00010296
[ 110.828638] RAX: ffff8800bddb48a8 RBX: ffff88003bf5bb18 RCX:
0000000000000000
[ 110.828638] RDX: ffff8800be258800 RSI: 0000000000000000 RDI:
ffff88003bf5b9f8
[ 110.828638] RBP: 0000000000000000 R08: ffff8800bddb48a8 R09:
0000000000000004
[ 110.828638] R10: 0000000000000003 R11: ffff8800be779000 R12:
ffff8800be258800
[ 110.828638] R13: ffff88003bf5b9f8 R14: ffff88003bf5bb20 R15:
ffff8800be258800
[ 110.828638] FS: 0000000000000000(0000) GS:ffff880041e00000(0063)
knlGS:00000000556bd6b0
[ 110.828638] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
[ 110.828638] CR2: 0000000000000000 CR3: 00000000be8ef000 CR4:
00000000000006e0
[ 110.828638] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 110.828638] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[ 110.828638] Process setchecksum (pid: 11264, threadinfo
ffff88003bf5a000, task ffff88003f232210)
[ 110.828638] Stack:
[ 110.828638] 0000000000000000 ffff8800bfbcf920 0000000000000000
0000000000000ffe
[ 110.828638] 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[ 110.828638] 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[ 110.828638] Call Trace:
[ 110.828638] [] ? nfs4_xdr_enc_setattr+0x90/0xb4
[ 110.828638] [] ? call_transmit+0x1c3/0x24a
[ 110.828638] [] ? __rpc_execute+0x78/0x22a
[ 110.828638] [] ? rpc_run_task+0x21/0x2b
[ 110.828638] [] ? rpc_call_sync+0x3d/0x5d
[ 110.828638] [] ? _nfs4_do_setattr+0x11b/0x147
[ 110.828638] [] ? nfs_init_locked+0x0/0x32
[ 110.828638] [] ? ifind+0x4e/0x90
[ 110.828638] [] ? nfs4_do_setattr+0x4b/0x6e
[ 110.828638] [] ? nfs4_do_open+0x291/0x3a6
[ 110.828638] [] ? nfs4_open_revalidate+0x63/0x14a
[ 110.828638] [] ? nfs_open_revalidate+0xd7/0x161
[ 110.828638] [] ? do_lookup+0x1a4/0x201
[ 110.828638] [] ? link_path_walk+0x6a/0x9d5
[ 110.828638] [] ? do_last+0x17b/0x58e
[ 110.828638] [] ? do_filp_open+0x1bd/0x56e
[ 110.828638] [] ? _atomic_dec_and_lock+0x30/0x48
[ 110.828638] [] ? dput+0x37/0x152
[ 110.828638] [] ? alloc_fd+0x69/0x10a
[ 110.828638] [] ? do_sys_open+0x56/0x100
[ 110.828638] [] ? ia32_sysret+0x0/0x5
[ 110.828638] Code: 83 f1 01 e8 f5 ca ff ff 48 83 c4 50 5b 5d 41 5c c3 41
57 41 56 41 55 49 89 fd 41 54 49 89 d4 55 48 89 f5 53 48 81 ec 18 01 00 00
06 89 c2 83 e2 08 83 fa 01 19 db 83 e3 f8 83 c3 18 a8 01 8d
[ 110.828638] RIP [] encode_attrs+0x1a/0x2a4
[ 110.828638] RSP
[ 110.828638] CR2: 0000000000000000
[ 112.840396] ---[ end trace 95282e83fd77358f ]---We need to ensure that the O_EXCL flag is turned off if the user doesn't
set O_CREAT.Cc: stable@kernel.org
Signed-off-by: Trond Myklebust -
With some hardware combinations, the PCM interrupts are acknowledged
before the period boundary from the emu10k1 chip. The midlevel PCM code
gets confused and the playback stream is interrupted.It seems that the interrupt processing shift by 2 samples is enough
to fix this issue. This default value does not harm other,
non-affected hardware.More information: Kernel bugzilla bug#16300
[A copmile warning fixed by tiwai]
Signed-off-by: Jaroslav Kysela
Cc:
Signed-off-by: Takashi Iwai -
fs: brlock vfsmount_lock
Use a brlock for the vfsmount lock. It must be taken for write whenever
modifying the mount hash or associated fields, and may be taken for read when
performing mount hash lookups.A new lock is added for the mnt-id allocator, so it doesn't need to take
the heavy vfsmount write-lock.The number of atomics should remain the same for fastpath rlock cases, though
code would be slightly slower due to per-cpu access. Scalability is not not be
much improved in common cases yet, due to other locks (ie. dcache_lock) getting
in the way. However path lookups crossing mountpoints should be one case where
scalability is improved (currently requiring the global lock).The slowpath is slower due to use of brlock. On a 64 core, 64 socket, 32 node
Altix system (high latency to remote nodes), a simple umount microbenchmark
(mount --bind mnt mnt2 ; umount mnt2 loop 1000 times), before this patch it
took 6.8s, afterwards took 7.1s, about 5% slower.Cc: Al Viro
Signed-off-by: Nick Piggin
Signed-off-by: Al Viro