Re: [PATCH v4 0/3] x86/fpu: prevent leaking FPU registers via invalid FPU state

2017-09-23 Thread Ingo Molnar
* Eric Biggers wrote: > From: Eric Biggers > > This series fixes the bug found by syzkaller where the ptrace syscall > can be used to set invalid bits in a task's FPU state. I also found > that an equivalent bug was reachable using the sigreturn

Re: [PATCH] auxdisplay: change PANEL to menuconfig

2017-09-23 Thread Geert Uytterhoeven
On Fri, Sep 22, 2017 at 10:20 PM, Randy Dunlap wrote: > From: Randy Dunlap > > This change makes xconfig present the PANEL drivers immediately > following the AUXDISPLAY drivers instead of under the major menu > item "Device Drivers". It also

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rafael J. Wysocki
On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki wrote: > On Thursday, September 21, 2017 3:13:56 AM CEST Rajat Jain wrote: >> On Wed, Sep 20, 2017 at 5:24 PM, Rafael J. Wysocki wrote: >> > On Thu, Sep 21, 2017 at 12:31 AM, Rajat Jain

[PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Ingo Molnar
So I'd like to push these changes to Linus tomorrow-ish as an RFC pull request in 1-2 days, because there's now 4 fixes depending on these changes, and because the result will be more maintainable for the LTS v4.14 kernel. The biggest changes from the earlier iterations is the fixes from Eric

[PATCH 01/33] x86/fpu: Rename copyin_to_xsaves()/copyout_from_xsaves() to copy_user_to_xstate()/copy_xstate_to_user()

2017-09-23 Thread Ingo Molnar
The 'copyin/copyout' nomenclature needlessly departs from what the modern FPU code uses, which is: copy_fpregs_to_fpstate() copy_fpstate_to_sigframe() copy_fregs_to_user() copy_fxregs_to_kernel() copy_fxregs_to_user() copy_kernel_to_fpregs() copy_kernel_to_fregs() copy_kernel_to_fxregs()

[PATCH 04/33] x86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs

2017-09-23 Thread Ingo Molnar
The 'kbuf' parameter is unused in the _user() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu

[PATCH 09/33] x86/fpu: Change 'size_total' parameter to unsigned and standardize the size checks in copy_xstate_to_*()

2017-09-23 Thread Ingo Molnar
'size_total' is derived from an unsigned input parameter - and then converted to 'int' and checked for negative ranges: if (size_total < 0 || offset < size_total) { This conversion and the checks are unnecessary obfuscation, reject overly large requested copy sizes outright and simplify

[PATCH 14/33] x86/fpu: Flip the parameter order in copy_*_to_xstate()

2017-09-23 Thread Ingo Molnar
Make it more consistent with regular memcpy() semantics, where the destination argument comes first. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H.

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Sat, Sep 23, 2017 at 12:53:18PM +0200, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > > > > > Patch 2 is the last fix needed for

[PATCH 11/33] x86/fpu: Split copy_user_to_xstate() into copy_kernel_to_xstate() & copy_user_to_xstate()

2017-09-23 Thread Ingo Molnar
Similar to: x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user() No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc:

[PATCH 19/33] x86/fpu: Decouple fpregs_activate()/fpregs_deactivate() from fpu->fpregs_active

2017-09-23 Thread Ingo Molnar
The fpregs_activate()/fpregs_deactivate() are currently called in such a pattern: if (!fpu->fpregs_active) fpregs_activate(fpu); ... if (fpu->fpregs_active) fpregs_deactivate(fpu); But note that it's actually safe to call them without

[PATCH 12/33] x86/fpu: Remove 'ubuf' parameter from the copy_kernel_to_xstate() API

2017-09-23 Thread Ingo Molnar
No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov

[PATCH 16/33] x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic

2017-09-23 Thread Ingo Molnar
Do this temporarily only, to make it easier to change the FPU state machine, in particular this change couples the fpu->fpregs_active and fpu->fpstate_active states: they are only set/cleared together (as far as the scheduler sees them). This will be removed by later patches. Cc: Andy Lutomirski

[PATCH 10/33] x86/fpu: Simplify __copy_xstate_to_kernel() return values

2017-09-23 Thread Ingo Molnar
__copy_xstate_to_kernel() can only return 0 (because kernel copies cannot fail), simplify the code throughout. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu

[PATCH 21/33] x86/fpu: Add FPU state copying quirk to handle XRSTOR failure on Intel Skylake CPUs

2017-09-23 Thread Ingo Molnar
From: Rik van Riel On Skylake CPUs I noticed that XRSTOR is unable to deal with states created by copyout_from_xsaves() if the xstate has only SSE/YMM state, and no FP state. That is, xfeatures had XFEATURE_MASK_SSE set, but not XFEATURE_MASK_FP. The reason is that part of the

[PATCH] Revert "f2fs: node segment is prior to data segment selected victim"

2017-09-23 Thread Yunlong Song
This reverts commit b9cd20619e359d199b755543474c3d853c8e3415. That patch causes much fewer node segments (which can be used for SSR) than before, and in the corner case (e.g. create and delete *.txt files in one same directory, there will be very few node segments but many data segments), if the

[PATCH] drm/tinydrm: Replace dev_error with DRM_DEV_ERROR

2017-09-23 Thread Harsha Sharma
Convert instances of dev_error to DRM_DEV_ERROR as we have DRM_DEV_ERROR variants of drm print macros. Signed-off-by: Harsha Sharma --- drivers/gpu/drm/tinydrm/mi0283qt.c | 8 drivers/gpu/drm/tinydrm/repaper.c | 26 +-

[PATCH] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
* Eric Biggers wrote: > On Fri, Sep 22, 2017 at 07:33:14AM +0200, Ingo Molnar wrote: > > > > * Eric Biggers wrote: > > > > > From: Eric Biggers > > > > > > This series fixes the bug found by syzkaller where the ptrace syscall >

Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized

2017-09-23 Thread Ingo Molnar
* Jean Delvare wrote: > I don't think it makes sense to check for a possible bad > initialization order at run time on every system when it is all > decided at build time. > > A more efficient way to make sure developers do not introduce new > calls to dmi_check_system() too

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Stefan Wahren
Hi Greg, > Phil Elwell hat am 11. August 2017 um 12:20 > geschrieben: > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > block in the success case, causing a stale pointer to be used with > potentially fatal results. Only free the vchi_instance

[tip:x86/urgent] x86/asm: Fix inline asm call constraints for Clang

2017-09-23 Thread tip-bot for Josh Poimboeuf
Commit-ID: f5caf621ee357279e759c0911daf6d55c7d36f03 Gitweb: http://git.kernel.org/tip/f5caf621ee357279e759c0911daf6d55c7d36f03 Author: Josh Poimboeuf AuthorDate: Wed, 20 Sep 2017 16:24:33 -0500 Committer: Ingo Molnar CommitDate: Sat, 23 Sep 2017

[tip:x86/urgent] objtool: Handle another GCC stack pointer adjustment bug

2017-09-23 Thread tip-bot for Josh Poimboeuf
Commit-ID: 0d0970eef3b03ef08b19da5bc3044410731cf38f Gitweb: http://git.kernel.org/tip/0d0970eef3b03ef08b19da5bc3044410731cf38f Author: Josh Poimboeuf AuthorDate: Wed, 20 Sep 2017 16:24:32 -0500 Committer: Ingo Molnar CommitDate: Sat, 23 Sep 2017

[PATCH] kfifo: Fix some typo

2017-09-23 Thread Christophe JAILLET
Fix some typo. Signed-off-by: Christophe JAILLET --- include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 41eb6fdf87a8..7b45959ebd92 100644 --- a/include/linux/kfifo.h

Re: [PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Steven Rostedt
On Fri, 22 Sep 2017 23:07:37 -0700 "Paul E. McKenney" wrote: > OK, how about the following? > > It turns out that functions called from rcu_irq_enter() can > be subject to various kinds of tracing, which can result in > rcu_irq_enter() being invoked

[PATCH 31/33] x86/fpu: Simplify and speed up fpu__copy()

2017-09-23 Thread Ingo Molnar
fpu__copy() has a preempt_disable()/enable() pair, which it had to do to be able to atomically unlazy the current task when doing an FNSAVE. But we don't unlazy tasks anymore, we always do direct saves/restores of FPU context. So remove both the unnecessary critical section, and update the

[PATCH 26/33] x86/fpu: Reinitialize FPU registers if restoring FPU state fails

2017-09-23 Thread Ingo Molnar
From: Eric Biggers Userspace can change the FPU state of a task using the ptrace() or rt_sigreturn() system calls. Because reserved bits in the FPU state can cause the XRSTOR instruction to fail, the kernel has to carefully validate that no reserved bits or other invalid

[PATCH 29/33] x86/fpu: Rename fpu::fpstate_active to fpu::initialized

2017-09-23 Thread Ingo Molnar
The x86 FPU code used to have a complex state machine where both the FPU registers and the FPU state context could be 'active' (or inactive) independently of each other - which enabled features like lazy FPU restore. Much of this complexity is gone in the current code: now we basically can have

[PATCH 27/33] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
fpu__activate_fpstate_read() can only ever be called for a non-current, non-executing (stopped) task - so make sure this is checked via a warning and remove the current-task logic. This also fixes an incorrect (but harmless) warning introduced by one of the earlier patches. Cc: Andy Lutomirski

[PATCH 32/33] x86/fpu: Rename fpu__activate_curr() to fpu__initialize()

2017-09-23 Thread Ingo Molnar
Rename this function to better express that it's all about initializing the FPU state of a task which goes hand in hand with the fpu::initialized field. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers Cc: Fenghua Yu

[PATCH 23/33] x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU()

2017-09-23 Thread Ingo Molnar
From: Andi Kleen copy_xregs_to_kernel checks if the alternatives have been already patched. This WARN_ON() is always executed in every context switch. All the other checks in fpu internal.h are WARN_ON_FPU(), but this one is plain WARN_ON(). I assume it was forgotten to

[PATCH 33/33] x86/fpu: Rename fpu__activate_fpstate_read/write() to fpu__read/write()

2017-09-23 Thread Ingo Molnar
As per the new nomenclature we don't 'activate' the FPU state anymore, we initialize it. So drop the _activate_fpstate name from these functions, which were a bit of a mouthful anyway. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Eric Biggers

[PATCH 28/33] x86/fpu: Remove fpu__current_fpstate_write_begin/end()

2017-09-23 Thread Ingo Molnar
These functions are not used anymore, so remove them. Cc: Andy Lutomirski Cc: Bobby Powers Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu

[PATCH 30/33] x86/fpu: Fix stale comments about lazy FPU logic

2017-09-23 Thread Ingo Molnar
We don't do any lazy restore anymore, what we have are two pieces of optimization: - no-FPU tasks that don't save/restore the FPU context (kernel threads are such) - cached FPU registers maintained via the fpu->last_cpu field. This means that if an FPU task context switches to a non-FPU

[Question] null pointer risk of kernel workqueue

2017-09-23 Thread tanxiaofei
Hi Tejun & Jiangshan, I find an null pointer risk in the code of workqueue. Here is description: If draining, __queue_work() will call the function is_chained_work() to do some checks. In is_chained_work(), worker->current_pwq is used directly. It should be not safe.

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Ingo Molnar
* Josh Poimboeuf wrote: > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > Patch 2 is the last fix needed for clang to be able to compile and boot > the kernel. > > Josh Poimboeuf (2): > objtool: Handle another GCC stack pointer adjustment

Re: [PATCH] x86/fpu: Simplify fpu__activate_fpstate_read()

2017-09-23 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Eric Biggers wrote: > > > On Fri, Sep 22, 2017 at 07:33:14AM +0200, Ingo Molnar wrote: > > > > > > * Eric Biggers wrote: > > > > > > > From: Eric Biggers > > > > > > > > This

[PATCH 20/33] x86/fpu: Remove struct fpu::fpregs_active

2017-09-23 Thread Ingo Molnar
The previous changes paved the way for the removal of the fpu::fpregs_active state flag - we now only have the fpu::fpstate_active and fpu::last_cpu fields left. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu

[PATCH 24/33] x86/fpu: Don't let userspace set bogus xcomp_bv

2017-09-23 Thread Ingo Molnar
From: Eric Biggers On x86, userspace can use the ptrace() or rt_sigreturn() system calls to set a task's extended state (xstate) or "FPU" registers. ptrace() can set them for another task using the PTRACE_SETREGSET request with NT_X86_XSTATE, while rt_sigreturn() can set

[PATCH 25/33] x86/fpu: Tighten validation of user-supplied xstate_header

2017-09-23 Thread Ingo Molnar
From: Eric Biggers Move validation of user-supplied xstate_headers into a helper function and call it from both the ptrace and sigreturn syscall paths. The new function also considers it to be an error if *any* reserved bits are set, whereas before we were just clearing

[PATCH 22/33] x86/fpu: Fix boolreturn.cocci warnings

2017-09-23 Thread Ingo Molnar
From: kbuild test robot arch/x86/kernel/fpu/xstate.c:931:9-10: WARNING: return of 0/1 in function 'xfeatures_mxcsr_quirk' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by:

[PATCH 15/33] x86/fpu: Simplify fpu->fpregs_active use

2017-09-23 Thread Ingo Molnar
The fpregs_active() inline function is pretty pointless - in almost all the callsites it can be replaced with a direct fpu->fpregs_active access. Do so and eliminate the extra layer of obfuscation. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen

Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Ingo Molnar
* Ingo Molnar wrote: > So I'd like to push these changes to Linus tomorrow-ish as an RFC pull > request in 1-2 days, because there's now 4 fixes depending on these > changes, and because the result will be more maintainable for the > LTS v4.14 kernel. > > The biggest changes

[PATCH 13/33] x86/fpu: Remove 'kbuf' parameter from the copy_user_to_xstate() API

2017-09-23 Thread Ingo Molnar
No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov

[PATCH 17/33] x86/fpu: Split the state handling in fpu__drop()

2017-09-23 Thread Ingo Molnar
Prepare fpu__drop() to use fpu->fpregs_active. There are two distinct usecases for fpu__drop() in this context: exit_thread() when called for 'current' in exit(), and when called for another task in fork(). This patch does not change behavior, it only adds a couple of debug checks and structures

[PATCH 18/33] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active

2017-09-23 Thread Ingo Molnar
We want to simplify the FPU state machine by eliminating fpu->fpregs_active, and we can do that because the two state flags (::fpregs_active and ::fpstate_active) are set essentially together. The old lazy FPU switching code used to make a distinction - but there's no lazy switching code anymore,

[PATCH 08/33] x86/fpu: Clarify parameter names in the copy_xstate_to_*() methods

2017-09-23 Thread Ingo Molnar
Right now there's a confusing mixture of 'offset' and 'size' parameters: - __copy_xstate_to_*() input parameter 'end_pos' not not really an offset, but the full size of the copy to be performed. - input parameter 'count' to copy_xstate_to_*() shadows that of __copy_xstate_to_*()'s

[PATCH 07/33] x86/fpu: Remove the 'start_pos' parameter from the __copy_xstate_to_*() functions

2017-09-23 Thread Ingo Molnar
'start_pos' is always 0, so remove it and remove the pointless check of 'pos < 0' which can not ever be true as 'pos' is unsigned ... No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua

[PATCH 02/33] x86/fpu: Split copy_xstate_to_user() into copy_xstate_to_kernel() & copy_xstate_to_user()

2017-09-23 Thread Ingo Molnar
copy_xstate_to_user() is a weird API - in part due to a bad API inherited from the regset APIs. But don't propagate that bad API choice into the FPU code - so as a first step split the API into kernel and user buffer handling routines. (Also split the xstate_copyout() internal helper.) The

[PATCH 06/33] x86/fpu: Clean up the parameter definitions of copy_xstate_to_*()

2017-09-23 Thread Ingo Molnar
Remove pointless 'const' of non-pointer input parameter. Remove unnecessary parenthesis that shows uncertainty about arithmetic operator precedence. Clarify copy_xstate_to_user() description. No change in functionality. Cc: Andy Lutomirski Cc: Borislav Petkov

[PATCH 05/33] x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs

2017-09-23 Thread Ingo Molnar
Parameter ordering is weird: int copy_xstate_to_kernel(unsigned int pos, unsigned int count, void *kbuf, struct xregs_state *xsave); int copy_xstate_to_user(unsigned int pos, unsigned int count, void __user *ubuf, struct xregs_state *xsave); 'pos' and 'count', which are attributes of the

[PATCH 03/33] x86/fpu: Remove 'ubuf' parameter from the copy_xstate_to_kernel() APIs

2017-09-23 Thread Ingo Molnar
The 'ubuf' parameter is unused in the _kernel() side of the API, remove it. This simplifies the code and makes it easier to think about. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Fenghua Yu

Re: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting

2017-09-23 Thread Peter Zijlstra
On Fri, Sep 22, 2017 at 11:05:30AM -0700, Tejun Heo wrote: > Peter, ping? Humm,. So I think I was good, but I was under the impression you'd send a new version better explaining the need/design of that iteration stuff. Could be I lost the plot somehow.

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-23 Thread Egil Hjelmeland
Den 22. sep. 2017 22:08, skrev Andrew Lunn: I'm wondering how this is supposed to work. Please add a good comment here, since the hardware is forcing you to do something odd. Maybe it would be a good idea to save the STP state in chip. And then when chip->is_bridged is set true, change the

[PATCH] wireless: iwlwifi: fix minor code style issues

2017-09-23 Thread Christoph Böhmwalder
Fixes three trivial issues as reported by checkpatch.pl, namely two switch/case indentation issues and one alignment issue in a multiline comment. Signed-off-by: Christoph Böhmwalder --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 7 --- 1 file changed, 4

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-23 Thread Paolo Bonzini
On 22/09/2017 14:55, Peter Zijlstra wrote: > You just explained it yourself. If the thread that needs to complete > what you're waiting on has lower priority, it will _never_ get to run if > you're busy waiting on it. > > This is _trivial_. > > And even for !RT it can be quite costly, because

Re: [PATCH v2 0/2] x86: Fix inline asm call constraints for clang

2017-09-23 Thread Josh Poimboeuf
On Sat, Sep 23, 2017 at 12:53:18PM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > Patch 1 is a bug fix for an objtool issue which was uncovered by patch 2. > > > > Patch 2 is the last fix needed for clang to be able to compile and boot > > the kernel. > > > >

[PATCH v3] staging: greybus: light: Release memory obtained by kasprintf

2017-09-23 Thread Arvind Yadav
Free memory region, if gb_lights_channel_config is not successful. Signed-off-by: Arvind Yadav --- changes in v2: - Subject line changed. - add kfree in __gb_lights_led_unregister(). - No need to check return value of

Re: [PATCH 0/8] [media] v4l2-core: Fine-tuning for some function implementations

2017-09-23 Thread Hans Verkuil
On 22/09/17 22:08, SF Markus Elfring wrote: >> Sorry Markus, just stay away from the videobuf-* sources. > > Will the software evolution be continued for related source files? > Are there any update candidates left over in the directory “v4l2-core”? Sorry, I don't understand the question. We

Re: [PATCH] perf report: Fix debug messages with --call-graph option

2017-09-23 Thread zhangmengting
Hi Jiri, Thanks for the review. Agreed, the patch seems confused. I'll add more details in the next version patch and resend it later. Thanks, Mengting Zhang On 2017/9/22 17:18, Jiri Olsa wrote: On Fri, Sep 22, 2017 at 10:06:53AM +0800, zhangmengting wrote: With --call-graph option, perf

Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys

2017-09-23 Thread Chen Zhong
On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote: > On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote: > > This patch adds the device tree binding documentation for the MediaTek > > pmic keys found on PMIC MT6397/MT6323. > > > > Signed-off-by: Chen Zhong > >

[PATCH v2] perf report: Fix debug messages with --call-graph option

2017-09-23 Thread Mengting Zhang
With --call-graph option, perf report can display call chains using type, min percent threshold, optional print limit and order. And the default call-graph parameter is 'graph,0.5,caller,function,percent'. Before this patch, 'perf report --call-graph' shows incorrect debug messages as below:

Re: [PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Paul E. McKenney
On Fri, Sep 22, 2017 at 09:27:39PM -0400, Steven Rostedt wrote: > On Fri, 22 Sep 2017 15:54:55 -0700 > "Paul E. McKenney" wrote: > > > On Fri, Sep 22, 2017 at 06:15:47PM -0400, Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)" > > > >

[PATCH 3/3] iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()'

2017-09-23 Thread Christophe JAILLET
If we can not enable the regulator, go through the error handling path instead of silently continuing. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") Signed-off-by: Christophe JAILLET --- This patch is highly speculative. I don't find logical to

[PATCH 1/3] iio: adc: twl4030: Fix an error handling path in 'twl4030_madc_probe()'

2017-09-23 Thread Christophe JAILLET
If 'devm_regulator_get()' fails, we should go through the existing error handling path instead of returning directly, as done is all the other error handling paths in this function. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") Signed-off-by: Christophe JAILLET

[PATCH 2/3] iio: adc: twl4030: Disable the vusb3v1 rugulator in the error handling path of 'twl4030_madc_probe()'

2017-09-23 Thread Christophe JAILLET
Commit 7cc97d77ee8a has introduced a call to 'regulator_disable()' in the .remove function. So we should also have such a call in the .probe function in case of error after a successful 'regulator_enable()' call. Add a new label for that and use it. Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix

Re: [v8 0/4] cgroup-aware OOM killer

2017-09-23 Thread David Rientjes
On Fri, 22 Sep 2017, Tejun Heo wrote: > > If you have this low priority maintenance job charging memory to the high > > priority hierarchy, you're already misconfigured unless you adjust > > /proc/pid/oom_score_adj because it will oom kill any larger process than > > itself in today's kernels

Re: [PATCH] mm/device-public-memory: Fix edge case in _vm_normal_page()

2017-09-23 Thread Balbir Singh
On Sat, Sep 23, 2017 at 12:56 AM, Reza Arbab wrote: > With device public pages at the end of my memory space, I'm getting > output from _vm_normal_page(): > > BUG: Bad page map in process migrate_pages pte:c0810d06 pmd:f95d3000 > addr:7fff8933

[PATCH 0/3] iio: adc: twl4030: Fix some error handling issues in 'twl4030_madc_probe()'

2017-09-23 Thread Christophe JAILLET
These 3 patches are all related to error hangling in 'twl4030_madc_probe()'. They are also all related to commit 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings") The semantic of the patches behing slighly different: - direct return instead of going through the error handling path -

[GIT PULL] parisc architecture fixes for v4.14-rc2

2017-09-23 Thread Helge Deller
Hi Linus, please pull fixes for the parisc architecture for kernel 4.14-rc2 from: git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git parisc-4.14-2 Changelog: - Unbreak parisc bootloader by avoiding a gcc-7 optimization to convert multiple byte-accesses into one

Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys

2017-09-23 Thread Chen Zhong
Sorry for the typo. On Sat, 2017-09-23 at 14:38 +0800, Chen Zhong wrote: > On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote: > > On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote: > > > This patch adds the device tree binding documentation for the MediaTek > > > pmic keys found on

[PATCH] hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()'

2017-09-23 Thread Christophe JAILLET
Commit 2ca492e22cb7 has moved the call to 'kfifo_alloc()' from after the main 'if' statement to before it. But it has not updated the error handling paths accordingly. Fix all that: - if 'kfifo_alloc()' fails we can return directly - direct returns after 'kfifo_alloc()' must now go to

Re: [PATCH 3/4] media: i2c: Add TDA1997x HDMI receiver driver

2017-09-23 Thread Hans Verkuil
Hi Tim, On 23/09/17 00:24, Tim Harvey wrote: > Add support for the TDA1997x HDMI receivers. I did a very quick high-level scan and found a few blockers: 1) You *must* implement the get/set_edid ops. I won't accept the driver without that. You can use v4l2-ctl to set/get the EDID (see

[PATCH] staging: greybus: light: remove unnecessary error check

2017-09-23 Thread Arvind Yadav
It is not necessary to check return value of gb_lights_channel_flash_config. gb_lights_channel_config returns both successful and error value. Signed-off-by: Arvind Yadav --- drivers/staging/greybus/light.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-)

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Fri, Sep 22, 2017 at 01:18:39AM -0400, Vitaly Mayatskikh wrote: > bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if > IO vector has small consecutive buffers belonging to the same page. > bio_add_pc_page merges them into one, but the page reference is never > dropped. > >

Re: [PATCH] coccicheck: improve pattern for getting relative path

2017-09-23 Thread Nicolas Palix (LIG)
Le 10/08/17 à 19:40, Cihangir Akturk a écrit : When invoked with V=1, coccicheck script prints the information about which semantic patch (*.cocci file) used for this operation. Actually, it prints out the relative path of the related semantic patch. The script uses sed to remove the source

[PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Colin King
From: Colin Ian King Currently p->phy is being null checked in several places to avoid null pointer dereferences on p->phy, however, the final call to phy_attached_info on p->phy when p->phy will perform a null pointer dereference. Fix this by simply moving the call

Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Joe Perches
On Sat, 2017-09-23 at 17:57 +0100, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a

Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Florian Fainelli
On 09/23/2017 09:57 AM, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a null >

Re: [PATCH 00/33] x86 FPU fixes and cleanups for v4.14

2017-09-23 Thread Juergen Gross
On 23/09/17 15:02, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> So I'd like to push these changes to Linus tomorrow-ish as an RFC pull >> request in 1-2 days, because there's now 4 fixes depending on these >> changes, and because the result will be more maintainable for

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Sat, Sep 23, 2017 at 05:55:37PM +0100, Al Viro wrote: > IOW, the loop on failure exit should go through the bio, like > __bio_unmap_user() > does. We *also* need to put everything left unused in pages[], but only from > the > last iteration through iov_for_each(). > > Frankly, I would

Re: [PATCHSET for-4.14] cgroup, sched: cgroup2 basic resource accounting

2017-09-23 Thread Tejun Heo
Hello, Peter. On Sat, Sep 23, 2017 at 03:37:31PM +0200, Peter Zijlstra wrote: > On Fri, Sep 22, 2017 at 11:05:30AM -0700, Tejun Heo wrote: > > Peter, ping? > > Humm,. So I think I was good, but I was under the impression you'd send > a new version better explaining the need/design of that

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-23 Thread Andrew Lunn
> The point is: Once both external ports are in "forwarding", I see no way > to prevent traffic flowing directly between the external ports. Generally, there are port vectors. Port X can send frames only to Port Y. If you don't have that, there are possibilities with VLANs. Each port is given a

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rajat Jain
On Sat, Sep 23, 2017 at 5:55 AM, Rafael J. Wysocki wrote: > On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki wrote: >> On Thursday, September 21, 2017 3:13:56 AM CEST Rajat Jain wrote: >>> On Wed, Sep 20, 2017 at 5:24 PM, Rafael J. Wysocki

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Greg Kroah-Hartman
On Sat, Sep 23, 2017 at 12:57:33PM +0200, Stefan Wahren wrote: > Hi Greg, > > > Phil Elwell hat am 11. August 2017 um 12:20 > > geschrieben: > > > > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > > block in the success case, causing a stale

[PATCH v2] Asus WMI : Add lightbar led support

2017-09-23 Thread Maxime Bellengé
Some asus laptops (ROG series for example) are provided with a lightbar behind the monitor. This patch make possible to switch it on and off. This lightbar works exactly as any other led. V2 : fix whitespaces and typo Signed-off-by: Maxime Bellengé ---

Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov

2017-09-23 Thread Al Viro
On Sat, Sep 23, 2017 at 05:39:28PM +0100, Al Viro wrote: > On Fri, Sep 22, 2017 at 01:18:39AM -0400, Vitaly Mayatskikh wrote: > > bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if > > IO vector has small consecutive buffers belonging to the same page. > > bio_add_pc_page

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-23 Thread Peter Zijlstra
On Sat, Sep 23, 2017 at 12:56:12PM +0200, Paolo Bonzini wrote: > On 22/09/2017 14:55, Peter Zijlstra wrote: > > You just explained it yourself. If the thread that needs to complete > > what you're waiting on has lower priority, it will _never_ get to run if > > you're busy waiting on it. > > > >

Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized

2017-09-23 Thread Jean Delvare
Hi Ingo, On Sat, 23 Sep 2017 12:50:31 +0200, Ingo Molnar wrote: > * Jean Delvare wrote: > > > I don't think it makes sense to check for a possible bad > > initialization order at run time on every system when it is all > > decided at build time. > > > > A more efficient way

Re: [media] v4l2-core: Fine-tuning for some function implementations

2017-09-23 Thread SF Markus Elfring
>> Will the software evolution be continued for related source files? >> Are there any update candidates left over in the directory “v4l2-core”? > > Sorry, I don't understand the question. I try to explain my view again. > We don't want to touch the videobuf-* files unless there is a very good

Re: [PATCH 1/2] i2c: designware: switch to suspend_late/resume_early

2017-09-23 Thread Rajat Jain
On Sat, Sep 23, 2017 at 8:49 AM, Rajat Jain wrote: > On Sat, Sep 23, 2017 at 5:55 AM, Rafael J. Wysocki wrote: >> On Thu, Sep 21, 2017 at 4:11 PM, Rafael J. Wysocki >> wrote: >>> On Thursday, September 21, 2017 3:13:56 AM CEST Rajat

Re: [PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Paul E. McKenney
On Sat, Sep 23, 2017 at 07:22:04AM -0400, Steven Rostedt wrote: > On Fri, 22 Sep 2017 23:07:37 -0700 > "Paul E. McKenney" wrote: > > > OK, how about the following? > > > > It turns out that functions called from rcu_irq_enter() can > > be subject to various

[PATCH 2/3] [media] camss-csid: Reduce the scope for a variable in csid_set_power()

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 21:00:30 +0200 Move the definition for the local variable "dev" into an if branch so that the corresponding setting will only be performed if it was selected by the parameter "on" of this function. Signed-off-by: Markus

[PATCH 1/3] [media] camss-csid: Use common error handling code in csid_set_power()

2017-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 23 Sep 2017 20:48:33 +0200 Add jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH] au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([subsystem]dev, ...

2017-09-23 Thread Yurii Pavlenko
This patch fixes the following checkpatch.pl warning: fix Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Yurii Pavlenko --- drivers/staging/irda/drivers/au1k_ir.c | 40

[PATCH] Fix C++ kernel in include/linux/mtd/mtd.h

2017-09-23 Thread Pavel Machek
C++ comments look wrong in kernel tree. Fix one. Signed-off-by: Pavel Machek diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 6cd0f6b..849543f1 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -267,7 +267,7 @@ struct mtd_info { */

[PATCH 0/2] This patchset is for fixes reported by checkpatch.pl

2017-09-23 Thread Harinath Nampally
Please find the following patches: iio: accel: mma8452: Fix code style warning for symbolic permissions iio: accel: mma8452: Fix code style warning for unsigned int declarations drivers/iio/accel/mma8452.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.7.4

[PATCH 2/4] extable: Consolidate *kernel_text_address() functions

2017-09-23 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" The functionality between kernel_text_address() and _kernel_text_address() is the same except that _kernel_text_address() does a little more (that function needs a rename, but that can be done another time). Instead of having duplicate code in

[PATCH 1/4] rcu: Allow for page faults in NMI handlers

2017-09-23 Thread Steven Rostedt
From: "Paul E. McKenney" A number of architecture invoke rcu_irq_enter() on exception entry in order to allow RCU read-side critical sections in the exception handler when the exception is from an idle or nohz_full CPU. This works, at least unless the exception

[PATCH 3/4] extable: Enable RCU if it is not watching in kernel_text_address()

2017-09-23 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" If kernel_text_address() is called when RCU is not watching, it can cause an RCU bug because is_module_text_address(), the is_kprobe_*insn_slot() and is_bpf_text_address() functions require the use of RCU. Only enable RCU if it is not

[PATCH 4/4] tracing: Remove RCU work arounds from stack tracer

2017-09-23 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" Currently the stack tracer calls rcu_irq_enter() to make sure RCU is watching when it records a stack trace. But if the stack tracer is triggered while tracing inside of a rcu_irq_enter(), calling rcu_irq_enter() unconditionally can be

  1   2   3   >