[PATCH 21/28] locking/lockdep: Consolidate lock usage bit initialization

2019-04-24 Thread Yuyang Du
Lock usage bit initialization is consolidated into one function mark_usage(). Trivial readability improvement. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git

[PATCH 13/28] locking/lockdep: Change the return type of __cq_dequeue()

2019-04-24 Thread Yuyang Du
With the change, we can slightly adjust the code to iterate the queue in BFS search, which simplifies the code. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git

[PATCH 15/28] locking/lockdep: Update comments on dependency search

2019-04-24 Thread Yuyang Du
The breadth-first search is implemented as flat-out non-recursive now, but the comments are still describing it as recursive, update the comments in that regard. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-)

[PATCH 22/28] locking/lockdep: Adjust new bit cases in mark_lock

2019-04-24 Thread Yuyang Du
The new bit can be any possible lock usage except it is garbage, so the cases in switch can be made simpler. Warn early on if wrong usage bit is passed without taking locks. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 21 +++-- 1 file changed, 7

[PATCH 20/28] locking/lockdep: Refactorize check_noncircular and check_redundant

2019-04-24 Thread Yuyang Du
These two functions now handle different check results themselves. A new check_path function is added to check whether there is a path in the dependency graph. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 98 +++- 1

[PATCH 23/28] locking/lockdep: Update irqsafe lock bitmaps

2019-04-24 Thread Yuyang Du
The bitmaps keep track of which locks are irqsafe. Update the bitmaps when there is new irqsafe usage and when an irqsafe lock is zapped. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff

[PATCH 25/28] locking/lockdep: Implement new IRQ usage checking algorithm

2019-04-24 Thread Yuyang Du
The read-write locks make checks much more complex, we elaborate on all possible cases in the following two tables, one for marking a new IRQ usage and the other for adding a new dependency. When reasoning all the cases in checking, these two factors are taken into consideration. Firstly, if a

[PATCH 28/28] locking/lockdep: Reduce lock_list_entries by half

2019-04-24 Thread Yuyang Du
The forward and backward dependencies consume the same number of list_entries. Since backward dependencies are removed, the max number of list_entries can be halved safely: MAX_LOCKDEP_ENTRIES /= 2, which goes from 16384 to 8192 or 32768 to 16384. Besides memory space reduction, the performance

[PATCH 27/28] locking/lockdep: Remove locks_before

2019-04-24 Thread Yuyang Du
Since the backward dependencies are always empty, remove the locks_before field in lock_class struct and its occurrences. Signed-off-by: Yuyang Du --- include/linux/lockdep.h | 5 ++--- kernel/locking/lockdep.c | 15 +++ 2 files changed, 5 insertions(+), 15 deletions(-) diff

[PATCH 26/28] locking/lockdep: Remove __bfs

2019-04-24 Thread Yuyang Du
Since there is no need for backward dependecy searching, remove this extra function layer. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 40 +++- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/kernel/locking/lockdep.c

[PATCH] lkdtm: fix potential use after free

2019-04-24 Thread Weikang shi
From: swkhack The function lkdtm_WRITE_AFTER_FREE calls kfree(base) to free the memory of base. However, following kfree(base), it write the memory which base point to via base[offset] = 0x0abcdef0. This may result in a use-after-free bug. This patch moves kfree(base) after the write.

[tip:smp/hotplug] smpboot: Place the __percpu annotation correctly

2019-04-24 Thread tip-bot for Sebastian Andrzej Siewior
Commit-ID: d4645d30b50d1691c26ff0f8fa4e718b08f8d3bb Gitweb: https://git.kernel.org/tip/d4645d30b50d1691c26ff0f8fa4e718b08f8d3bb Author: Sebastian Andrzej Siewior AuthorDate: Wed, 24 Apr 2019 10:52:53 +0200 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:17:08 +0200 smpboot:

[PATCH 24/28] locking/lockdep: Remove !dir in lock irq usage check

2019-04-24 Thread Yuyang Du
In mark_lock_irq(), the following checks are performed: -- | -> | unsafe | read unsafe | |--| | safe | F B |F* B*| |--| | read safe | F? B* | - |

[PATCH 12/28] locking/lockdep: Change type of the element field in circular_queue

2019-04-24 Thread Yuyang Du
The element field is an array in struct circular_queue to keep track of locks in the search. Making it the same type as the locks avoids type cast. Also fix a typo and elaborate the comment above struct circular_queue. No functional change. Signed-off-by: Yuyang Du Reviewed-by: Bart Van Assche

[PATCH 02/28] locking/lockdep: Add description and explanation in lockdep design doc

2019-04-24 Thread Yuyang Du
More words are added to lockdep design document regarding key concepts, which should help people without lockdep experience read and understand lockdep reports. Signed-off-by: Yuyang Du --- Documentation/locking/lockdep-design.txt | 74 1 file changed, 56

[PATCH 16/28] locking/lockdep: Add explanation to lock usage rules in lockdep design doc

2019-04-24 Thread Yuyang Du
The irq usage and lock dependency rules that if violated a deacklock may happen are explained in more detail. Signed-off-by: Yuyang Du --- Documentation/locking/lockdep-design.txt | 33 ++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git

[PATCH 17/28] locking/lockdep: Remove redundant argument in check_deadlock

