Re: [PATCH v2 1/2] hwmon: (ucd9000) Add gpio chip interface

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 10:59 PM, Eddie James wrote: > From: Christopher Bostic > > Add a struct gpio_chip and define some methods so that this device's > I/O can be accessed via /sys/class/gpio. > + /* > +* Note: > +* > +* Pinmux support has not been added to the n

[PATCH] btree: avoid variable-length allocations

2018-03-13 Thread Jörn Engel
I agree that the code is garbage. In my defense, creating generic iterator-type functions for multiple data types appears to be one of the hardest problems in CS with many bad examples of what not to do. Patch below should fix it. We have tcm_qla2xxx systems, so I will stick it into our test sys

Re: [PATCH v2 00/13] Major code reorganization to make all i2c transfers working

2018-03-13 Thread Christ, Austin
I've tested this v2 series on Centriq 2400. Looks good to me. Reviewed-by: Austin Christ On 3/12/2018 7:14 AM, Abhishek Sahu wrote: * v2: 1. Address review comments in v1 2. Changed the license to SPDX 3. Changed commit messages for some of the patch having more detail 4. Removed event-based

[PATCH] [v3] xen: remove pre-xen3 fallback handlers

2018-03-13 Thread Arnd Bergmann
The legacy hypercall handlers were originally added with a comment explaining that "copying the argument structures in HYPERVISOR_event_channel_op() and HYPERVISOR_physdev_op() into the local variable is sufficiently safe" and only made sure to not write past the end of the argument structure, the

Re: dcache: remove trylock loops (was Re: [BUG] lock_parent() breakage when used from shrink_dentry_list())

2018-03-13 Thread John Ogness
Hi Al, 1 minor issue on the new shrink_lock_dentry()... > From 121a8e0834862d2c5d88c95f8e6bc8984f195abf Mon Sep 17 00:00:00 2001 > From: Al Viro > Date: Fri, 23 Feb 2018 21:54:18 -0500 > Subject: [PATCH] get rid of trylock loop in locking dentries on shrink > list > > In case of trylock failure

[PATCH v3 9/9] x86/microcode/AMD: be more tolerant of late parse failures in late loader

2018-03-13 Thread Maciej S. Szmigiero
The early loader just ends its microcode container file processing when it is unable to parse some patch section, but keeps the already read patches from this file for their eventual application. We can do the same in the late loader - we'll just return an error if we are unable to parse any patch

Re: [PATCH v4 4/6] ipc: Clamp msgmni and shmmni to the real IPCMNI limit

2018-03-13 Thread Waiman Long
On 03/13/2018 04:29 PM, Eric W. Biederman wrote: > Waiman Long writes: > >> On 03/13/2018 02:17 PM, Eric W. Biederman wrote: >>> Waiman Long writes: >>> A user can write arbitrary integer values to msgmni and shmmni sysctl parameters without getting error, but the actual limit is really

[PATCH v3 8/9] x86/microcode/AMD: check the equivalence table size when scanning it

2018-03-13 Thread Maciej S. Szmigiero
Currently, the code scanning the CPU equivalence table read from a microcode container file assumes that it actually contains a terminating zero entry. Let's check also the size of this table to make sure that we don't read past it in case it actually doesn't. Signed-off-by: Maciej S. Szmigiero -

[PATCH v3 7/9] x86/microcode/AMD: check microcode container file size before accessing it

2018-03-13 Thread Maciej S. Szmigiero
The early loader parse_container() function should check whether the microcode container file is actually large enough to contain the patch of an indicated size, just like the late loader does. Also, the request_microcode_amd() function should check whether the container file is actually large eno

[PATCH v3 1/9] x86/microcode/AMD: subtract SECTION_HDR_SIZE from file leftover length

2018-03-13 Thread Maciej S. Szmigiero
verify_patch_size() function verifies whether the microcode container file remaining size is large enough to contain a patch of the indicated size. However, the section header length is not included in this indicated size but it is present in the leftover file length so it should be subtracted fro

[PATCH v3 3/9] x86/microcode/AMD: install_equiv_cpu_table() should not return (signed) int

2018-03-13 Thread Maciej S. Szmigiero
The maximum possible value returned by install_equiv_cpu_table() is UINT_MAX + CONTAINER_HDR_SZ (on a 64-bit kernel). This is more than (signed) int type currently returned by this function can hold so this function will need to return a size_t instead. The individual (negative) error codes return

[PATCH v3 4/9] x86/microcode/AMD: automatically compute the PATCH_MAX_SIZE macro

