Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Al Viro
On Sat, Mar 16, 2013 at 10:51:18AM -0700, Joe Perches wrote: This is certainly a neat trick. But I don't really like the fact that it complicates things for every future code reader, especially when a trivial change in the caller would accomplish the same thing. Do you have any idea

Re: [RFC PATCH 0/2] fs: sysfs: Add devres support

2013-03-16 Thread Guenter Roeck
Adding lm-sensors. On Sat, Mar 16, 2013 at 09:21:40AM -0700, Greg Kroah-Hartman wrote: On Thu, Mar 14, 2013 at 08:24:45PM -0700, Guenter Roeck wrote: Provide devres functions for device_create_file, sysfs_create_file, and sysfs_create_group plus the respective remove functions. Idea is

Re: + atomic-improve-atomic_inc_unless_negative-atomic_dec_unless_positive .patch added to -mm tree

2013-03-16 Thread Oleg Nesterov
On 03/15, Frederic Weisbecker wrote: 2013/3/15 Oleg Nesterov o...@redhat.com: do_something() looks fine, if atomic_add_unless_negative() succeeds we do have a barrier? Ok, I guess the guarantee of a barrier in case of failure is probably not needed. But since the only way to safely read

RE: [PATCH v2 1/4] introduce zero filled pages handler

2013-03-16 Thread Dan Magenheimer
From: Konrad Rzeszutek Wilk [mailto:kon...@darnok.org] Subject: Re: [PATCH v2 1/4] introduce zero filled pages handler + + for (pos = 0; pos PAGE_SIZE / sizeof(*page); pos++) { + if (page[pos]) + return false; Perhaps allocate a static page filled with

Re: use after free in sysfs_find_dirent

2013-03-16 Thread Sasha Levin
On 03/16/2013 11:58 AM, Ming Lei wrote: On Sat, Mar 16, 2013 at 11:22 PM, Ming Lei tom.leim...@gmail.com wrote: On Sat, Mar 16, 2013 at 11:07 PM, Sasha Levin levinsasha...@gmail.com wrote: Hi Ming, With your patch: [ 1525.874312] release_sysfs_dirent sysfs_dirent use after free:

Re: + atomic-improve-atomic_inc_unless_negative-atomic_dec_unless_positive .patch added to -mm tree

2013-03-16 Thread Oleg Nesterov
On 03/15, Paul E. McKenney wrote: On Fri, Mar 15, 2013 at 07:34:32PM +0100, Frederic Weisbecker wrote: 2013/3/15 Oleg Nesterov o...@redhat.com: My point was: should we fix atomic_add_unless() then? If not, why should atomic_add_unless_negative() differ? They shouldn't differ I

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Steven Rostedt
On Sat, 2013-03-16 at 18:01 +, Al Viro wrote: On Sat, Mar 16, 2013 at 10:51:18AM -0700, Joe Perches wrote: This is certainly a neat trick. But I don't really like the fact that it complicates things for every future code reader, especially when a trivial change in the caller

Re: [PATCHv2] ARM: Push selects for TWD/SCU into machine entries

2013-03-16 Thread Stephen Boyd
On 3/5/2013 2:34 PM, Arnd Bergmann wrote: On Tuesday 05 March 2013, Stephen Boyd wrote: On 02/27/13 15:43, Stephen Warren wrote: Seems simple enough it doesn't really need many, but for Tegra, Acked-by: Stephen Warren swar...@nvidia.com Which kernel is this going into? It's possible Tegra

Re: [PATCH 1/4] Input: cyapa - Move common initialization to cyapa_detect

2013-03-16 Thread Henrik Rydberg
Hi Benson, cyapa_check_is_operational and cyapa_create_input_dev are common to the probe and firmware update paths. Pull those out into cyapa_detect. Signed-off-by: Benson Leung ble...@chromium.org --- drivers/input/mouse/cyapa.c | 57 +++-- 1

RAMster selects HAVE_ALIGNED_STRUCT_PAGE on 64 bit systems when it should not

2013-03-16 Thread Martin Walch
At drivers/staging/zcache/Kconfig:13 it says config RAMSTER bool Cross-machine RAM capacity sharing, aka peer-to-peer tmem depends on CONFIGFS_FS=y SYSFS=y !HIGHMEM ZCACHE=y depends on NET # must ensure struct page is 8-byte aligned select

Re: vfs: lockdep splat with prepare_bprm_creds

2013-03-16 Thread Al Viro
On Fri, Mar 15, 2013 at 07:19:56PM +0100, Oleg Nesterov wrote: On 03/15, Al Viro wrote: On Fri, Mar 15, 2013 at 12:07:14AM -0400, Sasha Levin wrote: Hi all, While fuzzing with trinity inside a KVM tools guest running latest -next kernel I've stumbled on the following.

Re: [RFC PATCH 0/2] fs: sysfs: Add devres support

2013-03-16 Thread Greg Kroah-Hartman
On Sat, Mar 16, 2013 at 11:12:53AM -0700, Guenter Roeck wrote: Adding lm-sensors. On Sat, Mar 16, 2013 at 09:21:40AM -0700, Greg Kroah-Hartman wrote: On Thu, Mar 14, 2013 at 08:24:45PM -0700, Guenter Roeck wrote: Provide devres functions for device_create_file, sysfs_create_file, and

Re: [PATCH 2/4] Input: cyapa - Firmware update via request firmware

2013-03-16 Thread Henrik Rydberg
Hi Benson, From: Daniel Kurtz djku...@chromium.org Use the kernel request_firmware API to allow a hotplug script to load new firmware into CYAPA device. When request_firmware is called by a driver, the kernel creates 'loading' and 'data' sysfs entries, and generates a firmware udev event

Re: CONFIG_EARLY_PRINTK

2013-03-16 Thread Geert Uytterhoeven
On Sat, Mar 16, 2013 at 6:38 PM, Randy Dunlap rdun...@infradead.org wrote: On 03/16/13 08:08, Thomas Meyer wrote: Am Mittwoch, den 13.03.2013, 12:56 -0700 schrieb Randy Dunlap: On 03/13/13 10:15, Thomas Meyer wrote: help text says: You should normally N here, unless you want to debug such a

Re: BUG: IPv4: Attempt to release TCP socket in state 1

2013-03-16 Thread dormando
On Sat, 2013-03-16 at 10:36 -0700, Eric Dumazet wrote: On Fri, 2013-03-15 at 00:19 +0100, Eric Dumazet wrote: Thanks thats really useful, we might miss to increment socket refcount in a timer setup. Hmm, please add following debugging patch as well diff --git

[PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Oleg Nesterov
On 03/15, Oleg Nesterov wrote: To remind, say, argv_split(poweroff_cmd) can race with sysctl changing this string, in this case it can write to the memory after argv[] array. We can fix this, or we can rewrite argv_split/free: OK, please see 1/2. And this reminds me about set_task_comm()

[PATCH 1/2] teach argv_split() to handle the mutable strings

2013-03-16 Thread Oleg Nesterov
argv_split() allocates argv[count_argc(str)] array and assumes that it will find the same number of arguments later. This is obviously wrong if this string can be changed, say, by sysctl. With this patch argv_split() kstrndup's the whole string and does not split it, we simply replace the spaces

[PATCH 2/2] set_task_comm: kill the pointless memset() + wmb()

2013-03-16 Thread Oleg Nesterov
set_task_comm() does memset() + wmb() before strlcpy(). This buys nothing but adds the confusion, the comment is wrong. - We do not need memset() to be safe from non-terminating string reads, the final char is always zero and we never change it. - wmb() is paired with nothing, it can't not

Re: [PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Andi Kleen
On Sat, Mar 16, 2013 at 09:23:27PM +0100, Oleg Nesterov wrote: On 03/15, Oleg Nesterov wrote: To remind, say, argv_split(poweroff_cmd) can race with sysctl changing this string, in this case it can write to the memory after argv[] array. We can fix this, or we can rewrite argv_split/free:

Re: RAMster selects HAVE_ALIGNED_STRUCT_PAGE on 64 bit systems when it should not

2013-03-16 Thread Paul Bolle
On Sat, 2013-03-16 at 20:35 +0100, Martin Walch wrote: 64_BIT should probably say 64BIT which has corresponding config sections in arch/{x86,ia64,mips,s390,tile,alpha,arm64,sparc,parisc,powerpc}/Kconfig and arch/x86/um/Kconfig. I do not know if there are any bad consequences about this,

Re: [PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Oleg Nesterov
On 03/16, Andi Kleen wrote: On Sat, Mar 16, 2013 at 09:23:27PM +0100, Oleg Nesterov wrote: On 03/15, Oleg Nesterov wrote: To remind, say, argv_split(poweroff_cmd) can race with sysctl changing this string, in this case it can write to the memory after argv[] array. We can fix

Re: [PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Andi Kleen
Perhaps rcu can be better, although a global rwsem looks simpler, I dunno. It's a general problem with lots of sysctls. But argv_split() or its usage should be changed anyway, and GFP_KERNEL won't work under rcu_read_lock(). rcu strings has a helper function to copy the string for sleepy

[PATCH 0/2] Drivers: hv: balloon

2013-03-16 Thread K. Y. Srinivasan
Support 2M page allocations when memory is ballooned out of the guest. Hyper-V Dynamic Memory protocol is optimized around the ability to move memory in 2M chunks. K. Y. Srinivasan (2): mm: Export split_page() Drivers: hv: balloon: Support 2M page allocations for ballooning

[PATCH 1/2] mm: Export split_page()

2013-03-16 Thread K. Y. Srinivasan
The split_page() function will be very useful for balloon drivers. On Hyper-V, it will be very efficient to use 2M allocations in the guest as this (a) makes the ballooning protocol with the host that much more efficient and (b) moving memory in 2M chunks minimizes fragmentation in the host.

[PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for ballooning

2013-03-16 Thread K. Y. Srinivasan
While ballooning memory out of the guest, attempt 2M allocations first. If 2M allocations fail, then go for 4K allocations. In cases where we have performed 2M allocations, split this 2M page so that we can free this page at 4K granularity (when the host returns the memory). Signed-off-by: K. Y.

Re: [RFC PATCH 0/2] fs: sysfs: Add devres support

2013-03-16 Thread Guenter Roeck
On Sat, Mar 16, 2013 at 12:50:02PM -0700, Greg Kroah-Hartman wrote: On Sat, Mar 16, 2013 at 11:12:53AM -0700, Guenter Roeck wrote: Adding lm-sensors. On Sat, Mar 16, 2013 at 09:21:40AM -0700, Greg Kroah-Hartman wrote: On Thu, Mar 14, 2013 at 08:24:45PM -0700, Guenter Roeck wrote:

Re: [PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Oleg Nesterov
On 03/16, Andi Kleen wrote: Perhaps rcu can be better, although a global rwsem looks simpler, I dunno. It's a general problem with lots of sysctls. But argv_split() or its usage should be changed anyway, and GFP_KERNEL won't work under rcu_read_lock(). rcu strings has a helper

[PATCH] checkpatch: stop checking for CONFIG_EXPERIMENTAL

2013-03-16 Thread Paul Bolle
CONFIG_EXPERIMENTAL has been removed from the tree, in commit 3d374d09f16f64ab4d71704cbe621514d36cd0b1 (final removal of CONFIG_EXPERIMENTAL). There's no need to test for it in checkpatch anymore. If it ever pops up again it can be caught when someone feels like cleaning up invalid Kconfig symbols

[PATCH] udevadm-info: Don't access sysfs entries backing device I/O port space

2013-03-16 Thread Myron Stowe
I've been working on identifying the root cause of an issue exposed by 'udevadm' that was first exposed on the linux-pci mail list [1] and believe that there is now enough of an understanding to propose a fix. What was originally witnessed was the platform hanging after udevadm info

[PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Myron Stowe
Sysfs includes entries to memory that backs a PCI device's BARs, both I/O Port space and MMIO. This memory regions correspond to the device's internal status and control registers used to drive the device. Accessing these registers from userspace such as udevadm info --attribute-walk

Re: [PATCH 0/2] finx argv_split() vs sysctl race

2013-03-16 Thread Andi Kleen
On Sat, Mar 16, 2013 at 10:23:51PM +0100, Oleg Nesterov wrote: On 03/16, Andi Kleen wrote: Perhaps rcu can be better, although a global rwsem looks simpler, I dunno. It's a general problem with lots of sysctls. But argv_split() or its usage should be changed anyway, and

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Eric Wong
Eric Wong normalper...@yhbt.net wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory. + */ +#define CMM_LOAD_SHARED(p)

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Parag Warudkar
On Sat, Mar 16, 2013 at 1:56 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Sat, Mar 16, 2013 at 9:11 AM, Parag Warudkar parag.l...@gmail.com wrote: This seems to trigger a WARN_ON during suspend/resume. Ugh, yes. It's practically harmless, but it's ugly and technically wrong

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Greg KH
On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: Sysfs includes entries to memory that backs a PCI device's BARs, both I/O Port space and MMIO. This memory regions correspond to the device's internal status and control registers used to drive the device. Accessing these

Re: [PATCH] checkpatch: stop checking for CONFIG_EXPERIMENTAL

2013-03-16 Thread Greg Kroah-Hartman
On Sat, Mar 16, 2013 at 10:30:35PM +0100, Paul Bolle wrote: 1) A lot of defconfigs still have CONFIG_EXPERIMENTAL in them. How should that be cleaned up? Just ignore it, when ever those defconfigs ever get used, or updated, it will fall out automatically. thanks, greg k-h -- To unsubscribe

Re: RAMster selects HAVE_ALIGNED_STRUCT_PAGE on 64 bit systems when it should not

2013-03-16 Thread Greg Kroah-Hartman
On Sat, Mar 16, 2013 at 09:47:24PM +0100, Paul Bolle wrote: On Sat, 2013-03-16 at 20:35 +0100, Martin Walch wrote: 64_BIT should probably say 64BIT which has corresponding config sections in arch/{x86,ia64,mips,s390,tile,alpha,arm64,sparc,parisc,powerpc}/Kconfig and arch/x86/um/Kconfig.

Re: [PATCH] checkpatch: stop checking for CONFIG_EXPERIMENTAL

2013-03-16 Thread Kees Cook
On Sat, Mar 16, 2013 at 2:30 PM, Paul Bolle pebo...@tiscali.nl wrote: CONFIG_EXPERIMENTAL has been removed from the tree, in commit 3d374d09f16f64ab4d71704cbe621514d36cd0b1 (final removal of CONFIG_EXPERIMENTAL). There's no need to test for it in checkpatch anymore. If it ever pops up again it

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Bjorn Helgaas
On Sat, Mar 16, 2013 at 4:11 PM, Greg KH gre...@linuxfoundation.org wrote: On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: Sysfs includes entries to memory that backs a PCI device's BARs, both I/O Port space and MMIO. This memory regions correspond to the device's internal status

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Myron Stowe
On Sat, 2013-03-16 at 15:11 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: Sysfs includes entries to memory that backs a PCI device's BARs, both I/O Port space and MMIO. This memory regions correspond to the device's internal status and control registers

Re: [PATCH 3/3] misc: ep93xx_pwm.c: fix section mismatch and use module_platform_driver

2013-03-16 Thread Ryan Mallon
On 17/03/13 01:57, Arnd Bergmann wrote: On Saturday 16 March 2013, H Hartley Sweeten wrote: Remove the __init tags from the ep93xx_pwm_probe() and ep93xx_pwm_remove() functions to fix the section mismatch warnings. Use module_platform_driver() to remove the init/exit boilerplate.

Re: [PATCH 2/2] PCI: fix system hang issue of Marvell SATA host controller

2013-03-16 Thread Myron Stowe
On Thu, Mar 14, 2013 at 9:03 AM, Myron Stowe myron.st...@gmail.com wrote: On Wed, Mar 13, 2013 at 3:40 AM, Xiangliang Yu yuxia...@marvell.com wrote: Hi, Bjorn Now, the situation is like this: I captured the PCIE trace with analyzer and found that 1st BE is 0x when accessing IO

Re: ptracing a task from core_pattern pipe

2013-03-16 Thread Daniel Walker
On Sat, Mar 16, 2013 at 06:58:45PM +0100, Oleg Nesterov wrote: On 03/15, Daniel Walker wrote: I was writing an application to ptrace a process which is dumping core from inside the pipe application for core_pattern. This was never possible. And never will, I think. So for example you

Re: Regression: Fixing recursive fault but reboot is needed at boot on HP 6730B - bisected

2013-03-16 Thread Rafael J. Wysocki
On Saturday, March 16, 2013 08:10:11 AM Roberto Oppedisano wrote: Il 15/03/2013 18:13, Rafael J. Wysocki ha scritto: Here's the new suspect: f95988de06ea62ef5bd861f06e9ef56cea405ed1 is the first bad commit commit f95988de06ea62ef5bd861f06e9ef56cea405ed1 Author: Rafael J. Wysocki

Re: use after free in sysfs_find_dirent

2013-03-16 Thread Ming Lei
On Sun, Mar 17, 2013 at 2:33 AM, Sasha Levin levinsasha...@gmail.com wrote: I don't think it shows what we want it to show thought: [ 327.416905] Pid: 10504, comm: trinity-child98 Tainted: GW 3.9.0-rc2-next-20130315-sasha-00046-gecde602-dirty #301 [ 327.418815] Call Trace: [

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Greg KH
On Sat, Mar 16, 2013 at 05:50:53PM -0600, Myron Stowe wrote: On Sat, 2013-03-16 at 15:11 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: Sysfs includes entries to memory that backs a PCI device's BARs, both I/O Port space and MMIO. This memory regions

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Eric Wong normalper...@yhbt.net wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory.

Re: [PATCH] hw_random: free rng_buffer at module exit

2013-03-16 Thread Ben Hutchings
On Fri, 2013-03-15 at 15:35 +1030, Rusty Russell wrote: Satoru Takeuchi satoru.takeu...@gmail.com writes: At Thu, 14 Mar 2013 17:11:21 +1030, Rusty Russell wrote: Satoru Takeuchi satoru.takeu...@gmail.com writes: Hi Rusty, At Tue, 12 Mar 2013 15:43:33 -0700, Greg

Re: [Suggestion] Latest randconfig build errors for Head.S

2013-03-16 Thread Chen Gang F T
On 2013年03月15日 19:29, Arnd Bergmann wrote: On Friday 15 March 2013, Chen Gang F T wrote: excuse me, my English is not quite well. I guess your meaning is: that bug means the toolchain's bug (need toolchain people fix it). prefer to apply your patch, before that bug is fixed

Re: Bug involving dynamic_debug and '-p' modifier

2013-03-16 Thread Jason Baron
Hi Andrew, Thanks for the bug report. I need to send a patch to update the maintainers file... Haven't had a chance to look into this yet. Will get back to you. Thanks, -Jason On 03/11/2013 10:28 PM, Andrew Cooks wrote: On Tue, Mar 12, 2013 at 9:14 AM, Andrew Cooks aco...@gmail.com wrote:

Re: [PATCH 3.2] iommu/amd: Initialize device table after dma_ops

2013-03-16 Thread Ben Hutchings
On Sun, 2013-03-03 at 23:58 +0100, Joerg Roedel wrote: Hi Ben, On Sat, Mar 02, 2013 at 11:00:35PM +, Ben Hutchings wrote: I'm not convinced about this backport, because the order of initialisation already changed a lot after 3.2 and before the upstream commit. So I'm going to wait

Re: [PATCH] tty: Correct tty buffer flush.

2013-03-16 Thread Ben Hutchings
On Mon, 2013-03-04 at 23:19 +0400, Ilya Zykov wrote: On 03.12.2012 13:54, Ilya Zykov wrote: The root of problem is carelessly zeroing pointer(in function __tty_buffer_flush()), when another thread can use it. It can be cause of NULL pointer dereference. Main idea of the patch,

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Alex Williamson
On Sat, 2013-03-16 at 18:03 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 05:50:53PM -0600, Myron Stowe wrote: On Sat, 2013-03-16 at 15:11 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote: Sysfs includes entries to memory that backs a PCI device's BARs,

Re: [PATCH] mm/fremap.c: fix another oops on error path

2013-03-16 Thread Michel Lespinasse
On Sat, Mar 16, 2013 at 8:23 AM, Ming Lei tom.leim...@gmail.com wrote: Since find_vma() may return NULL, so don't dereference the returned 'vma' until it is valid. Agree this was an issue. This is fixed with commit a2362d24764a. -- Michel Walken Lespinasse A program is never fully debugged

Re: Fix memory leak in cpufreq stats.

2013-03-16 Thread Ben Hutchings
On Mon, 2013-03-11 at 18:23 -0700, Colin Cross wrote: On Mon, Oct 15, 2012 at 1:30 PM, Rafael J. Wysocki r...@sisk.pl wrote: On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote: Fix memory leak in cpufreq stats. When system enter sleep, non-boot CPUs will be disable. Cpufreq

Re: [PATCH V4] ARM: dts: add minimal DT support for DevKit8000.

2013-03-16 Thread Anil Kumar
Hi Benoit, On Thu, Mar 7, 2013 at 12:21 PM, Benoit Cousson b-cous...@ti.com wrote: Hi, On 03/06/2013 06:53 PM, Tony Lindgren wrote: * Anil Kumar anilk...@gmail.com [130305 18:40]: Hi Tony, From: linux-arm-kernel [mailto:linux-arm-kernel- boun...@lists.infradead.org] On Behalf Of Anil

Re: [PATCH] udevadm-info: Don't access sysfs 'resourceN' files

2013-03-16 Thread Greg KH
On Sat, Mar 16, 2013 at 10:11:22PM -0600, Alex Williamson wrote: On Sat, 2013-03-16 at 18:03 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 05:50:53PM -0600, Myron Stowe wrote: On Sat, 2013-03-16 at 15:11 -0700, Greg KH wrote: On Sat, Mar 16, 2013 at 03:35:19PM -0600, Myron Stowe wrote:

<    1   2   3   4