2019-04-24 Thread Yuyang Du
In check_deadlock(), the third argument read comes from the second argument hlock so that it can be removed. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/locking/lockdep.c

[PATCH 03/28] locking/lockdep: Adjust lock usage bit character checks

2019-04-24 Thread Yuyang Du
The lock usage bit characters are defined and determined with tricks. Add some explanation to make it a bit clearer, then adjust the logic to check the usage, which optimizes the code a bit. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 21 -

[PATCH 18/28] locking/lockdep: Remove unused argument in __lock_release

2019-04-24 Thread Yuyang Du
The @nested is not used in __release_lock so remove it despite that it is not used in lock_release in the first place. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/locking/lockdep.c

[PATCH 05/28] locking/lockdep: Print the right depth for chain key colission

2019-04-24 Thread Yuyang Du
Since chains are separated by irq context, so when printing a chain the depth should be consistent with it. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index

Re: [PATCH 3/3] RAS/CEC: immediate soft-offline page when count_threshold == 1

2019-04-24 Thread Borislav Petkov
On Wed, Apr 24, 2019 at 10:43:04AM +0800, WANG Chao wrote: > It looks good to me. Thanks for a better fix. Latest version: https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/commit/?h=tip-ras-core-cec=aad216775348c4aaf467069c2e5fbf7ff6c27695 I'll post soon after I've hammered more on

Re: [PATCH] locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem

2019-04-24 Thread Ingo Molnar
* Oleg Nesterov wrote: > Turn DEFINE_STATIC_PERCPU_RWSEM() into __DEFINE_PERCPU_RWSEM() with the > additional "is_static" argument to introduce DEFINE_PERCPU_RWSEM(). > > Change cgroup.c to use DEFINE_PERCPU_RWSEM(cgroup_threadgroup_rwsem). > > Signed-off-by: Oleg Nesterov > --- >

Re: [PATCH 2/2] gpio: sch: Add interrupt support

2019-04-24 Thread Mika Westerberg
On Wed, Apr 24, 2019 at 12:19:02PM +0200, Jan Kiszka wrote: > > I think what you want is "GPIO signaled ACPI event". It works so that > > you declare _AEI method below the GPIO controller listing the GPIOs you > > want to trigger events for and then either _Lxx, _Exx or _EVT method for > > each of

libata fixes for NVME + OPAL

2019-04-24 Thread Enrico Weigelt, metux IT consult
Hello folks, here're some fixes for libata to make NVME and TCG OPAL work: * fix a little build break in nvme (forgotten include and Kconfig select) * introduce sysctl knob for enabling tpm stuff at runtime (sed-util expects since several years, so it seems that piece just might have been

[PATCH 3/3] drivers: libata: add sysctl: 'libata.allow_tpm' for self-encrypted devices

2019-04-24 Thread Enrico Weigelt, metux IT consult
libata tpm functionality, needed for self encrypted devices (OPAL, ...), is currently disabled per default and needs to be enabled via kernel command line. This patch allows enabling it via sysctl. The implementation might look a bit 'naive', as there aren't any locks or barriers, etc. As we're

[PATCH 1/3] drivers: nvme: target: core: fix build break