2018-03-13 Thread Maciej S. Szmigiero
The PATCH_MAX_SIZE macro should contain the maximum of all family patch sizes, computed automatically so that future changes there don't cause an inconsistency. Unfortunately, we can't use a standard max{,3} macros for this since they only work inside a function (they use a compound statement as a

[PATCH v3 5/9] x86/microcode/AMD: check patch size in verify_and_add_patch()

2018-03-13 Thread Maciej S. Szmigiero
Now that we have the PATCH_MAX_SIZE macro correctly computed we can verify properly the indicated size of a patch in a microcode container file and whether this file is actually large enough to contain it in the late loader verify_and_add_patch() function. The early loader already does the PATCH_M

[PATCH v3 2/9] x86/microcode/AMD: check whether the equivalence table fits in the file

2018-03-13 Thread Maciej S. Szmigiero
Before loading a CPU equivalence table from a microcode container file we need to verify whether this file is actually large enough to contain the table of a size indicated in this file. If it is not, there is no point of continuing with loading it since microcode patches are located after the equi

[PATCH v3 6/9] x86/microcode/AMD: verify patch section type for every such section

2018-03-13 Thread Maciej S. Szmigiero
We should check whether the patch section currently being processed is actually a patch section for each of them (not just the first one) in the late loader verify_and_add_patch() function, just like the early loader already does in parse_container() function. Signed-off-by: Maciej S. Szmigiero -

[PATCH v3 0/9] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-13 Thread Maciej S. Szmigiero
Currently, it is very easy to make the AMD microcode update driver crash or spin on a malformed microcode container file since it does very little consistency checking on data loaded from such file. This series introduces various checks, mostly on length-type fields, so all corrupted microcode con

Re: [PATCH v3 00/10] splash screen on the stm32f769 disco board

2018-03-13 Thread Brian Norris
On Tue, Mar 13, 2018 at 1:50 PM, Anatolij Gustschin wrote: > On Tue, 13 Mar 2018 16:23:10 +0100 > Daniel Vetter dan...@ffwll.ch wrote: > ... >> Shouldn't we patch the drivers/gpu/drm/stm driver instead of the >> drivers/video one? fbdev is kinda a dead end and not for adding new hw >> support ...

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-13 Thread Andrew Morton
On Mon, 12 Mar 2018 21:28:57 -0700 Kees Cook wrote: > On Mon, Mar 12, 2018 at 4:57 PM, Linus Torvalds > wrote: > > On Mon, Mar 12, 2018 at 3:55 PM, Andrew Morton > > wrote: > >> > >> Replacing the __builtin_choose_expr() with ?: works of course. > > > > Hmm. That sounds like the right thing to

Re: [PATCH] clang-format: add configuration file

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 00:39:52 +0100 Miguel Ojeda wrote: > --- a/Documentation/process/4.Coding.rst > +++ b/Documentation/process/4.Coding.rst > @@ -58,6 +58,12 @@ can never be transgressed. If there is a good reason to > go against the > style (a line which becomes far less readable if split t

[PATCH] staging: vme: vme_user: Fix some error handling paths in 'vme_user_probe()'

2018-03-13 Thread Christophe JAILLET
2 gotos in error handling paths branch to the wrong label. Fix it. Signed-off-by: Christophe JAILLET --- drivers/staging/vme/devices/vme_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c

Re: [RESEND] rsi: Remove stack VLA usage

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 10:17 PM, tcharding wrote: > On Mon, Mar 12, 2018 at 09:46:06AM +, Kalle Valo wrote: >> tcharding wrote: I'm pretty much sure it depends on the original email headers, like above ^^^ — no name. Perhaps git config on your side should be done. -- With Best Regards, An

Richard Stallman VS Bill Gates

2018-03-13 Thread Ywe Cærlyn
Richard Stallman: Plays on Ignatius known for drinking urine: https://www.youtube.com/watch?v=8c-EVhY5Vms Bill Gates: Enjoys Ghetto Feces Water: https://www.youtube.com/watch?v=t18jmxLwLFE The Alternative?: Racoh Computer: https://www.youtube.com/watch?v=x8HzSVdBHZU The earlier low-jitter

[PATCH] drm/panel: rm68200: add backlight dependency

2018-03-13 Thread Arnd Bergmann
Like many other panel drivers, this one fails to build when backlight support is disabled: drivers/gpu/drm/panel/panel-raydium-rm68200.o: In function `rm68200_probe': panel-raydium-rm68200.c:(.text+0x14a): undefined reference to `devm_of_find_backlight' This adds the appropriate dependency. Fix

[PATCH v2 1/2] hwmon: (ucd9000) Add gpio chip interface

2018-03-13 Thread Eddie James
From: Christopher Bostic Add a struct gpio_chip and define some methods so that this device's I/O can be accessed via /sys/class/gpio. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed-off-by: Eddie James --- drivers/hwmon/pmbus/ucd9000.c | 201 ++

[PATCH] pktgen: use dynamic allocation for debug print buffer

2018-03-13 Thread Arnd Bergmann
After the removal of the VLA, we get a harmless warning about a large stack frame: net/core/pktgen.c: In function 'pktgen_if_write': net/core/pktgen.c:1710:1: error: the frame size of 1076 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The function was previously shown to be safe d

[PATCH v2 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces

2018-03-13 Thread Eddie James
The ucd9000 series chips have gpio pins. Add a gpio chip interface to the ucd device so that users can query and set the state of the gpio pins. Add a debugfs interface using the existing pmbus debugfs directory to provide MFR_STATUS and the status of the gpi faults to users. Changes since v1: -

[PATCH v2 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Eddie James
From: Christopher Bostic Expose the gpiN_fault fields of mfr_status as individual debugfs attributes. This provides a way for users to be easily notified of gpi faults. Also provide the whole mfr_status register in debugfs. Signed-off-by: Christopher Bostic Signed-off-by: Andrew Jeffery Signed

Re: linux-next: build failure after merge of the akpm-current tree

2018-03-13 Thread Stephen Rothwell
Hi Andrew, On Tue, 13 Mar 2018 12:44:34 -0700 Andrew Morton wrote: > > On Tue, 13 Mar 2018 20:51:19 +1100 Stephen Rothwell > wrote: > > > After merging the akpm-current tree, today's linux-next build (lots of > > configuations) failed like this: > > > > (from the i386 defconfig build) > > >

Re: [PATCH v3 3/3] Bluetooth: hci_qca: Add serdev support

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:38 PM, Thierry Escande wrote: > Add support for Qualcomm serial slave devices. Probe the serial device, > retrieve its maximum speed and register a new hci uart device. > config BT_HCIUART_QCA > bool "Qualcomm Atheros protocol support" > - depends on BT_HC

Re: [PATCH v2 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:54 PM, Gary R Hook wrote: > On 03/13/2018 12:20 PM, Andy Shevchenko wrote: >>> + } else if (obuf[0] == '0' && obuf[1] == 'x') { >>> + n = sscanf(obuf, "%x", &amd_iommu_devid); >>> + } else { >>> + n = sscanf(obuf, "%d", &amd_iommu_

Re: perf-core build fails on powerpc

2018-03-13 Thread John Garry
On 13/03/2018 20:10, Sukadev Bhattiprolu wrote: + John Garry [john.ga...@huawei.com] wrote: On 13/03/2018 19:17, Sukadev Bhattiprolu wrote: Building perf on Powerpc seems broken when using Arnaldo's perf/core branch with HEAD as: 1b442ed ("perf test: Fix exit code for record+probe_libc

Re: [PATCH v3 00/10] splash screen on the stm32f769 disco board

2018-03-13 Thread Anatolij Gustschin
On Tue, 13 Mar 2018 16:23:10 +0100 Daniel Vetter dan...@ffwll.ch wrote: ... > Shouldn't we patch the drivers/gpu/drm/stm driver instead of the > drivers/video one? fbdev is kinda a dead end and not for adding new hw > support ... this patch series adds display driver to U-Boot project, I don't kno

Re: [PATCH V2] perf/x86/intel/uncore: Querying number of CHAs from CAPID6 register

2018-03-13 Thread Liang, Kan
On 3/13/2018 4:24 PM, Kroening, Gary wrote: I've tested this patch on the same set of hubless (single-segment) and scalable (segment-per-socket) configurations as for Kan's version 1. As far as we can tell this will also work for Cascade Lake, but will need revisiting for Ice Lake. For Ice

Re: linux-next: Tree for Mar 13

2018-03-13 Thread Stephen Rothwell
Hi Dominik, On Tue, 13 Mar 2018 18:52:05 +0100 Dominik Brodowski wrote: > > would it be possible to have > >https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git > syscalls-next > > added to -next? This will probably only be for one or two release cycles, > but it might easen th

Re: [RESEND RFC] translate_pid API

2018-03-13 Thread Jann Horn
On Mon, Mar 12, 2018 at 10:18 AM, wrote: > Resending the RFC with participants of previous discussions > in the list. > > Following patch which is a variation of a solution discussed > in https://lwn.net/Articles/736330/ provides the users of > pid namespace, the functionality of pid translation

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-13 Thread Logan Gunthorpe
On 13/03/18 01:53 PM, Sinan Kaya wrote: > I agree disabling globally would be bad. Somebody can always say I have > ten switches on my system. I want to do peer-to-peer on one switch only. Now, > this change weakened security for the other switches that I had no intention > with doing P2P. > > I

Re: dcache: remove trylock loops (was Re: [BUG] lock_parent() breakage when used from shrink_dentry_list())

2018-03-13 Thread John Ogness
On 2018-03-12, Al Viro wrote: >> If someone else has grabbed a reference, it shouldn't be added to the >> lru list. Only decremented. >> >> if (entry->d_lockref.count == 1) > > Nah, better handle that in retain_dentry() itself. See updated > #work.dcache. > > + if (unlikely(dentry->d_lockref

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
> Soft lockup: kernel has run for too long without rescheduling > Hard lockup: kernel has run for too long with interrupts disabled > > Both of these are detected by the NMI watchdog handler. > > 9b6e63cbf85b89b2d fixes a soft lockup by adding a manual rescheduling > point. Replacing that with

Re: [PATCH 4/8] Uprobe: Export uprobe_map_info along with uprobe_{build/free}_map_info()

2018-03-13 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:25:59PM +0530, Ravi Bangoria wrote: > These exported data structure and functions will be used by other > files in later patches. > > No functionality changes. > > Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse > --- > include/linux/uprobes.h | 9

Re: [PATCH 3/8] Uprobe: Rename map_info to uprobe_map_info

2018-03-13 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:25:58PM +0530, Ravi Bangoria wrote: > map_info is very generic name, rename it to uprobe_map_info. > Renaming will help to export this structure outside of the > file. > > Also rename free_map_info() to uprobe_free_map_info() and > build_map_info() to uprobe_build_map_in

Re: [PATCH 2/8] mm: Prefix vma_ to vaddr_to_offset() and offset_to_vaddr()

2018-03-13 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:25:57PM +0530, Ravi Bangoria wrote: > No functionality changes. > > Signed-off-by: Ravi Bangoria Doing this with coccinelle would have been nicer but this is small enough to review without too much fatigue :) Reviewed-by: Jérôme Glisse > --- > include/linux/mm.h

[PATCH] clk: rockchip: Add 1.6GHz PLL rate

2018-03-13 Thread Derek Basehore
We need this rate to generate 100, 200, and 228.57MHz from the same PLL. 228.57MHz is useful for a pixel clock when the VPLL is used for and external display. Signed-off-by: Derek Basehore --- drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockc

Re: [PATCH 1/8] Uprobe: Export vaddr <-> offset conversion functions

2018-03-13 Thread Jerome Glisse
On Tue, Mar 13, 2018 at 06:25:56PM +0530, Ravi Bangoria wrote: > No functionality changes. > > Signed-off-by: Ravi Bangoria Reviewed-by: Jérôme Glisse > --- > include/linux/mm.h | 12 > kernel/events/uprobes.c | 10 -- > 2 files changed, 12 insertions(+), 10 deletion

[PATCH] regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()'

2018-03-13 Thread Christophe JAILLET
Re-order error handling code and gotos to avoid leaks in error handling paths. Fixes: 9f946099fe19 ("regulator: gpio: fix parsing of gpio list") Signed-off-by: Christophe JAILLET --- drivers/regulator/gpio-regulator.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff -

Re: [PATCH v4 4/6] ipc: Clamp msgmni and shmmni to the real IPCMNI limit

2018-03-13 Thread Eric W. Biederman
Waiman Long writes: > On 03/13/2018 02:17 PM, Eric W. Biederman wrote: >> Waiman Long writes: >> >>> A user can write arbitrary integer values to msgmni and shmmni sysctl >>> parameters without getting error, but the actual limit is really >>> IPCMNI (32k). This can mislead users as they think t

Re: [PATCH] libata: add refcounting to ata_host

2018-03-13 Thread Tejun Heo
On Fri, Mar 09, 2018 at 08:34:41AM +, Taras Kondratiuk wrote: > After commit 9a6d6a2ddabb ("ata: make ata port as parent device of scsi > host") manual driver unbind/remove causes use-after-free. > > Unbind unconditionally invokes devres_release_all() which calls > ata_host_release() and frees

Re: linux-next: build warning after merge of the net-next tree

2018-03-13 Thread Gustavo A. R. Silva
On 03/13/2018 10:33 AM, David Miller wrote: From: "Gustavo A. R. Silva" Date: Tue, 13 Mar 2018 06:46:24 -0500 Hi Stephen, On 03/13/2018 01:11 AM, Stephen Rothwell wrote: Hi all, After merging the net-next tree, today's linux-next build (sparc defconfig) produced this warning: net/core/pktg

Re: [PATCH v2] workqueue: use put_device() instead of kfree()

2018-03-13 Thread Tejun Heo
On Tue, Mar 06, 2018 at 03:35:43PM +0530, Arvind Yadav wrote: > Never directly free @dev after calling device_register(), even > if it returned an error! Always use put_device() to give up the > reference initialized in this function instead. > > Signed-off-by: Arvind Yadav Applied to wq/for-4.1

Re: [PATCH V2] perf/x86/intel/uncore: Querying number of CHAs from CAPID6 register

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:51 PM, wrote: > From: Kan Liang > > The number of CHAs is miscalculated on multi PCI domain systems on > Skylake server. > > (From Kroening, Gary: > > For systems with a single PCI segment, it is sufficient to look for the > bus number to change in order to determine th

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Paul Moore
On Tue, Mar 13, 2018 at 6:52 AM, Richard Guy Briggs wrote: > On 2018-03-13 11:38, Steve Grubb wrote: >> On Tue, 13 Mar 2018 06:11:08 -0400 >> Richard Guy Briggs wrote: >> >> > On 2018-03-13 09:35, Steve Grubb wrote: >> > > On Mon, 12 Mar 2018 11:52:56 -0400 >> > > Richard Guy Briggs wrote: >> >

RE: [PATCH V2] perf/x86/intel/uncore: Querying number of CHAs from CAPID6 register

2018-03-13 Thread Kroening, Gary
I've tested this patch on the same set of hubless (single-segment) and scalable (segment-per-socket) configurations as for Kan's version 1. As far as we can tell this will also work for Cascade Lake, but will need revisiting for Ice Lake. Thanks. Gary > -Original Message- > From: kan.l

Re: [PATCH v2 1/5] iommu/amd - Add debugfs support

2018-03-13 Thread Andy Shevchenko
On Tue, Mar 13, 2018 at 8:54 PM, Gary R Hook wrote: > On 03/13/2018 12:16 PM, Andy Shevchenko wrote: >> On Fri, Mar 9, 2018 at 2:50 AM, Gary R Hook wrote: >>> +#include >>> +#include >>> +#include >> >> >> Keep in order? > What order would that be? These few needed files are listed in the sa

Re: [2/3] mwifiex: support sysfs initiated device coredump

2018-03-13 Thread Arend van Spriel
On 3/13/2018 9:19 PM, Marcel Holtmann wrote: Hi Arend, Since commit 3c47d19ff4dc ("drivers: base: add coredump driver ops") it is possible to initiate a device coredump from user-space. This patch adds support for it adding the .coredump() driver callback. As there is no longer a need to initia

Re: [PATCH 3/8] gpio: pci-idio-16: Implement get_multiple callback

2018-03-13 Thread William Breathitt Gray
On Tue, Mar 13, 2018 at 06:04:33PM +0200, Andy Shevchenko wrote: >On Mon, Mar 12, 2018 at 10:49 PM, William Breathitt Gray > wrote: > >> +static int idio_16_gpio_get_multiple(struct gpio_chip *chip, >> + unsigned long *mask, unsigned long *bits) >> +{ > > >> + /* clear bits array to a c

Re: [3/3] irqchip/gic-v3: Bounds check redistributor accesses

2018-03-13 Thread Marc Zyngier
On Tue, 13 Mar 2018 18:49:44 +, Nishanth Menon wrote: > > Marc, > > On Tue, Mar 13, 2018 at 9:21 AM, Marc Zyngier wrote: > > Hi Lokesh, > > > > On 13/03/18 13:38, Lokesh Vutla wrote: > >> Hi All, > >> > >> On Wednesday 11 October 2017 03:11 PM, Punit Agrawal wrote: > >>> The kernel crashes w

Re: [2/3] mwifiex: support sysfs initiated device coredump

2018-03-13 Thread Marcel Holtmann
Hi Arend, > Since commit 3c47d19ff4dc ("drivers: base: add coredump driver ops") > it is possible to initiate a device coredump from user-space. This > patch adds support for it adding the .coredump() driver callback. > As there is no longer a need to initiate it through debugfs re

Re: [RESEND] rsi: Remove stack VLA usage

2018-03-13 Thread tcharding
On Mon, Mar 12, 2018 at 09:46:06AM +, Kalle Valo wrote: > tcharding wrote: > > > The kernel would like to have all stack VLA usage removed[1]. rsi uses > > a VLA based on 'blksize'. Elsewhere in the SDIO code maximum block size > > is defined using a magic number. We can use a pre-processo

[PATCH] crypto: arm,arm64 - Fix random regeneration of S_shipped

2018-03-13 Thread Leonard Crestez
The decision to rebuild .S_shipped is made based on the relative timestamps of .S_shipped and .pl files but git makes this essentially random. This means that the perl script might run anyway (usually at most once per checkout), defeating the whole purpose of _shipped. Fix by skipping the rule unl

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 15:45:46 -0400 Pavel Tatashin wrote: > > > > > > We must remove cond_resched() because we can't sleep anymore. They were > > > added to fight NMI timeouts, so I will replace them with > > > touch_nmi_watchdog() in a follow-up fix. > > > > This makes no sense. Any code sect

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-13 Thread Bin Liu
Hi, On Mon, Mar 12, 2018 at 11:30:39PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 09/03/18 15:11, Bin Liu wrote: > > Hi, > > > > On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > >> This fixes an oops on unbind / module unload (on the musb omap2430 > >> platform). > >> > >> musb

Re: [RT PATCH 2/2] block: blk-mq: move blk_queue_usage_counter_release() into process context

2018-03-13 Thread Peter Zijlstra
On Tue, Mar 13, 2018 at 07:42:41PM +0100, Sebastian Andrzej Siewior wrote: > +static void blk_queue_usage_counter_release_swork(struct swork_event *sev) > +{ > + struct request_queue *q = > + container_of(sev, struct request_queue, mq_pcpu_wake); > + > + wake_up_all(&q->mq_freez

Re: [Intel-gfx] [PATCH] [v2] drm/i915/pmu: avoid -Wmaybe-uninitialized warning

2018-03-13 Thread Arnd Bergmann
On Tue, Mar 13, 2018 at 6:46 PM, Tvrtko Ursulin wrote: > > On 13/03/2018 16:19, Arnd Bergmann wrote: >> >> The conditional spinlock confuses gcc into thinking the 'flags' value >> might contain uninitialized data: >> >> drivers/gpu/drm/i915/i915_pmu.c: In function '__i915_pmu_event_read': >> arch/

Re: perf-core build fails on powerpc

2018-03-13 Thread Sukadev Bhattiprolu
John Garry [john.ga...@huawei.com] wrote: > On 13/03/2018 19:17, Sukadev Bhattiprolu wrote: > > > > > > Building perf on Powerpc seems broken when using Arnaldo's perf/core branch > > with HEAD as: > > > > 1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh") > > > > It ma

Re: [RESEND PATCH] rsi: Remove stack VLA usage

2018-03-13 Thread Tobin C. Harding
On Sun, Mar 11, 2018 at 09:06:10PM -0500, Larry Finger wrote: > On 03/11/2018 08:43 PM, Tobin C. Harding wrote: > >The kernel would like to have all stack VLA usage removed[1]. rsi uses > >a VLA based on 'blksize'. Elsewhere in the SDIO code maximum block size > >is defined using a magic number.

Re: linux-next: Tree for Mar 13

2018-03-13 Thread Stephen Rothwell
Hi Mike, On Tue, 13 Mar 2018 11:57:40 -0400 Mike Snitzer wrote: > > I had to revert the following commits to get this kernel to build > (otherwise I got macro expansion errors, using RHEL7 > gcc-4.8.5-28.el7.x86_64): Yeah, I reported that earlier (216 of my 244 builds failed - gcc 4.6.3) > beb7

Re: [PATCH] net: dsa: drop some VLAs in switch.c

2018-03-13 Thread Florian Fainelli
On 03/13/2018 12:58 PM, Vivien Didelot wrote: > Hi Salvatore, > > Salvatore Mesoraca writes: > >> dsa_switch's num_ports is currently fixed to DSA_MAX_PORTS. So we avoid >> 2 VLAs[1] by using DSA_MAX_PORTS instead of ds->num_ports. >> >> [1] https://lkml.org/lkml/2018/3/7/621 >> >> Signed-off-by

Re: [PATCH] net: dsa: drop some VLAs in switch.c

2018-03-13 Thread Vivien Didelot
Hi Salvatore, Salvatore Mesoraca writes: > dsa_switch's num_ports is currently fixed to DSA_MAX_PORTS. So we avoid > 2 VLAs[1] by using DSA_MAX_PORTS instead of ds->num_ports. > > [1] https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Salvatore Mesoraca NAK. We are in the process to remove

Re: [PATCH RFC 1/8] powerpc: Add barrier_nospec

2018-03-13 Thread Peter Zijlstra
On Tue, Mar 13, 2018 at 07:32:59PM +0100, Michal Suchanek wrote: > Copypasta from original gmb() and rfi implementation Actual real changelogs would be very welcome. Seeing as I've not seen these mythical RFI patches, this leaves one quite puzzled :-)

[PATCH] media: staging/imx: fill vb2_v4l2_buffer sequence entry

2018-03-13 Thread Peter Seiderer
Signed-off-by: Peter Seiderer --- drivers/staging/media/imx/imx-media-csi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 5a195f80a24d..3a6a645b9dce 100644 --- a/drivers/staging/media/imx/imx-m

Re: [tip:locking/core 9/11] include/asm-generic/atomic-instrumented.h:288:24: sparse: cast truncates bits from constant value (100 becomes 0)

2018-03-13 Thread Luc Van Oostenryck
On Tue, Mar 13, 2018 at 07:08:06PM +0100, Peter Zijlstra wrote: > On Tue, Mar 13, 2018 at 07:00:17PM +0100, Luc Van Oostenryck wrote: > > The issue here is that sparse has a whole class of warnings that are > > given very early (here at expansion of constant expressions), before > > eliminating cod

Re: [PATCH 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Eddie James
On 03/13/2018 02:29 PM, Guenter Roeck wrote: On Tue, Mar 13, 2018 at 02:01:51PM -0500, Eddie James wrote: On 03/10/2018 10:50 AM, Guenter Roeck wrote: On 03/09/2018 11:19 AM, Eddie James wrote: From: Christopher Bostic Expose the gpiN_fault fields of mfr_status as individual debugfs attri

[PATCH net 2/2] vmxnet3: use correct flag to indicate LRO feature

2018-03-13 Thread Ronak Doshi
'Commit 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")' introduced a flag "lro" in structure vmxnet3_adapter which is used to indicate whether LRO is enabled or not. However, the patch did not set the flag and hence it was never exercised. So, when LRO is enabled, it resulte

[PATCH] iio/adc/nau7802: Improve unlocking of a mutex in nau7802_read_raw()

2018-03-13 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 13 Mar 2018 20:52:26 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only once in this function implementation. * Replace two calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: M

[PATCH net 1/2] vmxnet3: avoid xmit reset due to a race in vmxnet3

2018-03-13 Thread Ronak Doshi
The field txNumDeferred is used by the driver to keep track of the number of packets it has pushed to the emulation. The driver increments it on pushing the packet to the emulation and the emulation resets it to 0 at the end of the transmit. There is a possibility of a race either when (a) ESX is

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-13 Thread Sinan Kaya
On 3/13/2018 3:19 PM, Logan Gunthorpe wrote: > > > On 13/03/18 01:10 PM, Sinan Kaya wrote: >> I was thinking of this for the pci_p2pdma_add_client() case for the >> parent pointer. >> >> +struct pci_p2pdma_client { >> +struct list_head list; >> +struct pci_dev *client; >> +struct pci_

Re: linux-next: Tree for Mar 13

2018-03-13 Thread Kees Cook
On Tue, Mar 13, 2018 at 8:57 AM, Mike Snitzer wrote: > I had to revert the following commits to get this kernel to build > (otherwise I got macro expansion errors, using RHEL7 > gcc-4.8.5-28.el7.x86_64): > > beb7eb2 kernelh-skip-single-eval-logic-on-literals-in-min-max-v3 > 19ff7e5 kernelh-skip-si

[PATCH] ocfs2: drop a VLA in ocfs2_orphan_del()

2018-03-13 Thread Salvatore Mesoraca
Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code.

[PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-13 Thread Salvatore Mesoraca
Avoid 3 VLAs[1] by using real constant expressions instead of variables. The compiler should be able to optimize the original code and avoid using any actual VLAs. Anyway this change is useful because it will avoid a false positives with -Wvla, it might also help the compiler generating better code

[PATCH] ftrace: drop a VLA in module_exists()

2018-03-13 Thread Salvatore Mesoraca
Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code.

[PATCH] net: dsa: drop some VLAs in switch.c

2018-03-13 Thread Salvatore Mesoraca
dsa_switch's num_ports is currently fixed to DSA_MAX_PORTS. So we avoid 2 VLAs[1] by using DSA_MAX_PORTS instead of ds->num_ports. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Salvatore Mesoraca --- net/dsa/switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] Btrfs: drop a VLA in btrfs_check_super_csum()

2018-03-13 Thread Salvatore Mesoraca
Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code.

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
> > > > We must remove cond_resched() because we can't sleep anymore. They were > > added to fight NMI timeouts, so I will replace them with > > touch_nmi_watchdog() in a follow-up fix. > > This makes no sense. Any code section where we can add cond_resched() > was never subject to NMI timeouts

Re: [PATCH AUTOSEL for 4.14 065/110] led: core: Fix brightness setting when setting delay_off=0

2018-03-13 Thread Jacek Anaszewski
On 03/13/2018 02:27 PM, Pavel Machek wrote: > Hi! > At least 7b6af2c531 ("leds: core: Fix regression caused by commit 2b83ff96f51d") is missing, causing visible regressions (LEDs not working at all) on some OpenWrt devices. This was fixed in 4.4.121 by reverting the offending c

Re: linux-next: build failure after merge of the akpm-current tree

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 20:51:19 +1100 Stephen Rothwell wrote: > Hi Andrew, > > After merging the akpm-current tree, today's linux-next build (lots of > configuations) failed like this: > > (from the i386 defconfig build) > > In file included from include/linux/memcontrol.h:29:0, >

Re: [2/3] mwifiex: support sysfs initiated device coredump

2018-03-13 Thread Arend van Spriel
On 3/13/2018 2:10 PM, Kalle Valo wrote: Arend van Spriel writes: On 3/12/2018 10:41 AM, Kalle Valo wrote: Arend Van Spriel wrote: Since commit 3c47d19ff4dc ("drivers: base: add coredump driver ops") it is possible to initiate a device coredump from user-space. This patch adds support for i

Re: OK to merge via powerpc? (was Re: [PATCH 05/14] mm: make memblock_alloc_base_nid non-static)

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 23:06:35 +1100 Michael Ellerman wrote: > Anyone object to us merging the following patch via the powerpc tree? > > Full series is here if anyone's interested: > http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=28377&state=* > Yup, please go ahead. I assume t

[PATCH] refcount: trim headers

2018-03-13 Thread Alexey Dobriyan
kernel.h is not needed, but compiler.h is. mutex.h is not needed only a forward declaration. spinlock.h is not needed, spinlock_types.h is enough. Signed-off-by: Alexey Dobriyan --- include/linux/refcount.h |7 --- lib/refcount.c |2 ++ 2 files changed, 6 insertions(+),

[PATCH] x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist

2018-03-13 Thread Alexander Sergeyev
In accordance with Intel's microcode revision guidance from March 6 MCU rev 0xc2 is cleared on both Skylake H/S and Skylake Xeon E3 processors that share CPUID 506E3. Signed-off-by: Alexander Sergeyev --- arch/x86/kernel/cpu/intel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

2018-03-13 Thread Stephen Hemminger
On Tue, 13 Mar 2018 20:06:50 +0100 Mohammed Gamal wrote: > Dring high network traffic changes to network interface parameters > such as number of channels or MTU can cause a kernel panic with a NULL > pointer dereference. This is due to netvsc_device_remove() being > called and deallocating the c

Re: [PATCH 4.15 049/146] mm/page_alloc: fix memmap_init_zone pageblock alignment

2018-03-13 Thread Dan Rue
On Tue, Mar 13, 2018 at 04:23:36PM +0100, Greg Kroah-Hartman wrote: > 4.15-stable review patch. If anyone has any objections, please let me know. On 4.14 and 4.15, this patch breaks booting on dragonboard 410c and hikey 620 (both arm64). The fix has been proposed and tested but is not yet in main

[PATCH v2] staging: bcm2835-audio: Release resources on module_exit()

2018-03-13 Thread Kirill Marinushkin
In the current implementation, `rmmod snd_bcm2835` does not release resources properly. It causes an oops when trying to list sound devices. This commit fixes it. The details WRT allocation / free are described below. Device structure WRT allocation: pdev \childdev[] \card \chip

Re: [PATCH] KVM: arm/arm64: replacing per-VM's per-CPU variable

2018-03-13 Thread Robin Murphy
On 13/03/18 13:01, Marc Zyngier wrote: [You're repeatedly posting to the kvmarm mailing list without being subscribed to it. I've flushed the queue now, but please consider subscribing to the list, it will help everyone] On 13/03/18 21:03, Peng Hao wrote: Using a global per-CPU variable instead

Re: perf-core build fails on powerpc

2018-03-13 Thread John Garry
On 13/03/2018 19:17, Sukadev Bhattiprolu wrote: Building perf on Powerpc seems broken when using Arnaldo's perf/core branch with HEAD as: 1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh") It maybe related to this commit: commit d596299 Author: John G

Re: [PATCH 2/2] hwmon: (ucd9000) Add debugfs attributes to provide mfr_status

2018-03-13 Thread Guenter Roeck
On Tue, Mar 13, 2018 at 02:01:51PM -0500, Eddie James wrote: > > > On 03/10/2018 10:50 AM, Guenter Roeck wrote: > >On 03/09/2018 11:19 AM, Eddie James wrote: > >>From: Christopher Bostic > >> > >>Expose the gpiN_fault fields of mfr_status as individual debugfs > >>attributes. This provides a way

Re: [PATCH V1] Input: pm8941-pwrkey: add resin key capabilities

2018-03-13 Thread Trilok Soni
Tirupathi, On 3/13/2018 1:25 AM, Tirupathi Reddy T wrote: Hi Dmitry, On 3/10/2018 11:57 PM, Dmitry Torokhov wrote: On Wed, Mar 07, 2018 at 12:21:47PM -0800, Dmitry Torokhov wrote: Hi Tirupathi, On Wed, Mar 07, 2018 at 01:39:33PM +0530, Tirupathi Reddy wrote: Add resin key support to handle

Re: [PATCH V2] Input: pm8941-pwrkey: add resin key capabilities

2018-03-13 Thread Trilok Soni
Hi Tirupathi, On 3/13/2018 1:35 AM, Tirupathi Reddy wrote: Add resin key support to handle different types of key events defined in different platforms. Describe "resin"  in the commit text? or just call it same as power key or different purpose? +static irqreturn_t pm8941_resinkey_irq(i

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-13 Thread Logan Gunthorpe
On 13/03/18 01:10 PM, Sinan Kaya wrote: > I was thinking of this for the pci_p2pdma_add_client() case for the > parent pointer. > > +struct pci_p2pdma_client { > + struct list_head list; > + struct pci_dev *client; > + struct pci_dev *provider; > +}; Yeah, that structure only exists

perf-core build fails on powerpc

2018-03-13 Thread Sukadev Bhattiprolu
Building perf on Powerpc seems broken when using Arnaldo's perf/core branch with HEAD as: 1b442ed ("perf test: Fix exit code for record+probe_libc_inet_pton.sh") It maybe related to this commit: commit d596299 Author: John Garry Date: Thu Mar 8 18:58:29 2018 +080

[PATCH] iio/adc/ad7291: Improve unlocking of a mutex in ad7291_read_raw()

2018-03-13 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 13 Mar 2018 20:08:40 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only once in this function implementation. * Replace three calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by:

Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2018-03-13 Thread Daniel Lezcano
On 26/02/2018 05:30, Viresh Kumar wrote: [ ... ] + /* + * The last CPU waking up is in charge of setting the + * timer. If the CPU is hotplugged, the timer will + * move to another CPU (which may not belong to the + * same

<    1   2   3   4   5   6   7   8   9   10   >