aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-07-30nfs: include space for the NUL in root pathDan Carpenter1-1/+1
In root_nfs_name() it does the following: if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) { printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n"); return -1; } sprintf(nfs_export_path, buf, cp); In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN) then the sprintf() would lead to an overflow. Generally the rest of the code assumes that the path can have NFS_MAXPATHLEN (1024) characters and a NUL terminator so the fix is to add space to the nfs_export_path[] buffer. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-07-30perf probe: Rename common fields/functions from kprobe to probe.Srikar Dronamraju5-106/+101
As a precursor for perf to support uprobes, rename fields/functions that had kprobe in their name but can be shared across perf-kprobes and perf-uprobes to probe. Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: "Frank Ch. Eigler" <fche@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Wielaard <mjw@redhat.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Naren A Devaiah <naren.devaiah@in.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <20100729141351.GG21723@linux.vnet.ibm.com> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tui: Make CTRL+Z suspend perfArnaldo Carvalho de Melo1-0/+9
Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf symbols: Improve debug image search when loading symbolsDave Martin1-35/+61
Changes: * Simplification of the main search loop on dso__load() * Replace the search with a 2-pass search: * First, try to find an image with a proper symtab. * Second, repeat the search, accepting dynsym. A second scan should only ever happen when needed debug images are missing from the buildid cache or stale, i.e., when the cache is out of sync. Currently, the second scan also happens when using separated debug images, since the caching logic doesn't currently know how to cache those. Improvements to the cache behaviour ought to solve that. Signed-off-by: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tools: remove extra build-id check factored into dso__loadDave Martin1-26/+2
Signed-off-by: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tools: Factor out buildid reading and make it implicit in dso__loadDave Martin1-33/+47
If we have a buildid, then we never want to load an image which has no buildid, or which has a different buildid, so it makes sense for the check to be built into dso__load and not done separately. This is fine for old distros which don't use buildid at all since we do no check in that case. This refactoring also alleviates some subtle race condition issues by not opening ELF images twice to check the buildid and then load the symbols, which could lead to weirdness if an image is replaced under our feet. Signed-off-by: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-29CRED: Fix __task_cred()'s lockdep check and banner commentDavid Howells3-5/+14
Fix __task_cred()'s lockdep check by removing the following validation condition: lockdep_tasklist_lock_is_held() as commit_creds() does not take the tasklist_lock, and nor do most of the functions that call it, so this check is pointless and it can prevent detection of the RCU lock not being held if the tasklist_lock is held. Instead, add the following validation condition: task->exit_state >= 0 to permit the access if the target task is dead and therefore unable to change its own credentials. Fix __task_cred()'s comment to: (1) discard the bit that says that the caller must prevent the target task from being deleted. That shouldn't need saying. (2) Add a comment indicating the result of __task_cred() should not be passed directly to get_cred(), but rather than get_task_cred() should be used instead. Also put a note into the documentation to enforce this point there too. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-29CRED: Fix get_task_cred() and task_state() to not resurrect dead credentialsDavid Howells3-21/+27
It's possible for get_task_cred() as it currently stands to 'corrupt' a set of credentials by incrementing their usage count after their replacement by the task being accessed. What happens is that get_task_cred() can race with commit_creds(): TASK_1 TASK_2 RCU_CLEANER -->get_task_cred(TASK_2) rcu_read_lock() __cred = __task_cred(TASK_2) -->commit_creds() old_cred = TASK_2->real_cred TASK_2->real_cred = ... put_cred(old_cred) call_rcu(old_cred) [__cred->usage == 0] get_cred(__cred) [__cred->usage == 1] rcu_read_unlock() -->put_cred_rcu() [__cred->usage == 1] panic() However, since a tasks credentials are generally not changed very often, we can reasonably make use of a loop involving reading the creds pointer and using atomic_inc_not_zero() to attempt to increment it if it hasn't already hit zero. If successful, we can safely return the credentials in the knowledge that, even if the task we're accessing has released them, they haven't gone to the RCU cleanup code. We then change task_state() in procfs to use get_task_cred() rather than calling get_cred() on the result of __task_cred(), as that suffers from the same problem. Without this change, a BUG_ON in __put_cred() or in put_cred_rcu() can be tripped when it is noticed that the usage count is not zero as it ought to be, for example: kernel BUG at kernel/cred.c:168! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/kernel/mm/ksm/run CPU 0 Pid: 2436, comm: master Not tainted 2.6.33.3-85.fc13.x86_64 #1 0HR330/OptiPlex 745 RIP: 0010:[<ffffffff81069881>] [<ffffffff81069881>] __put_cred+0xc/0x45 RSP: 0018:ffff88019e7e9eb8 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff880161514480 RCX: 00000000ffffffff RDX: 00000000ffffffff RSI: ffff880140c690c0 RDI: ffff880140c690c0 RBP: ffff88019e7e9eb8 R08: 00000000000000d0 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000040 R12: ffff880140c690c0 R13: ffff88019e77aea0 R14: 00007fff336b0a5c R15: 0000000000000001 FS: 00007f12f50d97c0(0000) GS:ffff880007400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8f461bc000 CR3: 00000001b26ce000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process master (pid: 2436, threadinfo ffff88019e7e8000, task ffff88019e77aea0) Stack: ffff88019e7e9ec8 ffffffff810698cd ffff88019e7e9ef8 ffffffff81069b45 <0> ffff880161514180 ffff880161514480 ffff880161514180 0000000000000000 <0> ffff88019e7e9f28 ffffffff8106aace 0000000000000001 0000000000000246 Call Trace: [<ffffffff810698cd>] put_cred+0x13/0x15 [<ffffffff81069b45>] commit_creds+0x16b/0x175 [<ffffffff8106aace>] set_current_groups+0x47/0x4e [<ffffffff8106ac89>] sys_setgroups+0xf6/0x105 [<ffffffff81009b02>] system_call_fastpath+0x16/0x1b Code: 48 8d 71 ff e8 7e 4e 15 00 85 c0 78 0b 8b 75 ec 48 89 df e8 ef 4a 15 00 48 83 c4 18 5b c9 c3 55 8b 07 8b 07 48 89 e5 85 c0 74 04 <0f> 0b eb fe 65 48 8b 04 25 00 cc 00 00 48 3b b8 58 04 00 00 75 RIP [<ffffffff81069881>] __put_cred+0xc/0x45 RSP <ffff88019e7e9eb8> ---[ end trace df391256a100ebdd ]--- Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-29perf symbols: Precisely specify if dso->{long,short}_name should be freedArnaldo Carvalho de Melo3-2/+8
Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-29watchdog: update MAINTAINERS entryWim Van Sebroeck1-0/+2
Add Mailing-list and website to watchdog MAINTAINERS entry. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2010-07-29perf record: Release resources at exitArnaldo Carvalho de Melo1-6/+26
So that we can reduce the noise on valgrind when looking for memory leaks. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-29ALSA: hda - Add a PC-beep workaround for ASUS P5-VTakashi Iwai1-8/+24
ASUS P5-V provides a SSID that unexpectedly matches with the value compilant with Realtek's specification. Thus the driver interprets it badly, resulting in non-working PC beep. This patch adds a white-list for such a case; a white-list of known devices with working PC beep. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29ARM: Add barriers to io{read,write}{8,16,32} accessors as wellRussell King1-20/+18
The ioread/iowrite accessors also need barriers as they're used in place of readl/writel et.al. in portable drivers. Create __iormb() and __iowmb() which are conditionally defined to be barriers dependent on ARM_DMA_MEM_BUFFERABLE, and always use these macros in the accessors. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLECatalin Marinas1-0/+11
When the coherent DMA buffers are mapped as Normal Non-cacheable (ARM_DMA_MEM_BUFFERABLE enabled), buffer accesses are no longer ordered with Device memory accesses causing failures in device drivers that do not use the mandatory memory barriers before starting a DMA transfer. LKML discussions led to the conclusion that such barriers have to be added to the I/O accessors: http://thread.gmane.org/gmane.linux.kernel/683509/focus=686153 http://thread.gmane.org/gmane.linux.ide/46414 http://thread.gmane.org/gmane.linux.kernel.cross-arch/5250 This patch introduces a wmb() barrier to the write*() I/O accessors to handle the situations where Normal Non-cacheable writes are still in the processor (or L2 cache controller) write buffer before a DMA transfer command is issued. For the read*() accessors, a rmb() is introduced after the I/O to avoid speculative loads where the driver polls for a DMA transfer ready bit. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29ARM: 6272/1: Convert L2x0 to use the IO relaxed operationsCatalin Marinas1-13/+13
This patch is in preparation for a subsequent patch which adds barriers to the I/O accessors. Since the mandatory barriers may do an L2 cache sync, this patch avoids a recursive call into l2x0_cache_sync() via the write*() accessors and wmb() and a call into l2x0_cache_sync() with the l2x0_lock held. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29ARM: 6271/1: Introduce *_relaxed() I/O accessorsCatalin Marinas1-12/+17
This patch introduces readl*_relaxed()/write*_relaxed() as the main I/O accessors (when __mem_pci is defined). The standard read*()/write*() macros are now based on the relaxed accessors. This patch is in preparation for a subsequent patch which adds barriers to the I/O accessors. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29ARM: 6275/1: ux500: don't use writeb() in uncompress.hRabin Vincent1-5/+5
Don't use writeb() in uncompress.h, to avoid the following build errors when the "Add barriers to the I/O accessors" series is applied. Use __raw_writeb() instead. arch/arm/boot/compressed/misc.o: In function `putc': arch/arm/mach-ux500/include/mach/uncompress.h:41: undefined reference to `outer_cache' Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29ARM: 6270/1: clean files in arch/arm/boot/compressed/Magnus Damm1-0/+3
Update the compressed boot Makefile for ARM to remove files during clean. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-29drm/edid: Fix the HDTV hack sync adjustmentAdam Jackson1-2/+2
We're adjusting horizontal timings only here, moving vsync was just a slavish translation of a typo in the X server. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-29drm/radeon/kms: fix radeon mid power profile reportingDaniel J Blueman1-0/+1
Fix incorrectly reporting 'default' power profile, when it is set to 'mid'. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-28ecryptfs: Bugfix for error related to ecryptfs_hash_bucketsAndre Osterhues1-8/+9
The function ecryptfs_uid_hash wrongly assumes that the second parameter to hash_long() is the number of hash buckets instead of the number of hash bits. This patch fixes that and renames the variable ecryptfs_hash_buckets to ecryptfs_hash_bits to make it clearer. Fixes: CVE-2010-2492 Signed-off-by: Andre Osterhues <aosterhues@escrypt.com> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-28x86,kgdb: Fix hw breakpoint regressionJason Wessel1-2/+7
HW breakpoints events stopped working correctly with kgdb as a result of commit: 018cbffe6819f6f8db20a0a3acd9bab9bfd667e4 (Merge commit 'v2.6.33' into perf/core). The regression occurred because the behavior changed for setting NOTIFY_STOP as the return value to the die notifier if the breakpoint was known to the HW breakpoint API. Because kgdb is using the HW breakpoint API to register HW breakpoints slots, it must also now implement the overflow_handler call back else kgdb does not get to see the events from the die notifier. The kgdb_ll_trap function will be changed to be general purpose code which can allow an easy way to implement the hw_breakpoint API overflow call back. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Dongdong Deng <dongdong.deng@windriver.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
2010-07-28GFS2: Use kmalloc when possible for ->readdir()Steven Whitehouse1-6/+25
If we don't need a huge amount of memory in ->readdir() then we can use kmalloc rather than vmalloc to allocate it. This should cut down on the greater overheads associated with vmalloc for smaller directories. We may be able to eliminate vmalloc entirely at some stage, but this is easy to do right away. Also using GFP_NOFS to avoid any issues wrt to deleting inodes while under a glock, and suggestion from Linus to factor out the alloc/dealloc. I've given this a test with a variety of different sized directories and it seems to work ok. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nick Piggin <npiggin@suse.de> Cc: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-28ALSA: hda - Assume PC-beep as default for RealtekTakashi Iwai1-3/+3
Enable PC-beep as default for hardwares that aren't compliant with the SSID value Realtek requires. In such a case, better to enable the beep to avoid a regression. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28ALSA: hda - Don't register beep input device when no beep is availableTakashi Iwai1-13/+19
We check now the availability of PC beep and skip the build of beep mixers, but the driver still registers the input device. This should be checked as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28perf man pages: Fix cut'n'paste errorArnaldo Carvalho de Melo1-4/+4
We remove files _from_ the cache. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-28davinci: da850/omap-l138 evm: account for DEFDCDC{2,3} being tied highSekhar Nori1-0/+8
Per the da850/omap-l138 Beta EVM SOM schematic, the DEFDCDC2 and DEFDCDC3 lines are tied high. This leads to a 3.3V IO and 1.2V CVDD voltage. Pass the right platform data to the TPS6507x driver so it can operate on the DEFDCDC{2,3}_HIGH register to read and change voltage levels. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-28regulator: tps6507x: allow driver to use DEFDCDC{2,3}_HIGH registerAnuj Aggarwal2-7/+61
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> In TPS6507x, depending on the status of DEFDCDC{2,3} pin either DEFDCDC{2,3}_LOW or DEFDCDC{2,3}_HIGH register needs to be read or programmed to change the output voltage. The current driver assumes DEFDCDC{2,3} pins are always tied low and thus operates only on DEFDCDC{2,3}_LOW register. This need not always be the case (as is found on OMAP-L138 EVM). Unfortunately, software cannot read the status of DEFDCDC{2,3} pins. So, this information is passed through platform data depending on how the board is wired. Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-28ALSA: hda - Fix pin-detection of Nvidia HDMITakashi Iwai2-0/+16
The behavior of Nvidia HDMI codec regarding the pin-detection unsol events is based on the old HD-audio spec, i.e. PD bit indicates only the update and doesn't show the current state. Since the current code assumes the new behavior, the pin-detection doesn't work relialby with these h/w. This patch adds a flag for indicating the old spec, and fixes the issue by checking the pin-detection explicitly for such hardware. Tested-by: Wei Ni <wni@nvidia.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-27gpio: fix spurious printk when freeing a gpioJon Povey1-3/+4
When freeing a gpio that has not been exported, gpio_unexport() prints a debug message when it should just fall through silently. Example spurious message: gpio_unexport: gpio0 status -22 Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk> Cc: David Brownell <david-b@pacbell.net> Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> Cc: Gregory Bean <gbean@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-27edac: mpc85xx: fix coldplug/hotplug module autoloadingAnton Vorontsov1-0/+3
The MPC85xx EDAC driver is missing module device aliases, so the driver won't load automatically on boot. This patch fixes the issue by adding proper MODULE_DEVICE_TABLE() macros. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Doug Thompson <dougthompson@xmission.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Dave Jiang <djiang@mvista.com> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-27drivers/rtc/rtc-rx8581.c: fix setdatetimeRudolf Marek1-3/+17
Fix the logic while writing new date/time to the chip. The driver incorrectly wrote back register values to different registers and even with wrong mask. The patch adds clearing of the VLF register, which should be cleared if all date/time values are set. Signed-off-by: Rudolf Marek <rudolf.marek@sysgo.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Martyn Welch <martyn.welch@gefanuc.com> 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>
2010-07-27dynamic debug: move ddebug_remove_module() down into free_module()Jason Baron1-1/+3
The command echo "file ec.c +p" >/sys/kernel/debug/dynamic_debug/control causes an oops. Move the call to ddebug_remove_module() down into free_module(). In this way it should be called from all error paths. Currently, we are missing the remove if the module init routine fails. Signed-off-by: Jason Baron <jbaron@redhat.com> Reported-by: Thomas Renninger <trenn@suse.de> Tested-by: Thomas Renninger <trenn@suse.de> Cc: <stable@kernel.org> [2.6.32+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-27ceph: use complete_all and wake_up_allYehuda Sadeh6-20/+20
This fixes an issue triggered by running concurrent syncs. One of the syncs would go through while the other would just hang indefinitely. In any case, we never actually want to wake a single waiter, so the *_all functions should be used. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-279p: Pass the correct end of buffer to p9stat_readLatchesar Ionkov1-1/+1
Pass the correct end of the buffer to p9stat_read. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-07-27[S390] etr: fix clock synchronization raceMartin Schwidefsky1-6/+12
The etr events switch-to-local and sync-check disable the synchronous clock and schedule a work queue that tries to get the clock back into sync. If another switch-to-local or sync-check event occurs while the work queue function etr_work_fn still runs the eacr.es bit and the clock_sync_word can become inconsistent because check_sync_clock only uses the clock_sync_word to determine if the clock is in sync or not. The second pass of the etr_work_fn will reset the eacr.es bit but will leave the clock_sync_word intact. Fix this race by moving the reset of the eacr.es bit into the switch-to-local and sync-check functions and by checking the eacr.es bit as well to decide if the clock needs to be synced. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-07-27[S390] Fix IRQ tracing in case of PERHeiko Carstens2-4/+20
In case user space is single stepped (PER) the program check handler claims too early that IRQs are enabled on the return path. Subsequent checks will notice that the IRQ mask in the PSW and what lockdep thinks the IRQ mask should be do not correlate and therefore will print a warning to the console and disable lockdep. Fix this by doing all the work within the correct context. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-07-27[SCSI] ibmvscsi: Fix oops when an interrupt is pending during probeAnton Blanchard1-6/+7
A driver needs to be ready to take an interrupt as soon as it registers an interrupt handler. I noticed the following oops when testing kdump: ipr: IBM Power RAID SCSI Device Driver version: 2.5.0 (February 11, 2010) ibmvscsi 30000002: SRP_VERSION: 16.a ibmvscsi 30000002: SRP_VERSION: 16.a Unable to handle kernel paging request for data at address 0x00000000 ... pc: c000000004085e34: .tasklet_action+0xf4/0x1dc ... c000000004086fe4 .__do_softirq+0x16c/0x2c0 c00000000403138c .call_do_softirq+0x14/0x24 c00000000400ee14 .do_softirq+0xa0/0x104 c00000000408690c .irq_exit+0x70/0xd0 c00000000400f190 .do_IRQ+0x214/0x2a8 c000000004004804 hardware_interrupt_entry+0x1c/0x98 --- Exception: 501 (Hardware Interrupt) at c00000000400c544 .raw_local_irq_restore+0x48/0x54 c00000000465d2a8 ._raw_spin_unlock_irqrestore+0x74/0xa0 c0000000040e7f00 .__setup_irq+0x2ec/0x3f0 c0000000040e8198 .request_threaded_irq+0x194/0x22c c00000000446d854 .rpavscsi_init_crq_queue+0x284/0x3f0 c00000000446c764 .ibmvscsi_probe+0x688/0x710 c00000000402903c .vio_bus_probe+0x37c/0x3e4 c000000004403f10 .driver_probe_device+0xec/0x1b8 c000000004404088 .__driver_attach+0xac/0xf4 c000000004403184 .bus_for_each_dev+0x98/0x104 c000000004403c98 .driver_attach+0x40/0x60 c0000000044026f0 .bus_add_driver+0x154/0x324 c0000000044045d0 .driver_register+0xe8/0x1ac c00000000402b2a8 .vio_register_driver+0x54/0x74 c000000004933ea4 .ibmvscsi_module_init+0x80/0xc0 c000000004009834 .do_one_initcall+0x98/0x1d8 c0000000049005b4 .kernel_init+0x27c/0x33c c000000004031550 .kernel_thread+0x54/0x70 srp_task needs to be setup before request_irq. The patch below fixes the oops. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27perf tools: Remove unneeded code for tracking the cwd in perf sessionsDave Martin5-29/+2
Tidy-up patch to remove some code and struct perf_session data members which are no longer needed due to the previous patch: "perf tools: Don't abbreviate file paths relative to the cwd". LKML-Reference: <new-submission> Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf report: Don't abbreviate file paths relative to the cwdDave Martin3-23/+3
This avoids around some problems where the full path is executables and DSOs it needed for finding debug symbols on platforms with separated debug symbol files such as Ubuntu. This is simpler than tracking an extra name for each image. The only impact should be that paths in verbose output from the perf tools become absolute, instead of relative to . LKML-Reference: <new-submission> Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: New hists tree widgetArnaldo Carvalho de Melo4-311/+678
The stock newt checkbox tree widget we were using was not really suitable for hist entry + callchain browsing. The problems with it were manifold: - We needed to traverse the whole hist_entry rb_tree to add each entry + callchains beforehand. - No control over the colors used for each row So a new tree widget, based mostly on slang, was written. It extends the ui_browser class already used for annotate to allow the user to fold/unfold branches in the callchains tree, using extra fields in the symbol_map class that is embedded in hist_entry and callchain_node instances to store the folding state and when changing this state calculates the number of rows that are produced when showing a particular hist_entry instance. This greatly speeds up browsing as we don't have to upfront touch all the entries and only calculate callchain related operations when some callchain branch is actually unfolded. The memory footprint is also reduced as the data structure is not duplicated, just some extra fields for controling callchain state and to simplify the process of seeking thru entries (nr_rows, row_offset) were added. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Show the scroll bar over the left window frameArnaldo Carvalho de Melo1-2/+2
So that we gain two columns and look more like classical (at least in TUIs) scroll bars bars. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Consider the refreshed dimensions in ui_browser__showArnaldo Carvalho de Melo1-2/+4
When we call ui_browser__show we may have called ui_browser__refresh_dimensions to check if the maximum lenght for the contained entries changed, such as when zooming in and out DSOs or threads in the hist browser. For that to happen we must delete the old form, that will take care of deleting the vertical scrollbar, etc, and then recreate them, with the new dimensions. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf hist: Introduce routine to measure lenght of formatted entryArnaldo Carvalho de Melo2-0/+30
Will be used to figure out the window width needed in the new tree widget. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Restore SPACE as an alias to PGDN in annotateArnaldo Carvalho de Melo1-0/+1
Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf, powerpc: Use perf_sample_data_init() for the FSL codePeter Zijlstra1-3/+3
We should use perf_sample_data_init() to initialize struct perf_sample_data. As explained in the description of commit dc1d628a ("perf: Provide generic perf_sample_data initialization"), it is possible for userspace to get the kernel to dereference data.raw, so if it is not initialized, that means that unprivileged userspace can possibly oops the kernel. Using perf_sample_data_init makes sure it gets initialized to NULL. This conversion should have been included in commit dc1d628a, but it got missed. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2010-07-27wm8350-regulator: fix wm8350_register_regulator error handlingAxel Lin1-1/+1
In the case of platform_device_add() fail, we should call platform_device_put() instead of platform_device_del() Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-27ab3100: fix off-by-one value range checking for voltage selectorAxel Lin1-2/+2
We use voltage selector as an array index for typ_voltages. Thus the valid range for voltage selector should be 0..voltages_len-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-26s2io: fixing DBG_PRINT() macroBreno Leitao1-1/+1
Patch 9e39f7c5b311a306977c5471f9e2ce4c456aa038 changed the DBG_PRINT() macro and the if clause was wrongly changed. It means that currently all the DBG_PRINT are being printed, flooding the kernel log buffer with things like: s2io: eth6: Next block at: c0000000b9c90000 s2io: eth6: In Neterion Tx routine Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-26drm/i915: make sure we shut off the panel in eDP configsJesse Barnes1-1/+1
Fix error from the last pull request. Making sure we shut the panel off is more correct and saves power. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>