2019-04-24 Thread Enrico Weigelt, metux IT consult
Build breaks: drivers/nvme/target/core.c: In function 'nvmet_req_alloc_sgl': drivers/nvme/target/core.c:939:12: error: implicit declaration of \ function 'sgl_alloc'; did you mean 'bio_alloc'? \ [-Werror=implicit-function-declaration] req->sg = sgl_alloc(req->transfer_len,

[PATCH 2/3] drivers: libata: introduce sysctl directory

2019-04-24 Thread Enrico Weigelt, metux IT consult
Register a sysctl directory for libata, so upcoming knobs can be added here. Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/ata/libata-core.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index

Re: [RFC 3/6] objtool: arm64: Adapt the stack frame checks and the section analysis for the arm architecture

2019-04-24 Thread Julien Thierry
Hi Raphaël, I think you could split the patch in at least 3: - Handling the split instructions - Handling the jump offset - Dynamic jumps/switch table On 09/04/2019 14:52, Raphael Gault wrote: > Since the way the initial stack frame when entering a function is different > that what is done

Re: [PATCH] x86_64: uninline TASK_SIZE

2019-04-24 Thread Ingo Molnar
* Andy Lutomirski wrote: > > Or am I missing some complication? > > Seems like a great idea to me. > > BTW, what the heck is up with get_gate_page()? I'm struggling to > understand what it's even trying to do. If there's an architecture > that allows a user program to mremap() or otherwise

Re: [PATCH 2/2] gpio: sch: Add interrupt support

2019-04-24 Thread Jan Kiszka
On 24.04.19 12:33, Mika Westerberg wrote: On Wed, Apr 24, 2019 at 12:19:02PM +0200, Jan Kiszka wrote: I think what you want is "GPIO signaled ACPI event". It works so that you declare _AEI method below the GPIO controller listing the GPIOs you want to trigger events for and then either _Lxx,

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Jiri Kosina
On Wed, 24 Apr 2019, Petr Mladek wrote: > WARN_ON_ONCE() could not be called safely under rq lock because > of console deadlock issues. Fortunately, simple printk_deferred() > is enough because the warning is printed from a well defined > location and context. > > Also klp_try_switch_task() is

Re: [RFC 4/6] arm64: assembler: Add macro to annotate asm function having non standard stack-frame.

2019-04-24 Thread Julien Thierry
Hi Raphaël, On 09/04/2019 14:52, Raphael Gault wrote: > Signed-off-by: Raphael Gault Even there is not much to say, we include a commit message to explain what the patch does and/or why we want it. > --- > arch/arm64/include/asm/assembler.h | 18 ++ > 1 file changed, 18

Re: [RESEND4, PATCH 1/2] fuse: retrieve: cap requested size to negotiated max_write

2019-04-24 Thread Miklos Szeredi
On Wed, Mar 27, 2019 at 11:15 AM Kirill Smelkov wrote: > > FUSE filesystem server and kernel client negotiate during initialization > phase, what should be the maximum write size the client will ever issue. > Correspondingly the filesystem server then queues sys_read calls to read > requests with

Re: [PATCH 2/2] gpio: sch: Add interrupt support

2019-04-24 Thread Mika Westerberg
On Wed, Apr 24, 2019 at 12:39:35PM +0200, Jan Kiszka wrote: > On 24.04.19 12:33, Mika Westerberg wrote: > > On Wed, Apr 24, 2019 at 12:19:02PM +0200, Jan Kiszka wrote: > > > > I think what you want is "GPIO signaled ACPI event". It works so that > > > > you declare _AEI method below the GPIO

Re: [PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver.

2019-04-24 Thread Life is hard, and then you die
Hi Jonathan, On Mon, Apr 22, 2019 at 12:34:26PM +0100, Jonathan Cameron wrote: > On Sun, 21 Apr 2019 20:12:49 -0700 > Ronald Tschalär wrote: > > > The iBridge device provides access to several devices, including: > > - the Touch Bar > > - the iSight webcam > > - the light sensor > > - the

Re: [PATCH] pinctrl: stm32: check irq controller availability at probe

2019-04-24 Thread Linus Walleij
On Wed, Apr 24, 2019 at 10:09 AM Fabien Dessenne wrote: > It is not guaranteed that the IRQ controller driver is probed before > the pin controller driver gets probed. > Considering this, check for the irq domain availability during probe > and return EPROBE_DEFER if needed. > > Signed-off-by:

Re: [PATCH 1/4] mod_devicetable: helper macro for declaring oftree module device table

2019-04-24 Thread Enrico Weigelt, metux IT consult
On 19.04.19 09:40, Dmitry Torokhov wrote: > Hi Enrico, > > On Tue, Apr 16, 2019 at 09:57:22PM +0200, Enrico Weigelt, metux IT consult > wrote: >> Little helper macro that declares an oftree module device table, >> if CONFIG_OF is enabled. Otherwise it's just noop. >> >> This is also helpful if

Re: [RESEND4, PATCH 2/2] fuse: require /dev/fuse reads to have enough buffer capacity as negotiated

2019-04-24 Thread Miklos Szeredi
On Wed, Mar 27, 2019 at 11:44 AM Kirill Smelkov wrote: > > A FUSE filesystem server queues /dev/fuse sys_read calls to get > filesystem requests to handle. It does not know in advance what would be > that request as it can be anything that client issues - LOOKUP, READ, > WRITE, ... Many requests

Re: next-20190408..0418: Suspend/resume problems on Thinkpad X60

2019-04-24 Thread Pavel Machek
On Wed 2019-04-24 11:54:31, Pavel Machek wrote: > On Tue 2019-04-23 07:55:05, Jens Axboe wrote: > > On 4/23/19 4:22 AM, Pavel Machek wrote: > > > Hi! > > > > > >>> It boots ok (unlike mainline -- I'm debugging that), and I can suspend > > >>> and resume... but then cursor in X is moving and I can

Re: [PATCH] fuse: Add ioctl flag for compat ioctl with 64-bit time_t

2019-04-24 Thread Miklos Szeredi
On Tue, Apr 23, 2019 at 5:14 PM Ian Abbott wrote: > > On 23/04/2019 13:55, Miklos Szeredi wrote: > > On Fri, Mar 1, 2019 at 6:08 PM Ian Abbott wrote: > >> > >> Currently, a CUSE server running on a 64-bit kernel can tell when an > >> ioctl request comes from a process running a 32-bit ABI, but

Re: [PATCH 3/4] input: keyboard: gpio_keys_polled: use gpio lookup table

2019-04-24 Thread Enrico Weigelt, metux IT consult
On 19.04.19 09:48, Dmitry Torokhov wrote: > I would prefer if gpiod API could parse static board data/gpio lookup > tables for child nodes, instead of adding this to gpio-keys. Now that > Heikki Krogerus work on software nodes has landed I need to resurrect > my patch to gpiolib. Of course, a

Re: [PATCH] usb: xhci: inherit dma_mask from bus if set correctly

2019-04-24 Thread Robin Murphy
On 24/04/2019 10:05, Pankaj Dubey wrote: On 4/10/19 4:32 AM, Robin Murphy wrote: On 2019-04-09 3:56 am, Sriram Dash wrote: On Tue, Apr 2, 2019 at 9:53 PM Pankaj Dubey wrote: On Tue, 2 Apr 2019 at 15:34, Robin Murphy wrote: On 02/04/2019 10:40, Pankaj Dubey wrote: From: Sriram Dash

Re: [PATCH] locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem

2019-04-24 Thread Oleg Nesterov
On 04/24, Ingo Molnar wrote: > > > -#define DEFINE_STATIC_PERCPU_RWSEM(name) \ > > +#define __DEFINE_PERCPU_RWSEM(name, is_static) > > \ > > static DEFINE_PER_CPU(unsigned int, __percpu_rwsem_rc_##name); > > \ > > -static struct

Re: [PATCH] locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem

2019-04-24 Thread Ingo Molnar
* Oleg Nesterov wrote: > On 04/24, Ingo Molnar wrote: > > > > > -#define DEFINE_STATIC_PERCPU_RWSEM(name) \ > > > +#define __DEFINE_PERCPU_RWSEM(name, is_static) > > > \ > > > static DEFINE_PER_CPU(unsigned int, __percpu_rwsem_rc_##name);

[PATCH] mod_devicetable: helper macro for declaring oftree module device table

2019-04-24 Thread Enrico Weigelt, metux IT consult
Little helper macro that declares an oftree module device table, if CONFIG_OF is enabled. Otherwise it's just noop. This is also helpful if some drivers can be built w/ or w/o oftree support. Signed-off-by: Enrico Weigelt, metux IT consult --- include/linux/mod_devicetable.h | 9 + 1

[tip:core/objtool] mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions

2019-04-24 Thread tip-bot for Peter Zijlstra
Commit-ID: 29da93fea3ea39ab9b12270cc6be1b70ef201c9e Gitweb: https://git.kernel.org/tip/29da93fea3ea39ab9b12270cc6be1b70ef201c9e Author: Peter Zijlstra AuthorDate: Wed, 24 Apr 2019 09:19:25 +0200 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:19:45 +0200 mm/uaccess: Use

[tip:core/objtool] x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation

2019-04-24 Thread tip-bot for Peter Zijlstra
Commit-ID: 6ae865615fc43d014da2fd1f1bba7e81ee622d1b Gitweb: https://git.kernel.org/tip/6ae865615fc43d014da2fd1f1bba7e81ee622d1b Author: Peter Zijlstra AuthorDate: Wed, 24 Apr 2019 09:19:24 +0200 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:19:45 +0200 x86/uaccess: Dont leak

Re: [PATCH 5/6] powerpc/mmu: drop mmap_sem now that locked_vm is atomic

2019-04-24 Thread Jason Gunthorpe
On Tue, Apr 23, 2019 at 07:15:44PM -0700, Davidlohr Bueso wrote: > On Wed, 03 Apr 2019, Daniel Jordan wrote: > > > On Wed, Apr 03, 2019 at 06:58:45AM +0200, Christophe Leroy wrote: > > > Le 02/04/2019 à 22:41, Daniel Jordan a écrit : > > > > With locked_vm now an atomic, there is no need to take

[tip:x86/mm] x86/mm: Remove in_nmi() warning from 64-bit implementation of vmalloc_fault()

2019-04-24 Thread tip-bot for Jiri Kosina
Commit-ID: a65c88e16f32aa9ef2e8caa68ea5c29bd5eb0ff0 Gitweb: https://git.kernel.org/tip/a65c88e16f32aa9ef2e8caa68ea5c29bd5eb0ff0 Author: Jiri Kosina AuthorDate: Wed, 24 Apr 2019 09:04:57 +0200 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:21:35 +0200 x86/mm: Remove in_nmi()

Re: [PATCH 2/2] x86/pci: Clean up usage of X86_DEV_DMA_OPS

2019-04-24 Thread Ingo Molnar
* Christoph Hellwig wrote: > Is anyone going to pick this patch up? Sure, I've picked it up with Bjorn's Acked-by and will push it out after a bit of testing. Thanks, Ingo

[tip:x86/asm] x86/um/vdso: Drop unnecessary cc-ldoption

2019-04-24 Thread tip-bot for Nick Desaulniers
Commit-ID: 3855f11d54a07256cc4a6fb85c692000208a73a7 Gitweb: https://git.kernel.org/tip/3855f11d54a07256cc4a6fb85c692000208a73a7 Author: Nick Desaulniers AuthorDate: Tue, 23 Apr 2019 14:15:53 -0700 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:22:33 +0200 x86/um/vdso: Drop

[tip:x86/mm] x86/build: Move _etext to actual end of .text

2019-04-24 Thread tip-bot for Kees Cook
Commit-ID: 392bef709659abea614abfe53cf228e7a59876a4 Gitweb: https://git.kernel.org/tip/392bef709659abea614abfe53cf228e7a59876a4 Author: Kees Cook AuthorDate: Tue, 23 Apr 2019 11:38:27 -0700 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2019 12:27:47 +0200 x86/build: Move _etext to

Re: [RFC PATCH v2 00/17] Core scheduling v2

2019-04-24 Thread Vineeth Remanan Pillai
> Is this one missed? Or fixed with a better impl? > > The boot up CPUs don't match the possible cpu map, so the not onlined > CPU rq->core are not initialized, which causes NULL pointer dereference > panic in online_fair_sched_group(): > Thanks for pointing this out. I think the ideal fix would

RE: [PATCH] thermal: intel: int340x: processor_thermal_device: simplify to get driver data

2019-04-24 Thread Pawnikar, Sumeet R
>-Original Message- >From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- >ow...@vger.kernel.org] On Behalf Of Zhang Rui >Sent: Monday, April 22, 2019 2:26 PM >To: Shevchenko, Andriy ; Pawnikar, Sumeet R > >Cc: edubez...@gmail.com; daniel.lezc...@linaro.org;

Re: sg_dma_page_iter offset & length considerations

2019-04-24 Thread Jason Gunthorpe
On Wed, Apr 24, 2019 at 03:22:18PM +0800, Daniel Drake wrote: > Hi, > > In drivers/mmc/alcor.c we're working with a MMC controller which > supports DMA transfers split up into page-sized chunks. Keep in mind that sg_page_iter_page splits into PAGE_SIZE chuncks, so if you HW needs exactly a 4k

Re: [PATCH] fpga: stratix10-soc: fix use-after-free on s10_init()

2019-04-24 Thread Nicolas Saenz Julienne
Hi Thanks, On Wed, 2019-04-24 at 07:32 +0800, Wen Yang wrote: > The refcount of fw_np has already been decreased by of_find_matching_node() > so it shouldn't be used anymore. > This patch adds an of_node_get() before of_find_matching_node() to avoid > the use-after-free problem. > > Fixes:

Re: [PATCH 2/3] PM / Domains: Allow OF lookup for multi PM domain case from ->attach_dev()

2019-04-24 Thread Niklas Cassel
On Thu, Apr 18, 2019 at 12:27:56PM +0200, Ulf Hansson wrote: > A genpd provider that uses the ->attach_dev() callback to lookup resources > for a device, fails to do so when the device has multiple PM domains. This > is because when genpd invokes the ->attach_dev() callback, it passes the >

Re: [PATCH 1/3] PM / Domains: Don't kfree() the virtual device in the error path

2019-04-24 Thread Niklas Cassel
On Thu, Apr 18, 2019 at 12:27:55PM +0200, Ulf Hansson wrote: > It's not correct to call kfree(dev) when device_register(dev) has failed. > Fix this by calling put_device(dev) instead. > > Fixes: 3c095f32a92b ("PM / Domains: Add support for multi PM domains per > device to genpd") >

Re: [PATCH 3/3] PM / Domains: Enable genpd_dev_pm_attach_by_id|name() for single PM domain

2019-04-24 Thread Niklas Cassel
On Thu, Apr 18, 2019 at 12:27:57PM +0200, Ulf Hansson wrote: > If a call to dev_pm_domain_attach() succeeds to attach a device to its > single PM domain, the important point is to prevent following calls to nit: s/prevent/ensure/ > dev_pm_domain_attach_by_name|id() to fail. This is managed by

Re: DISCONTIGMEM is deprecated

2019-04-24 Thread Mike Rapoport
On Tue, Apr 23, 2019 at 12:13:54AM -0700, Christoph Hellwig wrote: > On Sun, Apr 21, 2019 at 10:16:04PM +0100, Mel Gorman wrote: > > 32-bit NUMA systems should be non-existent in practice. The last NUMA > > system I'm aware of that was both NUMA and 32-bit only died somewhere > > between 2004 and

Re: [PATCH] rcu/sync: kill rcu_sync_type/gp_type

2019-04-24 Thread Oleg Nesterov
On 04/23, Paul E. McKenney wrote: > > I wordsmithed the commit log and merged in the RCU-bh and RCU checks > to rcu_sync_is_idle(), with the result shown below. Does that work > OK, or did I mess something up? Yes, thanks! the additional RCU-bh and RCU checks matches the "or introduce

[PATCH] ASoC: Intel: bytcht_es8316: fix cast warning

2019-04-24 Thread Anders Roxell
When building bytcht_es8316 the following warning shows up: ../sound/soc/intel/boards/bytcht_es8316.c: In function ‘snd_byt_cht_es8316_mc_probe’: ../sound/soc/intel/boards/bytcht_es8316.c:508:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] quirk =

Re: [PATCH v2 31/79] docs: s390: convert docs to ReST and rename to *.rst

2019-04-24 Thread Cornelia Huck
On Mon, 22 Apr 2019 10:27:20 -0300 Mauro Carvalho Chehab wrote: > Convert all text files with s390 documentation to ReST format. > > Tried to preserve as much as possible the original document > format. Still, some of the files required some work in order > for it to be visible on both plain

RE: [PATCH] x86/entry/64: randomize kernel stack offset upon syscall

2019-04-24 Thread Reshetova, Elena
Hi, Sorry for the delay - Easter holidays + I was trying to arrange my brain around proposed options. Here what I think our options are with regards to the source of randomness: 1) rdtsc or variations based on it (David proposed some CRC-based variants for example) 2) prandom-based options

