Re: [PATCH 4.19] Revert "initramfs: free initrd memory if opening /initrd.image fails"

2019-08-06 Thread Sasha Levin
On Tue, Aug 06, 2019 at 10:59:40AM -0700, Stephen Boyd wrote: This reverts commit 25511676362d8f7d4b8805730a3d29484ceab1ec in the 4.19 stable trees. From what I can tell this commit doesn't do anything to improve the situation, mostly just reordering code to call free_initrd() from one place inst

Re: [PATCH] s390/pci: PCI_IOV_RESOURCES loop refactoring in zpci_map_resources

2019-08-06 Thread Bjorn Helgaas
Thanks for the patch! Sebastian may have silently fixed this, but for future reference, $ git log --oneline arch/s390/pci/pci.c c7ff0e918a7c s390/pci: deal with devices that have no support for MIO instructions dcd33b23c9f3 s390/pci: fix assignment of bus resources 56271303808f s390/pci:

Re: [PATCH v2] net/mlx5e: Use refcount_t for refcount

2019-08-06 Thread David Miller
From: Saeed Mahameed Date: Tue, 6 Aug 2019 20:42:56 + > On Sat, 2019-08-03 at 00:48 +0800, Chuhong Yuan wrote: >> refcount_t is better for reference counters since its >> implementation can prevent overflows. >> So convert atomic_t ref counters to refcount_t. >> >> Signed-off-by: Chuhong Yua

Re: [PATCH] i2c-axxia: support slave mode

2019-08-06 Thread Wolfram Sang
Hi Krzysztof, > This device contains both master and slave controllers which can be > enabled simultaneously. Both controllers share the same SDA/SCL lines > and interrupt source but has separate control and status registers. > Controllers also works in loopback mode - slave device can communicate

Re: [PATCH] asm-generic: fix variable 'p4d' set but not used

2019-08-06 Thread Andrew Morton
On Tue, 6 Aug 2019 11:39:04 -0300 Jason Gunthorpe wrote: > On Fri, Aug 02, 2019 at 03:41:22PM -0400, Qian Cai wrote: > > GCC throws a warning on an arm64 system since the commit 9849a5697d3d > > ("arch, mm: convert all architectures to use 5level-fixup.h"), > > > > mm/kasan/init.c: In function '

Re: [PATCH][net-next][V2] net/mlx5: remove self-assignment on esw->dev

2019-08-06 Thread Saeed Mahameed
On Fri, 2019-08-02 at 16:13 +0100, Colin King wrote: > From: Colin Ian King > > There is a self assignment of esw->dev to itself, clean this up by > removing it. Also make dev a const pointer. > > Addresses-Coverity: ("Self assignment") > Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support

Re: [PATCH v4 1/2] khugepaged: enable collapse pmd for pte-mapped THP

