03 Jul, 2011
2 commits
-
When regs are passed to dump_stack(), we fetch the frame
pointer from the regs but the stack pointer is taken from
the current frame.Thus the frame and stack pointers may not come from the same
context. For example this can result in the unwinder to
think the context is in irq, due to the current value of
the stack, but the frame pointer coming from the regs points
to a frame from another place. It then tries to fix up
the irq link but ends up dereferencing a random frame
pointer that doesn't belong to the irq stack:[ 9131.706906] ------------[ cut here ]------------
[ 9131.707003] WARNING: at arch/x86/kernel/dumpstack_64.c:129 dump_trace+0x2aa/0x330()
[ 9131.707003] Hardware name: AMD690VM-FMH
[ 9131.707003] Perf: bad frame pointer = 0000000000000005 in callchain
[ 9131.707003] Modules linked in:
[ 9131.707003] Pid: 1050, comm: perf Not tainted 3.0.0-rc3+ #181
[ 9131.707003] Call Trace:
[ 9131.707003] [] warn_slowpath_common+0x7a/0xb0
[ 9131.707003] [] warn_slowpath_fmt+0x41/0x50
[ 9131.707003] [] ? bad_to_user+0x6d/0x10be
[ 9131.707003] [] dump_trace+0x2aa/0x330
[ 9131.707003] [] ? native_sched_clock+0x13/0x50
[ 9131.707003] [] perf_callchain_kernel+0x54/0x70
[ 9131.707003] [] perf_prepare_sample+0x19f/0x2a0
[ 9131.707003] [] __perf_event_overflow+0x16c/0x290
[ 9131.707003] [] ? __perf_event_overflow+0x130/0x290
[ 9131.707003] [] ? native_sched_clock+0x13/0x50
[ 9131.707003] [] ? sched_clock+0x9/0x10
[ 9131.707003] [] ? T.375+0x15/0x90
[ 9131.707003] [] ? trace_hardirqs_on_caller+0x64/0x180
[ 9131.707003] [] ? trace_hardirqs_off+0xd/0x10
[ 9131.707003] [] perf_event_overflow+0x14/0x20
[ 9131.707003] [] perf_swevent_hrtimer+0x11c/0x130
[ 9131.707003] [] ? error_exit+0x51/0xb0
[ 9131.707003] [] __run_hrtimer+0x83/0x1e0
[ 9131.707003] [] ? perf_event_overflow+0x20/0x20
[ 9131.707003] [] hrtimer_interrupt+0x106/0x250
[ 9131.707003] [] ? trace_hardirqs_off_thunk+0x3a/0x3c
[ 9131.707003] [] smp_apic_timer_interrupt+0x53/0x90
[ 9131.707003] [] apic_timer_interrupt+0x13/0x20
[ 9131.707003] [] ? error_exit+0x51/0xb0
[ 9131.707003] [] ? error_exit+0x4c/0xb0
[ 9131.707003] ---[ end trace b2560d4876709347 ]---Fix this by simply taking the stack pointer from regs->sp
when regs are provided.Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: H. Peter Anvin
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo -
In order to prepare for fetching the stack pointer from the
regs when possible in dump_trace() instead of taking the
local one, save the current stack pointer in perf live regs saving.Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: H. Peter Anvin
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
16 Jun, 2011
2 commits
-
…rostedt/linux-2.6-trace into perf/core
Conflicts:
Makefile -
Merge reason: add the latest fixes.
Signed-off-by: Ingo Molnar
14 Jun, 2011
9 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
SLAB: Record actual last user of freed objects.
slub: always align cpu_slab to honor cmpxchg_double requirement -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: unwind canceled flock state
ceph: fix ENOENT logic in striped_read
ceph: fix short sync reads from the OSD
ceph: fix sync vs canceled write
ceph: use ihold when we already have an inode ref -
…nel/git/tip/linux-2.6-tip
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rtc: Staticize non-exported __rtc_set_alarm()
rtc: Fix ioctl error path return
ptp: Fix some locking bugs in ptp_read()
ptp: Return -EFAULT on copy_to_user() errors -
…l/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ftrace: Revert 8ab2b7efd ftrace: Remove unnecessary disabling of irqs
kprobes/trace: Fix kprobe selftest for gcc 4.6
ftrace: Fix possible undefined return code
oprofile, dcookies: Fix possible circular locking dependency
oprofile: Fix locking dependency in sync_start()
oprofile: Free potentially owned tasks in case of errors
oprofile, x86: Add comments to IBS LVT offset initialization -
…rnel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub
x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
genirq: Prevent potential NULL dereference in irq_set_irq_wake() -
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
spi-pl022: Add missing return value update -
…git/kgene/linux-samsung
* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S3C2410: remove the now empty mach-s3c2410/irq.c
ARM: S3C24XX: Move s3c24xx_irq_syscore_ops to plat-s3c24xx/irq.c
ARM: S3C24xx: Fix missing struct for s3c2410_dma_chan
ARM: SAMSUNG: Remove unused onenand plat functions
ARM: EXYNOS4: Remove compiler warning on exynos4_pwm4_resume
ARM: S5P: Fix compilation error for exynos4_defconfig
ARM: S5P: Should be S3C_VA_USB_HSPHY instead of S5P_VA_XX
ARM: S5P64X0: Fix SPI platform device name
ARM: S5PV210: Fix possible null pointer dereference -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: fix problem in setting checkpoint interval
nilfs2: fix missing block address termination in btree node shrinking
nilfs2: fix incorrect block address termination in node concatenation
13 Jun, 2011
6 commits
-
Return error on out of range cpsdvsr value.
Acked-by: Linus Walleij
Signed-off-by: Virupax Sadashivpetimath
Signed-off-by: Grant Likely -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: use join_transaction in btrfs_evict_inode()
Btrfs - use %pU to print fsid
Btrfs: fix extent state leak on failed nodatasum reads
btrfs: fix unlocked access of delalloc_inodes
Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()
btrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer cacheline
Btrfs: clear current->journal_info on async transaction commit
Btrfs: make sure to recheck for bitmaps in clusters
btrfs: remove unneeded includes from scrub.c
btrfs: reinitialize scrub workers
btrfs: scrub: errors in tree enumeration
Btrfs: don't map extent buffer if path->skip_locking is set
Btrfs: unlock the trans lock properly
Btrfs: don't map extent buffer if path->skip_locking is set
Btrfs: fix duplicate checking logic
Btrfs: fix the allocator loop logic
Btrfs: fix bitmap regression
Btrfs: don't commit the transaction if we dont have enough pinned bytes
Btrfs: noinline the cluster searching functions
Btrfs: cache bitmaps when searching for a cluster -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
ALSA: Use %pV for snd_printk()
ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
ASoC: fsl: fix initialization of DMA buffers
ASoC: WM8804 does not support sample rates below 32kHz
ASoC: Fix WM8962 headphone volume update for use of advanced caches
ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
ALSA: hda: Fix quirk for Dell Inspiron 910
ASoC: AD1836: Fix setting the PCM format
ASoC: Check for NULL register bank in snd_soc_get_cache_val()
ASoC: Add missing break in WM8915 FLL source selection
ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
ASoC: atmel_ssc: Don't try to free ssc if request failed -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
ide-cd: signedness warning fix again -
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
gpio/basic_mmio: add missing include of spinlock_types.h
gpio/nomadik: fix sleepmode for elder Nomadik -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
ISDN, hfcsusb: Don't leak in hfcsusb_ph_info()
netpoll: call dev_put() on error in netpoll_setup()
net: ep93xx_eth: fix DMA API violations
net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()
net: ep93xx_eth: allocate buffers using kmalloc()
net: ep93xx_eth: pass struct device to DMA API functions
ep93xx: set DMA masks for the ep93xx_eth
vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
NET: am79c961: fix assembler warnings
NET: am79c961: ensure multicast filter is correctly set at open
NET: am79c961: ensure asm() statements are marked volatile
ethtool.h: fix typos
ep93xx_eth: Update MAINTAINERS
ipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data
netpoll: prevent netpoll setup on slave devices
net: pmtu_expires fixes
gianfar:localized filer table
iwlegacy: fix channel switch locking
mac80211: fix IBSS teardown race
...
12 Jun, 2011
15 commits
-
…s/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
AppArmor: Fix sleep in invalid context from task_setrlimit -
We leak the memory allocated to 'phi' when the variable goes out of scope
in hfcsusb_ph_info().Signed-off-by: Jesper Juhl
Signed-off-by: David S. Miller -
There is a dev_put(ndev) missing on an error path. This was
introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave
devices".Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
Russell King said:
>
> So, to summarize what its doing:
>
> 1. It allocates buffers for rx and tx.
> 2. It maps them with dma_map_single().
> This transfers ownership of the buffer to the DMA device.
> 3. In ep93xx_xmit,
> 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
> This violates the DMA buffer ownership rules - the CPU should
> not be writing to this buffer while it is (in principle) owned
> by the DMA device.
> 3b. It then calls dma_sync_single_for_cpu() for the buffer.
> This transfers ownership of the buffer to the CPU, which surely
> is the wrong direction.
> 4. In ep93xx_rx,
> 4a. It calls dma_sync_single_for_cpu() for the buffer.
> This at least transfers the DMA buffer ownership to the CPU
> before the CPU reads the buffer
> 4b. It then uses skb_copy_to_linear_data() to copy the data out.
> At no point does it transfer ownership back to the DMA device.
> 5. When the driver is removed, it dma_unmap_single()'s the buffer.
> This transfers ownership of the buffer to the CPU.
> 6. It frees the buffer.
>
> While it may work on ep93xx, it's not respecting the DMA API rules,
> and with DMA debugging enabled it will probably encounter quite a few
> warnings.This patch fixes these violations.
Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
configured) made page allocator to return NULL if GFP_DMA is set but
CONFIG_ZONE_DMA is disabled.This causes ep93xx_eth to fail:
WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
Modules linked in:
[] (unwind_backtrace+0x0/0xf4) from [] (warn_slowpath_common+0x48/0x60)
[] (warn_slowpath_common+0x48/0x60) from [] (warn_slowpath_null+0x1c/0x24)
[] (warn_slowpath_null+0x1c/0x24) from [] (__alloc_pages_nodemask+0x11c/0x638)
[] (__alloc_pages_nodemask+0x11c/0x638) from [] (__dma_alloc+0x8c/0x3ec)
[] (__dma_alloc+0x8c/0x3ec) from [] (dma_alloc_coherent+0x54/0x60)
[] (dma_alloc_coherent+0x54/0x60) from [] (ep93xx_open+0x20/0x864)
[] (ep93xx_open+0x20/0x864) from [] (__dev_open+0xb8/0x108)
[] (__dev_open+0xb8/0x108) from [] (__dev_change_flags+0x70/0x128)
[] (__dev_change_flags+0x70/0x128) from [] (dev_change_flags+0x10/0x48)
[] (dev_change_flags+0x10/0x48) from [] (ip_auto_config+0x190/0xf68)
[] (ip_auto_config+0x190/0xf68) from [] (do_one_initcall+0x34/0x18c)
[] (do_one_initcall+0x34/0x18c) from [] (kernel_init+0x94/0x134)
[] (kernel_init+0x94/0x134) from [] (kernel_thread_exit+0x0/0x8)Since there is no restrictions for DMA on ep93xx, we can fix this by just
removing the GFP_DMA flag from the call.Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
We can use simply kmalloc() to allocate the buffers. This also simplifies the
code and allows us to perform DMA sync operations more easily.Memory is allocated with only GFP_KERNEL since there are no DMA allocation
restrictions on this platform.Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.Signed-off-by: Mika Westerberg
Signed-off-by: David S. Miller -
Since the driver uses the DMA API, we should pass it valid DMA masks.
Signed-off-by: Mika Westerberg
Acked-by: Russell King
Acked-by: H Hartley Sweeten
Tested-by: Petr Stetiar
Signed-off-by: David S. Miller -
Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
but rather in vlan_do_receive. Otherwise the vlan header
will not be properly put on the packet in the case of
vlan header accelleration.As we remove the check from vlan_check_reorder_header
rename it vlan_reorder_header to keep the naming clean.Fix up the skb->pkt_type early so we don't look at the packet
after adding the vlan tag, which guarantees we don't goof
and look at the wrong field.Use a simple if statement instead of a complicated switch
statement to decided that we need to increment rx_stats
for a multicast packet.Hopefully at somepoint we will just declare the case where
VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
the code. Until then this keeps it working correctly.Signed-off-by: Eric W. Biederman
Signed-off-by: Jiri Pirko
Acked-by: Changli Gao
Signed-off-by: David S. Miller -
Signed-off-by: Daniel Hellstrom
Signed-off-by: David S. Miller -
Fix:
/tmp/ccvoZ6h8.s: Assembler messages:
/tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending orderby ensuring that we have temporary variables placed into specific
registers. Reorder the code a bit to allow the resulting assembly
to be slightly more optimal.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
We were clearing out the multicast filter whenever the interface was
upped, and not setting the mode bits correctly. This can cause
problems if there are any multicast addresses already set at this
point, or if ALLMULTI was set.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
Without this the compiler can (and does) optimize register reads away
from within loops, and other such optimizations.Signed-off-by: Russell King
Signed-off-by: David S. Miller -
One of the legit warnings 'make W=3 drivers/ide/ide-cd.c'
generates is:
drivers/ide/ide-cd.c: In function ide_cd_do_request
drivers/ide/ide-cd.c:828:2: warning: conversion to int from \
unsigned int may change the sign of the result
drivers/ide/ide-cd.c:833:2: warning: conversion to int from \
unsigned int may change the sign of the resultnsectors is declared int, should be unsigned int.
blk_rq_sectors() returns unsigned int, and ide_complete_rq
expects unsigned int as well. Fixes both warnings.Signed-off-by: Connor Hansen
Signed-off-by: David S. Miller -
It uses cpu_relax(), and so needs
Without this patch, I see:
CC arch/mn10300/kernel/asm-offsets.s
In file included from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/mn10300/kernel/asm-offsets.c:7:
include/linux/seqlock.h: In function 'read_seqbegin':
include/linux/seqlock.h:91: error: implicit declaration of function 'cpu_relax'whilst building asb2364_defconfig on MN10300.
Signed-off-by: David Howells
Signed-off-by: Linus Torvalds
11 Jun, 2011
6 commits
-
The WARN_ON() in start_transaction() was triggered while balancing.
The cause is btrfs_relocate_chunk() started a transaction and
then called iput() on the inode that stores free space cache,
and iput() called btrfs_start_transaction() again.Reported-by: Tsutomu Itoh
Signed-off-by: Li Zefan
Reviewed-by: Josef Bacik
Signed-off-by: Chris Mason -
Checkpoint generation interval of nilfs goes wrong after user has
changed the interval parameter with nilfs-tune tool.segctord starting. Construction interval = 5 seconds,
CP frequency < 30 seconds
segctord starting. Construction interval = 0 seconds,
CP frequency < 30 secondsThis turned out to be caused by a trivial bug in initialization code
of log writer. This will fix it.Reported-by: Andrea Gelmini
Signed-off-by: Ryusuke Konishi -
nilfs_btree_delete function does not terminate part of virtual block
addresses when shrinking the last remaining child node into the root
node. The missing address termination causes that dead btree node
blocks persist and chip away free disk space.This fixes the leak bug on the btree node deletion.
Signed-off-by: Ryusuke Konishi
-
nilfs_btree_delete function wrongly terminates virtual block address
of the btree node held by its parent at index 0. When concatenating
the index-0 node with its right sibling node, nilfs_btree_delete
terminates the block address of index-0 node instead of the right
sibling node which should be deleted.This bug not only wears disk space in the long run, but also causes
file system corruption. This will fix it.Signed-off-by: Ryusuke Konishi
-
Get rid of FIXME comment. Uuids from dmesg are now the same as uuids
given by btrfs-progs.Signed-off-by: Ilya Dryomov
Signed-off-by: Chris Mason -
When encountering an EIO while reading from a nodatasum extent, we
insert an error record into the inode's failure tree.
btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd
better clear the failure tree in that case, otherwise the kernel
complains aboutBUG extent_state: Objects remaining on kmem_cache_close()
on rmmod.
Signed-off-by: Jan Schmidt
Signed-off-by: Chris Mason