Re: general protection fault in fanotify_handle_event

2019-04-24 Thread Jan Kara
On Tue 23-04-19 21:05:22, Amir Goldstein wrote: > On Tue, Apr 23, 2019 at 7:27 PM Jan Kara wrote: > > > > On Fri 19-04-19 12:33:02, Amir Goldstein wrote: > > > On Thu, Apr 18, 2019 at 8:14 PM syzbot > > > wrote: > > > > > > > > syzbot has bisected this bug to: > > > > > > > > commit

[PATCH 0/5] Add pinctrl support for BM1880 SoC

2019-04-24 Thread Manivannan Sadhasivam
Hello, This patchset adds pinctrl support for Bitmain BM1880 SoC and Sophon Edge board. BM1880 SoC can only handle pinmux functionality, hence the driver has no pinconf support. This patchset has been tested on 96Boards Sophon Edge board. Thanks, Mani Manivannan Sadhasivam (5): dt-bindings:

[PATCH 1/5] dt-bindings: pinctrl: Add BM1880 pinctrl binding

2019-04-24 Thread Manivannan Sadhasivam
Add pinctrl binding for Bitmain BM1880 SoC. The SoC is not capable of handling pinconf, thereby supporting only pinmux and this limitation is documented. Signed-off-by: Manivannan Sadhasivam --- .../pinctrl/bitmain,bm1880-pinctrl.txt| 98 +++ 1 file changed, 98