2019-08-06 Thread Song Liu
> On Aug 6, 2019, at 3:02 AM, Oleg Nesterov wrote: > > On 08/02, Song Liu wrote: >> >> +void collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr) >> +{ >> +unsigned long haddr = addr & HPAGE_PMD_MASK; >> +struct vm_area_struct *vma = find_vma(mm, haddr); >> +pmd_t *pm

Re: [PATCH v4 1/2] mm/memory-failure.c clean up around tk pre-allocation

2019-08-06 Thread Dan Williams
Hi Jane, looks good. Checkpatch prompts me to point out a couple more fixups: This patch is titled: "mm/memory-failure.c clean up..." ...to match the second patch it should be: "mm/memory-failure: clean up..." On Tue, Aug 6, 2019 at 10:26 AM Jane Chu wrote: > > add_to_kill() expects t

[PATCH net-next v4 1/2] net: phy: modify assignment to OR for dev_flags in phy_attach_direct

2019-08-06 Thread Tao Ren
Modify the assignment to OR when dealing with phydev->dev_flags in phy_attach_direct function, and this is to make sure dev_flags set in driver's probe callback won't be lost. Suggested-by: Andrew Lunn CC: Heiner Kallweit CC: Vladimir Oltean Signed-off-by: Tao Ren --- Changes: - nothing is

Re: [PATCH v4 2/2] mm/memory-failure: Poison read receives SIGKILL instead of SIGBUS if mmaped more than once

2019-08-06 Thread Dan Williams
On Tue, Aug 6, 2019 at 10:28 AM Jane Chu wrote: > > Mmap /dev/dax more than once, then read the poison location using address > from one of the mappings. The other mappings due to not having the page > mapped in will cause SIGKILLs delivered to the process. SIGKILL succeeds > over SIGBUS, so user

Re: [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct

2019-08-06 Thread Andrew Lunn
On Mon, Aug 05, 2019 at 11:55:51AM -0700, Tao Ren wrote: > Modify the assignment to OR when dealing with phydev->dev_flags in > phy_attach_direct function, and this is to make sure dev_flags set in > driver's probe callback won't be lost. > > Suggested-by: Andrew Lunn > CC: Heiner Kallweit > CC:

[PATCH V3] fork: Improve error message for corrupted page tables

2019-08-06 Thread Sai Praneeth Prakhya
When a user process exits, the kernel cleans up the mm_struct of the user process and during cleanup, check_mm() checks the page tables of the user process for corruption (E.g: unexpected page flags set/cleared). For corrupted page tables, the error message printed by check_mm() isn't very clear as

[PATCH net-next v4 2/2] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-06 Thread Tao Ren
The BCM54616S PHY cannot work properly in RGMII->1000Base-KX mode (for example, on Facebook CMM BMC platform), mainly because genphy functions are designed for copper links, and 1000Base-X (clause 37) auto negotiation needs to be handled differently. This patch enables 1000Base-X support for BCM54

[RFC PATCH 1/2] Add clang-tidy and static analyzer support to makefile

2019-08-06 Thread Nathan Huckleberry
Signed-off-by: Nathan Huckleberry --- These patches add clang-tidy and the clang static-analyzer as make targets. The goal of these patches is to make static analysis tools usable and extendable by any developer or researcher who is familiar with basic c++. The current static analysis tools requi

[RFC PATCH 2/2] Add clang-tidy irq-balancing annotations for arm64

2019-08-06 Thread Nathan Huckleberry
This patch is not intended to be merged. It simply shows the scale of the effort involved in applying annotations in the case of intentionally unbalanced calls to local_irq_disable. Signed-off-by: Nathan Huckleberry --- arch/arm64/kernel/debug-monitors.c | 1 + arch/arm64/kernel/machine_kexec.

Re: [GIT PULL] MIPS fixes

2019-08-06 Thread pr-tracker-bot
The pull request you sent on Tue, 6 Aug 2019 19:23:16 +: > git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git > tags/mips_fixes_5.3_1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/76d7961ff4ee02cc70365600a52fb59ca544dc7c Thank you! -- Deet-doot-dot,

Re: [PATCH v1 0/3] net: hisilicon: Fix a few problems with hip04_eth

2019-08-06 Thread David Miller
From: Jiangfeng Xiao Date: Sat, 3 Aug 2019 20:31:38 +0800 > During the use of the hip04_eth driver, > several problems were found, > which solved the hip04_tx_reclaim reentry problem, > fixed the problem that hip04_mac_start_xmit never > returns NETDEV_TX_BUSY > and the dma_map_single failed on t

Re: [PATCH] linux/bits.h: Add compile time sanity check of GENMASK inputs

2019-08-06 Thread Joe Perches
On Tue, 2019-08-06 at 21:27 +0200, Rikard Falkeborn wrote: > On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote: > > How about this? > > #define GENMASK_INPUT_CHECK(high, low) \ > >BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ > > __builtin_constant_p((low) > (high))

Re: [PATCH V2 01/10] x86/CPU: Expose if cache is inclusive of lower level caches

2019-08-06 Thread Reinette Chatre
Hi Borislav, On 8/6/2019 1:40 PM, Borislav Petkov wrote: > On Tue, Aug 06, 2019 at 01:22:22PM -0700, Reinette Chatre wrote: >> ... because some platforms differ in which SKUs support cache >> pseudo-locking. On these platforms only the SKUs with inclusive cache >> support cache pseudo-locking, thu

Re: [RFC PATCH v3 00/16] Core scheduling v3

2019-08-06 Thread Tim Chen
On 8/6/19 10:12 AM, Peter Zijlstra wrote: >> I'm wondering if something simpler will work. It is easier to maintain >> fairness >> between the CPU threads. A simple scheme may be if the force idle deficit >> on a CPU thread exceeds a threshold compared to its sibling, we will >> bias in choosin

Re: [PATCH 1/2] of/platform: Fix fn definitons for of_link_is_valid() and of_link_property()

2019-08-06 Thread Rob Herring
On Tue, Aug 6, 2019 at 1:27 PM Saravana Kannan wrote: > > of_link_is_valid() can be static since it's not used anywhere else. > > of_link_property() return type should have been int instead of bool. > > Reported-by: Stephen Rothwell > Signed-off-by: Saravana Kannan > --- > drivers/of/platform.c

[PATCH RFC v1 1/2] rcu/tree: Add basic support for kfree_rcu batching

2019-08-06 Thread Joel Fernandes (Google)
Recently a discussion about performance of system involving a high rate of kfree_rcu() calls surfaced on the list [1] which led to another discussion how to prepare for this situation. This patch adds basic batching support for kfree_rcu. It is "basic" because we do none of the slab management, dy

[PATCH RFC v1 2/2] rcuperf: Add kfree_rcu performance Tests

2019-08-06 Thread Joel Fernandes (Google)
This test runs kfree_rcu in a loop to measure performance of the new kfree_rcu, with and without patch. To see improvement, run with boot parameters: rcuperf.kfree_loops=2000 rcuperf.kfree_alloc_num=100 rcuperf.perf_type=kfree Without patch, test runs in 6.9 seconds. With patch, test runs in 6.1

linux-next: Fixes tag needs some work in the net tree

2019-08-06 Thread Stephen Rothwell
Hi all, In commit b35475c5491a ("net sched: update vlan action for batched events operations") Fixes tag Fixes: c7e2b9689 ("sched: introduce vlan action") has these problem(s): - SHA1 should be at least 12 digits long Can be fixed by setting core.abbrev to 12 (or more) or (for git v

Re: [PATCH V2] fork: Improve error message for corrupted page tables

2019-08-06 Thread Sai Praneeth Prakhya
On Tue, 2019-08-06 at 10:36 +0200, Michal Hocko wrote: > On Mon 05-08-19 20:05:27, Sai Praneeth Prakhya wrote: > > When a user process exits, the kernel cleans up the mm_struct of the user > > process and during cleanup, check_mm() checks the page tables of the user > > process for corruption (E.g:

Re: [PATCH v2] net/mlx5e: Use refcount_t for refcount

2019-08-06 Thread Saeed Mahameed
On Tue, 2019-08-06 at 13:48 -0700, David Miller wrote: > From: Saeed Mahameed > Date: Tue, 6 Aug 2019 20:42:56 + > > > On Sat, 2019-08-03 at 00:48 +0800, Chuhong Yuan wrote: > > > refcount_t is better for reference counters since its > > > implementation can prevent overflows. > > > So conver

Re: [PATCH 2/2] of/platform: Disable generic device linking code for PowerPC

2019-08-06 Thread Rob Herring
On Tue, Aug 6, 2019 at 1:27 PM Saravana Kannan wrote: > > PowerPC platforms don't use the generic of/platform code to populate the > devices from DT. Yes, they do. > Therefore the generic device linking code is never used > in PowerPC. Compile it out to avoid warning about unused functions. I'

Re: [RFC PATCH] ARM: UNWINDER_FRAME_POINTER implementation for Clang

2019-08-06 Thread Nathan Huckleberry
I'm not sure that we should disable a broken feature instead of attempting a fix. CONFIG_FUNCTION_GRAPH_TRACER is dependent on CONFIG_FRAME_POINTER and there have been reports by MediaTek that the frame pointer unwinder is faster in some cases. On Mon, Aug 5, 2019 at 6:39 AM Dave Martin wrote: >

Re: [PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs

2019-08-06 Thread Rafael J. Wysocki
On Tue, Aug 6, 2019 at 8:51 PM Tri Vo wrote: > > On Mon, Aug 5, 2019 at 4:29 PM Stephen Boyd wrote: > > > > Quoting Tri Vo (2019-08-05 10:58:48) > > > diff --git a/drivers/base/power/wakeup_stats.c > > > b/drivers/base/power/wakeup_stats.c > > > new file mode 100644 > > > index ..3a4

[PATCH AUTOSEL 5.2 02/59] IB/mlx5: Replace kfree with kvfree

2019-08-06 Thread Sasha Levin
From: Chuhong Yuan [ Upstream commit b7f406bb883ba7ac398f6b44cebc4cfe2dde ] Memory allocated by kvzalloc should not be freed by kfree(), use kvfree() instead. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Link: https://lore.kernel.org/r/20190717082101.14196-1-hsleste...@gmail.com

[PATCH AUTOSEL 5.2 05/59] clk: renesas: cpg-mssr: Fix reset control race condition

2019-08-06 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit e1f1ae8002e4b06addc52443fcd975bbf554ae92 ] The module reset code in the Renesas CPG/MSSR driver uses read-modify-write (RMW) operations to write to a Software Reset Register (SRCRn), and simple writes to write to a Software Reset Clearing Register (SRST

[PATCH AUTOSEL 5.2 04/59] clk: sprd: Select REGMAP_MMIO to avoid compile errors

2019-08-06 Thread Sasha Levin
From: Chunyan Zhang [ Upstream commit c9a67cbb5189e966c70451562b2ca4c3876ab546 ] Make REGMAP_MMIO selected to avoid undefined reference to regmap symbols. Fixes: d41f59fd92f2 ("clk: sprd: Add common infrastructure") Signed-off-by: Chunyan Zhang Signed-off-by: Stephen Boyd Signed-off-by: Sasha

[PATCH AUTOSEL 5.2 09/59] platform/x86: intel_pmc_core: Add ICL-NNPI support to PMC Core

2019-08-06 Thread Sasha Levin
From: Rajneesh Bhardwaj [ Upstream commit 66013e8ec6850f9c62df6aea555fe7668e84dc3c ] Ice Lake Neural Network Processor for deep learning inference a.k.a. ICL-NNPI can re-use Ice Lake Mobile regmap to enable Intel PMC Core driver on it. Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-.

[PATCH AUTOSEL 5.2 13/59] irqchip/irq-imx-gpcv2: Forward irq type to parent

2019-08-06 Thread Sasha Levin
From: Lucas Stach [ Upstream commit 9a446ef08f3bfc0c3deb9c6be840af2528ef8cf8 ] The GPCv2 is a stacked IRQ controller below the ARM GIC. It doesn't care about the IRQ type itself, but needs to forward the type to the parent IRQ controller, so this one can be configured correctly. Signed-off-by:

[PATCH AUTOSEL 5.2 16/59] perf header: Fix divide by zero error if f_header.attr_size==0

2019-08-06 Thread Sasha Levin
From: Vince Weaver [ Upstream commit 7622236ceb167aa3857395f9bdaf871442aa467e ] So I have been having lots of trouble with hand-crafted perf.data files causing segfaults and the like, so I have started fuzzing the perf tool. First issue found: If f_header.attr_size is 0 in the perf.data file,

[PATCH AUTOSEL 5.2 10/59] mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot}

2019-08-06 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit 2bcbeaefde2f0384d6ad351c151b1a9fe7791a0a ] We should not have two different error codes for the same condition. EAGAIN must be reserved for the FAULT_FLAG_ALLOW_RETRY retry case and signals to the caller that the mmap_sem has been unlocked. Use EBUSY fo

[PATCH AUTOSEL 5.2 17/59] perf header: Fix use of unitialized value warning

2019-08-06 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ Upstream commit 20f9781f491360e7459c589705a2e4b1f136bee9 ] When building our local version of perf with MSAN (Memory Sanitizer) and running the perf record command, MSAN throws a use of uninitialized value warning in "tools/perf/util/util.c:333:6". This warning stem

[PATCH AUTOSEL 5.2 15/59] tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC()

2019-08-06 Thread Sasha Levin
From: Arnaldo Carvalho de Melo [ Upstream commit 7ee526152db7a75d7b8713346dac76ffc3662b29 ] In addition to _IOW() and _IOR(), to handle this case: #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) That will happen in the next sync of this header file. Cc: Adrian Hunter Cc: J

[PATCH AUTOSEL 5.2 27/59] exit: make setting exit_state consistent

2019-08-06 Thread Sasha Levin
From: Christian Brauner [ Upstream commit 30b692d3b390c6fe78a5064be0c4bbd44a41be59 ] Since commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state") we unconditionally set exit_state to EXIT_ZOMBIE before calling into do_notify_parent(). This was done to eliminate a race when queryi

[PATCH AUTOSEL 5.2 31/59] drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep

2019-08-06 Thread Sasha Levin
From: Christian König [ Upstream commit 67d0859e2758ef992fd32499747ce4b1038a63c0 ] We always need to drop the ctx reference and should check for errors first and then dereference the fence pointer. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher Signed-o

[PATCH AUTOSEL 5.2 30/59] drm/amd/powerplay: fix null pointer dereference around dpm state relates

2019-08-06 Thread Sasha Levin
From: Evan Quan [ Upstream commit 479156f2e5540077377a823eaf5a4263bd329063 ] DPM state relates are not supported on the new SW SMU ASICs. But still it's not OK to trigger null pointer dereference on accessing them. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher

[PATCH AUTOSEL 5.2 25/59] scsi: hpsa: correct scsi command status issue after reset

2019-08-06 Thread Sasha Levin
From: Don Brace [ Upstream commit eeebce1862970653cdf5c01e98bc669edd8f529a ] Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/

[PATCH AUTOSEL 5.2 19/59] ALSA: pcm: fix lost wakeup event scenarios in snd_pcm_drain

2019-08-06 Thread Sasha Levin
From: Yuki Tsunashima [ Upstream commit 37151a41df800493cfcbbef4f7208ffe04feb959 ] lost wakeup can occur after enabling irq, therefore put task into interruptible before enabling interrupts, without this change, task can be put to sleep and snd_pcm_drain will delay Fixes: f2b3614cefb6 ("ALSA:

[PATCH AUTOSEL 5.2 23/59] drm/bridge: tc358764: Fix build error

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit e1ae72a21e5f0d1846e26e3f5963930664702071 ] If CONFIG_DRM_TOSHIBA_TC358764=y but CONFIG_DRM_KMS_HELPER=m, building fails: drivers/gpu/drm/bridge/tc358764.o:(.rodata+0x228): undefined reference to `drm_atomic_helper_connector_reset' drivers/gpu/drm/bridge/tc358

[PATCH AUTOSEL 5.2 28/59] tracing: Fix header include guards in trace event headers

2019-08-06 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit b1d45c23284e55a379f85554a27a548b7988d47a ] These include guards are broken. Match the #if !define() and #define lines so that they work correctly. Link: http://lkml.kernel.org/r/20190720103943.16982-1-yamada.masah...@socionext.com Fixes: f54d1867005c3

[PATCH AUTOSEL 5.2 21/59] powerpc/nvdimm: Pick nearby online node if the device node is not online

2019-08-06 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit da1115fdbd6e86c62185cdd2b4bf7add39f2f82b ] Currently, nvdimm subsystem expects the device numa node for SCM device to be an online node. It also doesn't try to bring the device numa node online. Hence if we use a non-online numa node as device node we h

[PATCH AUTOSEL 5.2 18/59] RDMA/qedr: Fix the hca_type and hca_rev returned in device attributes

2019-08-06 Thread Sasha Levin
From: Michal Kalderon [ Upstream commit 15fe6a8dcc3b48358c28e17b485fc837f9605ec4 ] There was a place holder for hca_type and vendor was returned in hca_rev. Fix the hca_rev to return the hw revision and fix the hca_type to return an informative string representing the hca. Signed-off-by: Michal

[PATCH AUTOSEL 5.2 33/59] ata: libahci: do not complain in case of deferred probe

2019-08-06 Thread Sasha Levin
From: Miquel Raynal [ Upstream commit 090bb803708198e5ab6b0046398c7ed9f4d12d6b ] Retrieving PHYs can defer the probe, do not spawn an error when -EPROBE_DEFER is returned, it is normal behavior. Fixes: b1a9edbda040 ("ata: libahci: allow to use multiple PHYs") Reviewed-by: Hans de Goede Signed-

[PATCH AUTOSEL 5.2 35/59] kbuild: Check for unknown options with cc-option usage in Kconfig and clang

2019-08-06 Thread Sasha Levin
From: Stephen Boyd [ Upstream commit e8de12fb7cde2c85bc31097cd098da79a4818305 ] If the particular version of clang a user has doesn't enable -Werror=unknown-warning-option by default, even though it is the default[1], then make sure to pass the option to the Kconfig cc-option command so that tes

[PATCH AUTOSEL 5.2 41/59] arm64: unwind: Prohibit probing on return_address()

2019-08-06 Thread Sasha Levin
From: Masami Hiramatsu [ Upstream commit ee07b93e7721ccd5d5b9fa6f0c10cb3fe2f1f4f9 ] Prohibit probing on return_address() and subroutines which is called from return_address(), since the it is invoked from trace_hardirqs_off() which is also kprobe blacklisted. Reported-by: Naresh Kamboju Signed

[PATCH AUTOSEL 5.2 38/59] riscv: Fix perf record without libelf support

2019-08-06 Thread Sasha Levin
From: Mao Han [ Upstream commit b399abe7c21e248dc6224cadc9a378a2beb10cfd ] This patch fix following perf record error by linking vdso.so with build id. perf.data perf.data.old [ perf record: Woken up 1 times to write data ] free(): double free detected in tcache 2 Aborted perf record use

[PATCH AUTOSEL 5.2 40/59] arm64: Lower priority mask for GIC_PRIO_IRQON

2019-08-06 Thread Sasha Levin
From: Julien Thierry [ Upstream commit 677379bc9139ac24b310a281fcb21a2f04288353 ] On a system with two security states, if SCR_EL3.FIQ is cleared, non-secure IRQ priorities get shifted to fit the secure view but priority masks aren't. On such system, it turns out that GIC_PRIO_IRQON masks the p

[PATCH AUTOSEL 5.2 45/59] IB/mlx5: Fix MR registration flow to use UMR properly

2019-08-06 Thread Sasha Levin
From: Guy Levi [ Upstream commit e5366d309a772fef264ec85e858f9ea46f939848 ] Driver shouldn't allow to use UMR to register a MR when umr_modify_atomic_disabled is set. Otherwise it will always end up with a failure in the post send flow which sets the UMR WQE to modify atomic access right. Fixes

[PATCH AUTOSEL 5.2 44/59] IB/core: Add mitigation for Spectre V1

2019-08-06 Thread Sasha Levin
From: "Luck, Tony" [ Upstream commit 61f259821dd3306e49b7d42a3f90fb5a4ff3351b ] Some processors may mispredict an array bounds check and speculatively access memory that they should not. With a user supplied array index we like to play things safe by masking the value with the array size before

[PATCH AUTOSEL 5.2 48/59] RDMA/mlx5: Release locks during notifier unregister

2019-08-06 Thread Sasha Levin
From: Leon Romanovsky [ Upstream commit 23eaf3b5c1a755e3193480c76fb29414be648688 ] The below kernel panic was observed when created bond mode LACP with GRE tunnel on top. The reason to it was not released spinlock during mlx5 notify unregsiter sequence. [ 234.562007] BUG: scheduling while atom

[PATCH AUTOSEL 5.2 42/59] arm64/mm: fix variable 'pud' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc ] GCC throws a warning, arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page': arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable] pud_t pud; ^~~ because pud_table()

[PATCH AUTOSEL 5.2 46/59] RDMA/restrack: Track driver QP types in resource tracker

2019-08-06 Thread Sasha Levin
From: Gal Pressman [ Upstream commit 52e0a118a20308dd6aa531e20a5ab5907d2264c8 ] The check for QP type different than XRC has excluded driver QP types from the resource tracker. As a result, "rdma resource show" user command would not show opened driver QPs which does not reflect the real state o

[PATCH AUTOSEL 5.2 52/59] arm64: kprobes: Recover pstate.D in single-step exception handler

2019-08-06 Thread Sasha Levin
From: Masami Hiramatsu [ Upstream commit b3980e48528c4d2a9e70b145a5bba328b73a0f93 ] kprobes manipulates the interrupted PSTATE for single step, and doesn't restore it. Thus, if we put a kprobe where the pstate.D (debug) masked, the mask will be cleared after the kprobe hits. Moreover, in the mo

[PATCH AUTOSEL 5.2 56/59] page flags: prioritize kasan bits over last-cpuid

2019-08-06 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit ee38d94a0ad89890b770f6c876263cf9fcbfde84 ] ARM64 randdconfig builds regularly run into a build error, especially when NUMA_BALANCING and SPARSEMEM are enabled but not SPARSEMEM_VMEMMAP: #error "KASAN: not enough bits in page flags for tag" The last-cpuid

[PATCH AUTOSEL 5.2 54/59] Revert "kmemleak: allow to coexist with fault injection"

2019-08-06 Thread Sasha Levin
From: Yang Shi [ Upstream commit df9576def004d2cd5beedc00cb6e8901427634b9 ] When running ltp's oom test with kmemleak enabled, the below warning was triggerred since kernel detects __GFP_NOFAIL & ~__GFP_DIRECT_RECLAIM is passed in: WARNING: CPU: 105 PID: 2138 at mm/page_alloc.c:4608 __alloc_

[PATCH AUTOSEL 5.2 59/59] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-08-06 Thread Sasha Levin
From: Nayna Jain [ Upstream commit fa4f99c05320eb28bf6ba52a9adf64d888da1f9e ] The nr_allocated_banks and allocated banks are initialized as part of tpm_chip_register. Currently, this is done as part of auto startup function. However, some drivers, like the ibm vtpm driver, do not run auto startu

[PATCH AUTOSEL 5.2 57/59] coredump: split pipe command whitespace before expanding template

2019-08-06 Thread Sasha Levin
From: Paul Wise [ Upstream commit 315c69261dd3fa12dbc830d4fa00d1fad98d3b03 ] Save the offsets of the start of each argument to avoid having to update pointers to each argument after every corename krealloc and to avoid having to duplicate the memory for the dump command. Executable names contai

[PATCH AUTOSEL 4.19 13/32] scsi: hpsa: correct scsi command status issue after reset

2019-08-06 Thread Sasha Levin
From: Don Brace [ Upstream commit eeebce1862970653cdf5c01e98bc669edd8f529a ] Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/

[PATCH AUTOSEL 5.2 53/59] arm64: Make debug exception handlers visible from RCU

2019-08-06 Thread Sasha Levin
From: Masami Hiramatsu [ Upstream commit d8bb6718c4db9bcd075dde7ff55d46091ccfae15 ] Make debug exceptions visible from RCU so that synchronize_rcu() correctly track the debug exception handler. This also introduces sanity checks for user-mode exceptions as same as x86's ist_enter()/ist_exit().

[PATCH AUTOSEL 4.19 04/32] xtensa: fix build for cores with coprocessors

2019-08-06 Thread Sasha Levin
From: Max Filippov [ Upstream commit e3cacb73e626d885b8cf24103fed0ae26518e3c4 ] Assembly entry/return abstraction change didn't add asmmacro.h include statement to coprocessor.S, resulting in references to undefined macros abi_entry and abi_ret on cores that define XTENSA_HAVE_COPROCESSORS. Fix

[PATCH AUTOSEL 4.19 05/32] xen/pciback: remove set but not used variable 'old_state'

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit 09e088a4903bd0dd911b4f1732b250130cdaffed ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/xen-pciback/conf_space_capability.c: In function pm_ctrl_write: drivers/xen/xen-pciback/conf_space_capability.c:119:25: warning: variable old_state set but n

[PATCH AUTOSEL 5.2 55/59] ocfs2: remove set but not used variable 'last_hash'

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit 7bc36e3ce91471b6377c8eadc0a2f220a2280083 ] Fixes gcc '-Wunused-but-set-variable' warning: fs/ocfs2/xattr.c: In function ocfs2_xattr_bucket_find: fs/ocfs2/xattr.c:3828:6: warning: variable last_hash set but not used [-Wunused-but-set-variable] It's never

[PATCH AUTOSEL 4.19 09/32] perf header: Fix use of unitialized value warning

2019-08-06 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ Upstream commit 20f9781f491360e7459c589705a2e4b1f136bee9 ] When building our local version of perf with MSAN (Memory Sanitizer) and running the perf record command, MSAN throws a use of uninitialized value warning in "tools/perf/util/util.c:333:6". This warning stem

[PATCH AUTOSEL 4.19 14/32] scsi: qla2xxx: Fix possible fcport null-pointer dereferences

2019-08-06 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit e82f04ec6ba91065fd33a6201ffd7cab840e1475 ] In qla2x00_alloc_fcport(), fcport is assigned to NULL in the error handling code on line 4880: fcport = NULL; Then fcport is used on lines 4883-4886: INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);

[PATCH AUTOSEL 4.19 23/32] arm64/mm: fix variable 'pud' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc ] GCC throws a warning, arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page': arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable] pud_t pud; ^~~ because pud_table()

[PATCH AUTOSEL 4.19 17/32] ata: libahci: do not complain in case of deferred probe

2019-08-06 Thread Sasha Levin
From: Miquel Raynal [ Upstream commit 090bb803708198e5ab6b0046398c7ed9f4d12d6b ] Retrieving PHYs can defer the probe, do not spawn an error when -EPROBE_DEFER is returned, it is normal behavior. Fixes: b1a9edbda040 ("ata: libahci: allow to use multiple PHYs") Reviewed-by: Hans de Goede Signed-

[PATCH AUTOSEL 4.19 21/32] drm/vgem: fix cache synchronization on arm/arm64

2019-08-06 Thread Sasha Levin
From: Rob Clark [ Upstream commit 7e9e5ead55beacc6b3fb90b0de6e7cf55a69 ] drm_cflush_pages() is no-op on arm/arm64. But instead we can use dma_sync API. Fixes failures w/ vgem_test. Acked-by: Daniel Vetter Signed-off-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freede

[PATCH AUTOSEL 4.19 22/32] arm64: unwind: Prohibit probing on return_address()

2019-08-06 Thread Sasha Levin
From: Masami Hiramatsu [ Upstream commit ee07b93e7721ccd5d5b9fa6f0c10cb3fe2f1f4f9 ] Prohibit probing on return_address() and subroutines which is called from return_address(), since the it is invoked from trace_hardirqs_off() which is also kprobe blacklisted. Reported-by: Naresh Kamboju Signed

[PATCH AUTOSEL 4.19 25/32] IB/mlx5: Fix MR registration flow to use UMR properly

2019-08-06 Thread Sasha Levin
From: Guy Levi [ Upstream commit e5366d309a772fef264ec85e858f9ea46f939848 ] Driver shouldn't allow to use UMR to register a MR when umr_modify_atomic_disabled is set. Otherwise it will always end up with a failure in the post send flow which sets the UMR WQE to modify atomic access right. Fixes

[PATCH AUTOSEL 4.19 30/32] ocfs2: remove set but not used variable 'last_hash'

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit 7bc36e3ce91471b6377c8eadc0a2f220a2280083 ] Fixes gcc '-Wunused-but-set-variable' warning: fs/ocfs2/xattr.c: In function ocfs2_xattr_bucket_find: fs/ocfs2/xattr.c:3828:6: warning: variable last_hash set but not used [-Wunused-but-set-variable] It's never

[PATCH AUTOSEL 4.14 01/25] clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1

2019-08-06 Thread Sasha Levin
From: Codrin Ciubotariu [ Upstream commit 1573eebeaa8055777eb753f9b4d1cbe653380c38 ] In clk_generated_determine_rate(), if the divisor is greater than GENERATED_MAX_DIV + 1, then the wrong best_rate will be returned. If clk_generated_set_rate() will be called later with this wrong rate, it will

[PATCH AUTOSEL 4.19 31/32] coredump: split pipe command whitespace before expanding template

2019-08-06 Thread Sasha Levin
From: Paul Wise [ Upstream commit 315c69261dd3fa12dbc830d4fa00d1fad98d3b03 ] Save the offsets of the start of each argument to avoid having to update pointers to each argument after every corename krealloc and to avoid having to duplicate the memory for the dump command. Executable names contai

[PATCH AUTOSEL 4.19 24/32] IB/core: Add mitigation for Spectre V1

2019-08-06 Thread Sasha Levin
From: "Luck, Tony" [ Upstream commit 61f259821dd3306e49b7d42a3f90fb5a4ff3351b ] Some processors may mispredict an array bounds check and speculatively access memory that they should not. With a user supplied array index we like to play things safe by masking the value with the array size before

[PATCH AUTOSEL 4.19 32/32] asm-generic: fix -Wtype-limits compiler warnings

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit cbedfe11347fe418621bd188d58a206beb676218 ] Commit d66acc39c7ce ("bitops: Optimise get_order()") introduced a compilation warning because "rx_frag_size" is an "ushort" while PAGE_SHIFT here is 16. The commit changed the get_order() to be a multi-line macro where

[PATCH AUTOSEL 4.14 12/25] scsi: qla2xxx: Fix possible fcport null-pointer dereferences

2019-08-06 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit e82f04ec6ba91065fd33a6201ffd7cab840e1475 ] In qla2x00_alloc_fcport(), fcport is assigned to NULL in the error handling code on line 4880: fcport = NULL; Then fcport is used on lines 4883-4886: INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);

Re: [PATCH 4.19] Revert "initramfs: free initrd memory if opening /initrd.image fails"

2019-08-06 Thread Stephen Boyd
Quoting Sasha Levin (2019-08-06 13:47:52) > On Tue, Aug 06, 2019 at 10:59:40AM -0700, Stephen Boyd wrote: > >This reverts commit 25511676362d8f7d4b8805730a3d29484ceab1ec in the 4.19 > >stable trees. From what I can tell this commit doesn't do anything to > >improve the situation, mostly just reorde

[PATCH AUTOSEL 4.14 16/25] arm64/efi: fix variable 'si' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit f1d4836201543e88ebe70237e67938168d5fab19 ] GCC throws out this warning on arm64. drivers/firmware/efi/libstub/arm-stub.c: In function 'efi_entry': drivers/firmware/efi/libstub/arm-stub.c:132:22: warning: variable 'si' set but not used [-Wunused-but-set-variable]

[PATCH AUTOSEL 4.14 11/25] scsi: hpsa: correct scsi command status issue after reset

2019-08-06 Thread Sasha Levin
From: Don Brace [ Upstream commit eeebce1862970653cdf5c01e98bc669edd8f529a ] Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/

[PATCH AUTOSEL 4.14 05/25] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail

2019-08-06 Thread Sasha Levin
From: Nianyao Tang [ Upstream commit 34f8eb92ca053cbba2887bb7e4dbf2b2cd6eb733 ] In its_vpe_init, when its_alloc_vpe_table fails, we should free vpt_page allocated just before, instead of vpe->vpt_page. Let's fix it. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Nianyao

[PATCH AUTOSEL 4.14 03/25] xtensa: fix build for cores with coprocessors

2019-08-06 Thread Sasha Levin
From: Max Filippov [ Upstream commit e3cacb73e626d885b8cf24103fed0ae26518e3c4 ] Assembly entry/return abstraction change didn't add asmmacro.h include statement to coprocessor.S, resulting in references to undefined macros abi_entry and abi_ret on cores that define XTENSA_HAVE_COPROCESSORS. Fix

[PATCH AUTOSEL 4.14 08/25] perf header: Fix use of unitialized value warning

2019-08-06 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ Upstream commit 20f9781f491360e7459c589705a2e4b1f136bee9 ] When building our local version of perf with MSAN (Memory Sanitizer) and running the perf record command, MSAN throws a use of uninitialized value warning in "tools/perf/util/util.c:333:6". This warning stem

[PATCH AUTOSEL 4.14 07/25] perf header: Fix divide by zero error if f_header.attr_size==0

2019-08-06 Thread Sasha Levin
From: Vince Weaver [ Upstream commit 7622236ceb167aa3857395f9bdaf871442aa467e ] So I have been having lots of trouble with hand-crafted perf.data files causing segfaults and the like, so I have started fuzzing the perf tool. First issue found: If f_header.attr_size is 0 in the perf.data file,

[PATCH AUTOSEL 4.9 05/17] perf header: Fix use of unitialized value warning

2019-08-06 Thread Sasha Levin
From: Numfor Mbiziwo-Tiapo [ Upstream commit 20f9781f491360e7459c589705a2e4b1f136bee9 ] When building our local version of perf with MSAN (Memory Sanitizer) and running the perf record command, MSAN throws a use of uninitialized value warning in "tools/perf/util/util.c:333:6". This warning stem

[PATCH AUTOSEL 4.9 06/17] libata: zpodd: Fix small read overflow in zpodd_get_mech_type()

2019-08-06 Thread Sasha Levin
From: Kees Cook [ Upstream commit 71d6c505b4d9e6f76586350450e785e3d452b346 ] Jeffrin reported a KASAN issue: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70 Read of size 16 at addr 91f41f80 by task scsi_eh_1/149 ... The buggy address belongs to the variable:

[PATCH AUTOSEL 4.14 19/25] arm64/mm: fix variable 'pud' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc ] GCC throws a warning, arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page': arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable] pud_t pud; ^~~ because pud_table()

[PATCH AUTOSEL 4.9 08/17] exit: make setting exit_state consistent

2019-08-06 Thread Sasha Levin
From: Christian Brauner [ Upstream commit 30b692d3b390c6fe78a5064be0c4bbd44a41be59 ] Since commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state") we unconditionally set exit_state to EXIT_ZOMBIE before calling into do_notify_parent(). This was done to eliminate a race when queryi

[PATCH AUTOSEL 4.9 04/17] perf header: Fix divide by zero error if f_header.attr_size==0

2019-08-06 Thread Sasha Levin
From: Vince Weaver [ Upstream commit 7622236ceb167aa3857395f9bdaf871442aa467e ] So I have been having lots of trouble with hand-crafted perf.data files causing segfaults and the like, so I have started fuzzing the perf tool. First issue found: If f_header.attr_size is 0 in the perf.data file,

[PATCH AUTOSEL 4.9 12/17] arm64/mm: fix variable 'pud' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc ] GCC throws a warning, arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page': arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable] pud_t pud; ^~~ because pud_table()

[PATCH AUTOSEL 4.4 04/14] perf header: Fix divide by zero error if f_header.attr_size==0

2019-08-06 Thread Sasha Levin
From: Vince Weaver [ Upstream commit 7622236ceb167aa3857395f9bdaf871442aa467e ] So I have been having lots of trouble with hand-crafted perf.data files causing segfaults and the like, so I have started fuzzing the perf tool. First issue found: If f_header.attr_size is 0 in the perf.data file,

[PATCH AUTOSEL 4.9 14/17] IB/mad: Fix use-after-free in ib mad completion handling

2019-08-06 Thread Sasha Levin
From: Jack Morgenstein [ Upstream commit 770b7d96cfff6a8bf6c9f261ba6f135dc9edf484 ] We encountered a use-after-free bug when unloading the driver: [ 3562.116059] BUG: KASAN: use-after-free in ib_mad_post_receive_mads+0xddc/0xed0 [ib_core] [ 3562.117233] Read of size 4 at addr 8882ca5aa868

[PATCH AUTOSEL 4.14 25/25] asm-generic: fix -Wtype-limits compiler warnings

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit cbedfe11347fe418621bd188d58a206beb676218 ] Commit d66acc39c7ce ("bitops: Optimise get_order()") introduced a compilation warning because "rx_frag_size" is an "ushort" while PAGE_SHIFT here is 16. The commit changed the get_order() to be a multi-line macro where

[PATCH AUTOSEL 4.9 11/17] arm64/efi: fix variable 'si' set but not used

2019-08-06 Thread Sasha Levin
From: Qian Cai [ Upstream commit f1d4836201543e88ebe70237e67938168d5fab19 ] GCC throws out this warning on arm64. drivers/firmware/efi/libstub/arm-stub.c: In function 'efi_entry': drivers/firmware/efi/libstub/arm-stub.c:132:22: warning: variable 'si' set but not used [-Wunused-but-set-variable]

[PATCH AUTOSEL 4.4 02/14] xen/pciback: remove set but not used variable 'old_state'

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit 09e088a4903bd0dd911b4f1732b250130cdaffed ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/xen-pciback/conf_space_capability.c: In function pm_ctrl_write: drivers/xen/xen-pciback/conf_space_capability.c:119:25: warning: variable old_state set but n

[PATCH AUTOSEL 4.9 15/17] ocfs2: remove set but not used variable 'last_hash'

2019-08-06 Thread Sasha Levin
From: YueHaibing [ Upstream commit 7bc36e3ce91471b6377c8eadc0a2f220a2280083 ] Fixes gcc '-Wunused-but-set-variable' warning: fs/ocfs2/xattr.c: In function ocfs2_xattr_bucket_find: fs/ocfs2/xattr.c:3828:6: warning: variable last_hash set but not used [-Wunused-but-set-variable] It's never

[PATCH AUTOSEL 4.9 13/17] IB/core: Add mitigation for Spectre V1

2019-08-06 Thread Sasha Levin
From: "Luck, Tony" [ Upstream commit 61f259821dd3306e49b7d42a3f90fb5a4ff3351b ] Some processors may mispredict an array bounds check and speculatively access memory that they should not. With a user supplied array index we like to play things safe by masking the value with the array size before

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