[PATCH 2/5] arm64: dts: bitmain: Add pinctrl support for BM1880 SoC

2019-04-24 Thread Manivannan Sadhasivam
Add pinctrl support for Bitmain BM1880 SoC. This SoC only supports pinmuxing and the pinctrl registers are part of the sctrl block. Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/bitmain/bm1880.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git

[v2 1/1] kconfig: Terminate menu blocks with a comment in the generated config

2019-04-24 Thread Alexander Popov
Currently menu blocks start with a pretty header but end with nothing in the generated config. So next config options stick together with the options from the menu block. Let's terminate menu blocks in the generated config with a comment and a newline if needed. Example: ...

[PATCH 4/5] pinctrl: Add pinctrl support for BM1880 SoC

2019-04-24 Thread Manivannan Sadhasivam
Add pinctrl support for Bitmain BM1880 SoC. The driver only handles pinmuxing as the SoC is not capable of handling pinconf. Signed-off-by: Manivannan Sadhasivam --- drivers/pinctrl/Kconfig | 7 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-bm1880.c | 965

[PATCH 5/5] MAINTAINERS: Add entry for BM1880 pinctrl

2019-04-24 Thread Manivannan Sadhasivam
Add MAINTAINERS entry for Bitmain BM1880 SoC pinctrl. Signed-off-by: Manivannan Sadhasivam --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3671fdea5010..8b5fcb89a8a4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1416,7 +1416,9 @@ M:

[PATCH 3/5] arm64: dts: bitmain: Add UART pinctrl support for Sophon Edge

2019-04-24 Thread Manivannan Sadhasivam
Add pinctrl support for UARTs exposed on the Sophon Edge board. Signed-off-by: Manivannan Sadhasivam --- .../boot/dts/bitmain/bm1880-sophon-edge.dts | 29 +++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/bitmain/bm1880-sophon-edge.dts

Re: [PATCH 1/1] kconfig: Terminate menu blocks with a newline in the generated config

2019-04-24 Thread Alexander Popov
On 24.04.2019 13:09, Masahiro Yamada wrote: > On Sat, Apr 20, 2019 at 4:12 AM Alexander Popov wrote: >> >> Currently menu blocks start with a pretty header but end with nothing in >> the generated config. So next config options stick together with the >> options from the menu block. >> >> Let's

Re: [PATCH] tools lib traceevent: Change tag string for error

2019-04-24 Thread Steven Rostedt
On Wed, 24 Apr 2019 09:38:02 +0800 Leo Yan wrote: > The traceevnt lib is used by perf tool, when execute 'perf test -v 6' it > outputs error log on ARM64 platform: > > running test 33 '*:*'trace-cmd: No such file or directory > > [...] > > trace-cmd: Invalid argument > > The trace

Re: [PATCH 3/3] iio: Add PAT9125 optical tracker sensor

2019-04-24 Thread Jonathan Cameron
On Tue, 23 Apr 2019 10:57:40 +0200 Alexandre wrote: Hi Alexandre, > Hi Jonathan, > > On 4/22/19 10:42, Jonathan Cameron wrote: > > On Tue, 16 Apr 2019 14:49:19 +0200 > > Alexandre wrote: > > > >> Hello Jonathan, > >> > >> On 4/7/19 12:20, Jonathan Cameron wrote: > >>> Hi Alexandre, > >>>

Re: [PATCH v4 0/2] thermal: rcar_gen3_thermal: fix IRQ issues

2019-04-24 Thread Eugeniu Rosca
On Wed, Apr 24, 2019 at 02:11:43PM +0900, Jiada Wang wrote: > There are issues with interrupt handling in rcar_gen3_thermal driver. > > Currently IRQ is remain enabled after .remove, later if device is probed, > IRQ is requested before .thermal_init, this may cause IRQ function be > triggered but

Re: [PATCH v2] Input: uinput: Avoid Object-Already-Free with a global lock

2019-04-24 Thread Mukesh Ojha
On 4/23/2019 4:36 PM, Al Viro wrote: On Tue, Apr 23, 2019 at 08:49:44AM +, dmitry.torok...@gmail.com wrote: On Tue, Apr 23, 2019 at 12:51:13PM +0530, Mukesh Ojha wrote: I have taken care this case from ioctl and release point of view. Even if the release gets called first it will make

Re: [RESEND4, PATCH 1/2] fuse: retrieve: cap requested size to negotiated max_write

2019-04-24 Thread Kirill Smelkov
On Wed, Apr 24, 2019 at 12:44:50PM +0200, Miklos Szeredi wrote: > On Wed, Mar 27, 2019 at 11:15 AM Kirill Smelkov wrote: > > > > FUSE filesystem server and kernel client negotiate during initialization > > phase, what should be the maximum write size the client will ever issue. > >

Re: [Resend] arch: mips: Fix initrd_start and initrd_end when read from DT

2019-04-24 Thread Horatiu Vultur
Hi Paul, Thank you for your detail explanation. There are few observations below. The 04/19/2019 20:55, Paul Burton wrote: > External E-Mail > > > Hi Horatiu, > > On Tue, Apr 16, 2019 at 12:18:20PM +0200, Horatiu Vultur wrote: > > When the bootloader passes arguments to linux kernel through

Re: [PATCH] drivers: iio: proximity: This patch fix the following checkpatch warning.

2019-04-24 Thread Jonathan Cameron
On Wed, 24 Apr 2019 17:23:26 +0800 Matt Ranostay wrote: > On Mon, Apr 22, 2019 at 6:48 PM Jonathan Cameron wrote: > > > > On Thu, 18 Apr 2019 16:23:51 -0700 > > Matt Ranostay wrote: > > > > > See comments inline > > > > > > On Wed, Apr 17, 2019 at 11:15 AM Mohan Kumar > > > wrote: > > >

Re: [RESEND4, PATCH 1/2] fuse: retrieve: cap requested size to negotiated max_write

2019-04-24 Thread Miklos Szeredi
On Wed, Apr 24, 2019 at 1:56 PM Kirill Smelkov wrote: > I assume you are meaning this: > > --- a/fs/fuse/dev.c > +++ b/fs/fuse/dev.c > @@ -1745,15 +1745,15 @@ static int fuse_retrieve(struct fuse_conn > *fc, struct inode *inode, > unsigned int offset; >

Re: [PATCH] spi: atmel-quadspi: fix crash while suspending

2019-04-24 Thread Tudor.Ambarus
On 04/24/2019 12:17 PM, claudiu.bez...@microchip.com wrote: > From: Claudiu Beznea > > atmel_qspi objects are kept in spi_controller objects, so, first get > pointer to spi_controller object and then get atmel_qspi object from > spi_controller object. > > Fixes: 2d30ac5ed633 ("mtd: spi-nor:

Re: DISCONTIGMEM is deprecated

2019-04-24 Thread Mel Gorman
On Wed, Apr 24, 2019 at 02:33:53PM +0300, Mike Rapoport wrote: > On Tue, Apr 23, 2019 at 12:13:54AM -0700, Christoph Hellwig wrote: > > On Sun, Apr 21, 2019 at 10:16:04PM +0100, Mel Gorman wrote: > > > 32-bit NUMA systems should be non-existent in practice. The last NUMA > > > system I'm aware of

Re: [PATCH] lkdtm: fix potential use after free

2019-04-24 Thread Mark Rutland
Hi, On Wed, Apr 24, 2019 at 05:59:52PM +0800, Weikang shi wrote: > From: swkhack > > The function lkdtm_READ_AFTER_FREE calls kfree(base) to free the memory > of base. However, following kfree(base), > it access the memory which base point to via base[offset]. This may result in > a >

Re: [PATCH] lkdtm: fix potential use after free

2019-04-24 Thread Mark Rutland
On Wed, Apr 24, 2019 at 06:21:03PM +0800, Weikang shi wrote: > From: swkhack > > The function lkdtm_WRITE_AFTER_FREE calls kfree(base) to free the memory > of base. However, following kfree(base), > it write the memory which base point to via base[offset] = 0x0abcdef0. This > may result in a >

Re: [RESEND4, PATCH 2/2] fuse: require /dev/fuse reads to have enough buffer capacity as negotiated

2019-04-24 Thread Kirill Smelkov
On Wed, Apr 24, 2019 at 12:48:36PM +0200, Miklos Szeredi wrote: > On Wed, Mar 27, 2019 at 11:44 AM Kirill Smelkov wrote: > > > > A FUSE filesystem server queues /dev/fuse sys_read calls to get > > filesystem requests to handle. It does not know in advance what would be > > that request as it can

Re: [PATCH v2 1/2] dt-bindings: iio: tsl2772: convert bindings to YAML format

2019-04-24 Thread Brian Masney
On Wed, Apr 24, 2019 at 05:22:37AM -0400, Brian Masney wrote: > Convert the tsl2772 device tree bindings to the new YAML format. > > Signed-off-by: Brian Masney > --- > Changes since v1: > - Dropped description from reg and interrupts properties. > - Dropped $ref from led-max-microamp,

Re: [PATCH 3/3] iio: light: apple-ib-als: Add driver for ALS on iBridge chip.

2019-04-24 Thread Jonathan Cameron
On Tue, 23 Apr 2019 03:38:55 -0700 "Life is hard, and then you die" wrote: > Hi Jonathan, Peter, > > On Mon, Apr 22, 2019 at 01:01:38PM +0100, Jonathan Cameron wrote: > > On Mon, 22 Apr 2019 11:17:27 +0200 (CEST) > > Peter Meerwald-Stadler wrote: > > > > > On Sun, 21 Apr 2019, Ronald

[PATCH] rtc: stm32: manage the get_irq probe defer case

2019-04-24 Thread Fabien Dessenne
Manage the -EPROBE_DEFER error case for the wake IRQ. Signed-off-by: Fabien Dessenne --- drivers/rtc/rtc-stm32.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index c5908cf..8e6c9b3 100644 ---

Re: [PATCH v4 1/2] thermal: rcar_gen3_thermal: fix interrupt type

2019-04-24 Thread Eugeniu Rosca
On Wed, Apr 24, 2019 at 02:11:44PM +0900, Jiada Wang wrote: > Currently IRQF_SHARED type interrupt line is allocated, but it > is not appropriate, as the interrupt line isn't shared between > different devices, instead IRQF_ONESHOT is the proper type. > > By changing interrupt type to

Re: [PATCH] drm/stm: ltdc: disable hw interrupts before its handler init

2019-04-24 Thread Benjamin Gaignard
Le lun. 1 avr. 2019 à 11:19, Philippe CORNU a écrit : > > > On 3/29/19 4:48 PM, Yannick Fertré wrote: > > Interrupt register must be disabled before call of > > devm_request_threaded_irq function to avoid dummy interruption. > > > > Signed-off-by: Yannick Fertré > > --- > >

[PATCH v3] ARM: dts: aspeed: Adding Lenovo Hr630 BMC

2019-04-24 Thread Andrew Peng
Initial introduction of Lenovo Hr630 family equipped with Aspeed 2500 BMC SoC. Hr630 is a x86 server development kit with a ASPEED ast2500 BMC manufactured by Lenovo. Specifically, This adds the Hr630 platform device tree file used by the Hr630 BMC machines. This also adds an entry of Hr630

Re: [PATCH v4 2/2] thermal: rcar_gen3_thermal: disable interrupt in .remove

2019-04-24 Thread Eugeniu Rosca
On Wed, Apr 24, 2019 at 02:11:45PM +0900, Jiada Wang wrote: > Currently IRQ remains enabled after .remove, later if device is probed, > IRQ is requested before .thermal_init, this may cause IRQ function be > called before device is initialized. > > this patch disables interrupt in .remove, to

[PATCH 0/5] i2c-mux-gpio: Split plat- and dt-specific code up

2019-04-24 Thread Serge Semin
The main idea of this patchset was to add the dt-based GPIOs support in i2c-mux-gpio driver. In particular we needed to have the full GPIOs specifier being handled including the dt-flags like GPIO_ACTIVE_HIGH, GPIO_ACTIVE_LOW, etc. Due to using a legacy GPIO interface the former driver

[PATCH 1/5] i2c-mux-gpio: Unpin a platform-based device initialization

2019-04-24 Thread Serge Semin
We can unpin a code specific for i2c-mux-gpio device declared as platform device. In this case the platform data just needs to be copied to the private storage and if GPIO chip pointer is referring to a valid GPIO chip descriptor save it' base number for further GPIOs request and initialization.

[PATCH 3/5] i2c-mux-gpio: Save initial channel number to the idle data field

2019-04-24 Thread Serge Semin
In case if the idle state has been specified in the data structure, the idle variable is left untouched as before, so to keep a default channel number enabled in the mux idle state. But if a platform doesn't specify which channel is going to be enabled by default, we as before don't setup the

[PATCH 4/5] i2c-mux-gpio: Unpin the platform-specific GPIOs request code

2019-04-24 Thread Serge Semin
The GPIOs request loop can be safely moved to a separate function. First of all it shall improve the code readability. Secondly the initialization loop at this point is used for both of- and platform_data-based initialization paths, but it will be changed in the next patch, so by isolating the

[PATCH 5/5] i2c-mux-gpio: Create of-based GPIOs request method

2019-04-24 Thread Serge Semin
Most modern platforms provide a dts with description of the devices available in the system. It may also include i2c-gpio-mux'es. Up until now the i2c-mux-gpio driver supported it' dts nodes, but performed the GPIOs request by means of legacy GPIO API, which by design and due to being legacy

[PATCH 2/5] i2c-mux-gpio: Return an error if no config data found

2019-04-24 Thread Serge Semin
It's pointless and might be even errors prone to proceed with further initialization if neither of- no platform-based settings were discovered. Just return an error in this case. Signed-off-by: Serge Semin --- drivers/i2c/muxes/i2c-mux-gpio.c | 12 +++- 1 file changed, 7 insertions(+),

Re: [PATCH 1/2] lib: add __sysfs_match_string_with_gaps() helper

2019-04-24 Thread Jonathan Cameron
On Tue, 23 Apr 2019 06:38:44 + "Ardelean, Alexandru" wrote: > On Mon, 2019-04-22 at 23:06 +0200, Greg KH wrote: > > > > > > On Mon, Apr 22, 2019 at 11:32:56AM +0300, Alexandru Ardelean wrote: > > > This helper is similar to __sysfs_match_string() with the exception > > > that it > > >

  1   2   3   4   5   6   7   8   9   10   >