[PATCH 4.4 26/78] hwmon: (nct7802) Fix wrong detection of in4 presence

2019-08-22 Thread Greg Kroah-Hartman
From: Guenter Roeck commit 38ada2f406a9b81fb1249c5c9227fa657e7d5671 upstream. The code to detect if in4 is present is wrong; if in4 is not present, the in4_input sysfs attribute is still present. In detail: - Ihen RTD3_MD=11 (VSEN3 present), everything is as expected (no bug). - If we have

[PATCH 4.4 25/78] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices

2019-08-22 Thread Greg Kroah-Hartman
From: Tomas Bortoli commit 30a8beeb3042f49d0537b7050fd21b490166a3d9 upstream. Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by:

[PATCH 4.4 14/78] s390/qdio: add sanity checks to the fast-requeue path

2019-08-22 Thread Greg Kroah-Hartman
[ Upstream commit a6ec414a4dd529eeac5c3ea51c661daba3397108 ] If the device driver were to send out a full queue's worth of SBALs, current code would end up discovering the last of those SBALs as PRIMED and erroneously skip the SIGA-w. This immediately stalls the queue. Add a check to not attempt

[PATCH 4.4 02/78] sound: fix a memory leak bug

2019-08-22 Thread Greg Kroah-Hartman
From: Wenwen Wang commit c7cd7c748a3250ca33509f9235efab9c803aca09 upstream. In sound_insert_unit(), the controlling structure 's' is allocated through kmalloc(). Then it is added to the sound driver list by invoking __sound_insert_unit(). Later on, if __register_chrdev() fails, 's' is removed

[PATCH 4.4 24/78] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices

2019-08-22 Thread Greg Kroah-Hartman
From: Tomas Bortoli commit ead16e53c2f0ed946d82d4037c630e2f60f4ab69 upstream. Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by:

[PATCH 4.4 01/78] usb: iowarrior: fix deadlock on disconnect

2019-08-22 Thread Greg Kroah-Hartman
From: Oliver Neukum commit c468a8aa790e0dfe0a7f8a39db282d39c2c00b46 upstream. We have to drop the mutex before we close() upon disconnect() as close() needs the lock. This is safe to do by dropping the mutex as intfdata is already set to NULL, so open() will fail. Fixes: 03f36e885fc26 ("USB:

Re: [PATCH net v3] ixgbe: fix double clean of tx descriptors with xdp

2019-08-22 Thread Alexander Duyck
On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets wrote: > > Tx code doesn't clear the descriptors' status after cleaning. > So, if the budget is larger than number of used elems in a ring, some > descriptors will be accounted twice and xsk_umem_complete_tx will move > prod_tail far beyond the

[GIT PULL] Wimplicit-fallthrough patches for 5.3-rc6

2019-08-22 Thread Gustavo A. R. Silva
The following changes since commit 609488bc979f99f805f34e9a32c1e3b71179d10b: Linux 5.3-rc2 (2019-07-28 12:47:02 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git tags/Wimplicit-fallthrough-5.3-rc6 for you to fetch changes up

[PATCH 5.2 015/135] xtensa: add missing isync to the cpu_reset TLB code

2019-08-22 Thread Sasha Levin
From: Max Filippov commit cd8869f4cb257f22b89495ca40f5281e58ba359c upstream. ITLB entry modifications must be followed by the isync instruction before the new entries are possibly used. cpu_reset lacks one isync between ITLB way 6 initialization and jump to the identity mapping. Add missing

[PATCH 5.2 008/135] mm/z3fold.c: fix z3fold_destroy_pool() race condition

2019-08-22 Thread Sasha Levin
From: Henry Burns commit b997052bc3ac444a0bceab1093aff7ae71ed419e upstream. The constraint from the zpool use of z3fold_destroy_pool() is there are no outstanding handles to memory (so no active allocations), but it is possible for there to be outstanding work on either of the two wqs in the

[PATCH 5.2 006/135] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-08-22 Thread Sasha Levin
From: Yang Shi commit a53190a4aaa36494f4d7209fd1fcc6f2ee08e0e0 upstream. When running syzkaller internally, we ran into the below bug on 4.9.x kernel: kernel BUG at mm/huge_memory.c:2124! invalid opcode: [#1] SMP KASAN CPU: 0 PID: 1518 Comm: syz-executor107 Not tainted 4.9.168+ #2

[PATCH 5.2 019/135] ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit

2019-08-22 Thread Sasha Levin
From: Hui Peng commit daac07156b330b18eb5071aec4b3ddca1c377f2c upstream. The `uac_mixer_unit_descriptor` shown as below is read from the device side. In `parse_audio_mixer_unit`, `baSourceID` field is accessed from index 0 to `bNrInPins` - 1, the current implementation assumes that descriptor

[PATCH 5.2 016/135] arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side

2019-08-22 Thread Sasha Levin
From: Will Deacon commit b6143d10d23ebb4a77af311e8b8b7f019d0163e6 upstream. The initial support for dynamic ftrace trampolines in modules made use of an indirect branch which loaded its target from the beginning of a special section (e71a4e1bebaf7 ("arm64: ftrace: add support for far branches

[PATCH 5.2 017/135] ALSA: hda/realtek - Add quirk for HP Envy x360

2019-08-22 Thread Sasha Levin
From: Takashi Iwai commit 190d03814eb3b49d4f87ff38fef26d36f3568a60 upstream. HP Envy x360 (AMD Ryzen-based model) with 103c:8497 needs the same quirk like HP Spectre x360 for enabling the mute LED over Mic3 pin. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204373 Cc: Signed-off-by:

[PATCH 5.2 003/135] seq_file: fix problem when seeking mid-record

2019-08-22 Thread Sasha Levin
From: NeilBrown commit 6a2aeab59e97101b4001bac84388fc49a992f87e upstream. If you use lseek or similar (e.g. pread) to access a location in a seq_file file that is within a record, rather than at a record boundary, then the first read will return the remainder of the record, and the second read

[PATCH 5.2 005/135] mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified

2019-08-22 Thread Sasha Levin
From: Yang Shi commit d883544515aae54842c21730b880172e7894fde9 upstream. When both MPOL_MF_MOVE* and MPOL_MF_STRICT was specified, mbind() should try best to migrate misplaced pages, if some of the pages could not be migrated, then return -EIO. There are three different sub-cases: 1. vma is

[PATCH 5.2 010/135] mm/usercopy: use memory range to be accessed for wraparound check

2019-08-22 Thread Sasha Levin
From: "Isaac J. Manjarres" commit 951531691c4bcaa59f56a316e018bc2ff1ddf855 upstream. Currently, when checking to see if accessing n bytes starting at address "ptr" will cause a wraparound in the memory addresses, the check in check_bogus_address() adds an extra byte, which is incorrect, as the

[PATCH 5.2 009/135] mm/memcontrol.c: fix use after free in mem_cgroup_iter()

2019-08-22 Thread Sasha Levin
From: Miles Chen commit 54a83d6bcbf8f4700013766b974bf9190d40b689 upstream. This patch is sent to report an use after free in mem_cgroup_iter() after merging commit be2657752e9e ("mm: memcg: fix use after free in mem_cgroup_iter()"). I work with android kernel tree (4.9 & 4.14), and commit

[PATCH 5.2 013/135] drm/amdgpu: fix gfx9 soft recovery

2019-08-22 Thread Sasha Levin
From: Pierre-Eric Pelloux-Prayer commit 17b6d2d528542bc60ad400add35728b2259b3cc1 upstream. The SOC15_REG_OFFSET() macro wasn't used, making the soft recovery fail. v2: use WREG32_SOC15 instead of WREG32 + SOC15_REG_OFFSET Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Alex Deucher

[PATCH 5.2 002/135] sh: kernel: hw_breakpoint: Fix missing break in switch statement

2019-08-22 Thread Sasha Levin
From: "Gustavo A. R. Silva" commit 1ee1119d184bb06af921b48c3021d921bbd85bac upstream. Add missing break statement in order to prevent the code from falling through to case SH_BREAKPOINT_WRITE. Fixes: 09a072947791 ("sh: hw-breakpoints: Add preliminary support for SH-4A UBC.") Cc:

[PATCH 5.2 011/135] mm, vmscan: do not special-case slab reclaim when watermarks are boosted

2019-08-22 Thread Sasha Levin
From: Mel Gorman commit 28360f398778d7623a5ff8a8e90958c0d925e120 upstream. Dave Chinner reported a problem pointing a finger at commit 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs"). The report is extensive:

[PATCH 5.2 018/135] ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term

2019-08-22 Thread Sasha Levin
From: Hui Peng commit 19bce474c45be69a284ecee660aa12d8f1e88f18 upstream. `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument

[PATCH 5.2 026/135] HID: hiddev: do cleanup in failure of opening a device

2019-08-22 Thread Sasha Levin
From: Hillf Danton commit 6d4472d7bec39917b54e4e80245784ea5d60ce49 upstream. Undo what we did for opening before releasing the memory slice. Reported-by: syzbot Cc: Andrey Konovalov Signed-off-by: Hillf Danton Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.2 020/135] ALSA: hda - Apply workaround for another AMD chip 1022:1487

2019-08-22 Thread Sasha Levin
From: Takashi Iwai commit de768ce45466f3009809719eb7b1f6f5277d9373 upstream. MSI MPG X570 board is with another AMD HD-audio controller (PCI ID 1022:1487) and it requires the same workaround applied for X370, etc (PCI ID 1022:1457). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195303

[PATCH 5.2 027/135] Input: kbtab - sanity check for endpoint type

2019-08-22 Thread Sasha Levin
From: Oliver Neukum commit c88090dfc84254fa149174eb3e6a8458de1912c4 upstream. The driver should check whether the endpoint it uses has the correct type. Reported-by: syzbot+c7df50363aaff50aa...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Dmitry Torokhov

[PATCH 5.2 024/135] HID: holtek: test for sanity of intfdata

2019-08-22 Thread Sasha Levin
From: Oliver Neukum commit 01ec0a5f19c8c82960a07f6c7410fc9e01d7fb51 upstream. The ioctl handler uses the intfdata of a second interface, which may not be present in a broken or malicious device, hence the intfdata needs to be checked for NULL. [jkos...@suse.cz: fix newly added spurious space]

[PATCH 5.2 023/135] ALSA: hda - Let all conexant codec enter D3 when rebooting

2019-08-22 Thread Sasha Levin
From: Hui Wang commit 401714d9534aad8c24196b32600da683116bbe09 upstream. We have 3 new lenovo laptops which have conexant codec 0x14f11f86, these 3 laptops also have the noise issue when rebooting, after letting the codec enter D3 before rebooting or poweroff, the noise disappers. Instead of

[PATCH 5.2 007/135] mm/z3fold.c: fix z3fold_destroy_pool() ordering

2019-08-22 Thread Sasha Levin
From: Henry Burns commit 6051d3bd3b91e96c59e62b8be2dba1cc2b19ee40 upstream. The constraint from the zpool use of z3fold_destroy_pool() is there are no outstanding handles to memory (so no active allocations), but it is possible for there to be outstanding work on either of the two wqs in the

[PATCH 5.2 033/135] riscv: Make __fstate_clean() work correctly.

2019-08-22 Thread Sasha Levin
From: Vincent Chen commit 69703eb9a8ae28a46cd5bce7d69ceeef6273a104 upstream. Make the __fstate_clean() function correctly set the state of sstatus.FS in pt_regs to SR_FS_CLEAN. Fixes: 7db91e57a0acd ("RISC-V: Task implementation") Cc: linux-stable Signed-off-by: Vincent Chen Reviewed-by: Anup

[PATCH 5.2 034/135] Revert "i2c: imx: improve the error handling in i2c_imx_dma_request()"

2019-08-22 Thread Sasha Levin
From: Fabio Estevam commit e8c220fac415d9f4a994b0c2871b835feac1eb4e upstream. Since commit e1ab9a468e3b ("i2c: imx: improve the error handling in i2c_imx_dma_request()") when booting with the DMA driver as module (such as CONFIG_FSL_EDMA=m) the following endless clk warnings are seen: [

[PATCH 5.2 025/135] HID: hiddev: avoid opening a disconnected device

2019-08-22 Thread Sasha Levin
From: Hillf Danton commit 9c09b214f30e3c11f9b0b03f89442df03643794d upstream. syzbot found the following crash on: HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output:

[PATCH 5.2 035/135] blk-mq: move cancel of requeue_work to the front of blk_exit_queue

2019-08-22 Thread Sasha Levin
From: zhengbin commit e26cc08265dda37d2acc8394604f220ef412299d upstream. blk_exit_queue will free elevator_data, while blk_mq_requeue_work will access it. Move cancel of requeue_work to the front of blk_exit_queue to avoid use-after-free. blk_exit_queueblk_mq_requeue_work

[PATCH 5.2 029/135] net: usb: pegasus: fix improper read if get_registers() fail

2019-08-22 Thread Sasha Levin
From: Denis Kirjanov commit 224c04973db1125fcebefffd86115f99f50f8277 upstream. get_registers() may fail with -ENOMEM and in this case we can read a garbage from the status variable tmp. Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com Signed-off-by: Denis Kirjanov

[PATCH 5.2 022/135] ALSA: hda - Add a generic reboot_notify

2019-08-22 Thread Sasha Levin
From: Hui Wang commit 871b9066027702e6e6589da0e1edd3b7dede7205 upstream. Make codec enter D3 before rebooting or poweroff can fix the noise issue on some laptops. And in theory it is harmless for all codecs to enter D3 before rebooting or poweroff, let us add a generic reboot_notify, then

[PATCH 5.2 032/135] riscv: Correct the initialized flow of FP register

2019-08-22 Thread Sasha Levin
From: Vincent Chen commit 8ac71d7e46b94a4fc8ffc6f1c88004cdf24459e8 upstream. The following two reasons cause FP registers are sometimes not initialized before starting the user program. 1. Currently, the FP context is initialized in flush_thread() function and we expect these initial

[PATCH 5.2 028/135] Input: iforce - add sanity checks

2019-08-22 Thread Sasha Levin
From: Oliver Neukum commit 849f5ae3a513c550cad741c68dd3d7eb2bcc2a2c upstream. The endpoint type should also be checked before a device is accepted. Reported-by: syzbot+5efc10c005014d061...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Dmitry Torokhov Signed-off-by:

[PATCH 5.2 021/135] ALSA: hda - Fix a memory leak bug

2019-08-22 Thread Sasha Levin
From: Wenwen Wang commit cfef67f016e4c00a2f423256fc678a6967a9fc09 upstream. In snd_hda_parse_generic_codec(), 'spec' is allocated through kzalloc(). Then, the pin widgets in 'codec' are parsed. However, if the parsing process fails, 'spec' is not deallocated, leading to a memory leak. To fix

[PATCH 5.2 031/135] netfilter: ebtables: also count base chain policies

2019-08-22 Thread Sasha Levin
From: Florian Westphal commit 3b48300d5cc7c7bed63fddb006c4046549ed4aec upstream. ebtables doesn't include the base chain policies in the rule count, so we need to add them manually when we call into the x_tables core to allocate space for the comapt offset table. This lead syzbot to trigger:

[PATCH 5.2 036/135] io_uring: fix manual setup of iov_iter for fixed buffers

2019-08-22 Thread Sasha Levin
From: Aleix Roca Nonell commit 99c79f6692ccdc42e04deea8a36e22bb48168a62 upstream. Commit bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed buffers") introduced an optimization to avoid using the slow iov_iter_advance by manually populating the iov_iter iterator in some cases.

[PATCH 5.2 039/135] clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1

2019-08-22 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 5.2 040/135] clk: sprd: Select REGMAP_MMIO to avoid compile errors

2019-08-22 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:

[PATCH 5.2 041/135] clk: renesas: cpg-mssr: Fix reset control race condition

2019-08-22 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

[PATCH 5.2 042/135] dma-mapping: check pfn validity in dma_common_{mmap,get_sgtable}

2019-08-22 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit 66d7780f18eae0232827fcffeaded39a6a168236 ] Check that the pfn returned from arch_dma_coherent_to_pfn refers to a valid page and reject the mmap / get_sgtable requests otherwise. Based on the arm implementation of the mmap and get_sgtable methods.

[PATCH 5.2 048/135] irqchip/irq-imx-gpcv2: Forward irq type to parent

2019-08-22 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 5.2 047/135] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail

2019-08-22 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:

[PATCH 5.2 043/135] platform/x86: pcengines-apuv2: Fix softdep statement

2019-08-22 Thread Sasha Levin
From: Jean Delvare [ Upstream commit edbfe83def34153a05439ecb3352ae0bb65024de ] Only first MODULE_SOFTDEP statement is handled per module. Multiple dependencies must be expressed in a single statement. Signed-off-by: Jean Delvare Cc: "Enrico Weigelt, metux IT consult" Cc: Darren Hart Cc:

[PATCH 5.2 046/135] xen/pciback: remove set but not used variable 'old_state'

2019-08-22 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

[PATCH 5.2 055/135] libata: zpodd: Fix small read overflow in zpodd_get_mech_type()

2019-08-22 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

[PATCH 5.2 051/135] perf header: Fix divide by zero error if f_header.attr_size==0

2019-08-22 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 5.2 052/135] perf header: Fix use of unitialized value warning

2019-08-22 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

[PATCH 5.2 053/135] RDMA/qedr: Fix the hca_type and hca_rev returned in device attributes

2019-08-22 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:

[PATCH 5.2 044/135] platform/x86: intel_pmc_core: Add ICL-NNPI support to PMC Core

2019-08-22 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:

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

2019-08-22 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

[PATCH 5.2 058/135] drm/bridge: tc358764: Fix build error

2019-08-22 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'

[PATCH 5.2 057/135] drm/bridge: lvds-encoder: Fix build error while CONFIG_DRM_KMS_HELPER=m

2019-08-22 Thread Sasha Levin
From: YueHaibing [ Upstream commit f4cc743a98136df3c3763050a0e8223b52d9a960 ] If DRM_LVDS_ENCODER=y but CONFIG_DRM_KMS_HELPER=m, build fails: drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe': lvds-encoder.c:(.text+0x155): undefined reference to

[PATCH 5.2 061/135] scsi: qla2xxx: Fix possible fcport null-pointer dereferences

2019-08-22 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(>del_work, qla24xx_delete_sess_fn);

[PATCH 5.2 068/135] kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules

2019-08-22 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit cb4819934a7f9b87876f11ed05b8624c0114551b ] KBUILD_EXTRA_SYMBOLS makes sense only when building external modules. Moreover, the modpost sets 'external_module' if the -e option is given. I replaced $(patsubst %, -e %,...) with simpler $(addprefix -e,...)

[PATCH 5.2 056/135] powerpc/nvdimm: Pick nearby online node if the device node is not online

2019-08-22 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

[PATCH 5.2 059/135] Btrfs: fix deadlock between fiemap and transaction commits

2019-08-22 Thread Sasha Levin
From: Filipe Manana [ Upstream commit a6d155d2e363f26290ffd50591169cb96c2a609e ] The fiemap handler locks a file range that can have unflushed delalloc, and after locking the range, it tries to attach to a running transaction. If the running transaction started its commit, that is, it is in

[PATCH 5.2 067/135] ata: libahci: do not complain in case of deferred probe

2019-08-22 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

[PATCH 5.2 066/135] drm/amdgpu: fix a potential information leaking bug

2019-08-22 Thread Sasha Levin
From: Wang Xiayang [ Upstream commit 929e571c04c285861e0bb049a396a2bdaea63282 ] Coccinelle reports a path that the array "data" is never initialized. The path skips the checks in the conditional branches when either of callback functions, read_wave_vgprs and read_wave_sgprs, is not registered.

[PATCH 5.2 062/135] tracing: Fix header include guards in trace event headers

2019-08-22 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 5.2 070/135] arm64/efi: fix variable 'si' set but not used

2019-08-22 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

[PATCH 5.2 074/135] arm64/mm: fix variable 'pud' set but not used

2019-08-22 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 5.2 069/135] kbuild: Check for unknown options with cc-option usage in Kconfig and clang

2019-08-22 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

[PATCH 5.2 075/135] arm64/mm: fix variable 'tag' set but not used

2019-08-22 Thread Sasha Levin
From: Qian Cai [ Upstream commit 7732d20a160c76006c7fe7bca5178aea6af1d2e8 ] When CONFIG_KASAN_SW_TAGS=n, set_tag() is compiled away. GCC throws a warning, mm/kasan/common.c: In function '__kasan_kmalloc': mm/kasan/common.c:464:5: warning: variable 'tag' set but not used

Re: [PATCH v10 09/23] iommu/io-pgtable-arm-v7s: Extend to support PA[33:32] for MediaTek

2019-08-22 Thread Will Deacon
On Thu, Aug 22, 2019 at 08:05:33PM +0800, Yong Wu wrote: > On Thu, 2019-08-22 at 12:28 +0100, Will Deacon wrote: > > Ok, great. Yong Wu -- are you ok respinning with the above + missing > > brackets? > > Of course I can. > > NearlyAll the interface in this file is prefixed with "arm_v7s_", so >

[PATCH 5.2 071/135] riscv: Fix perf record without libelf support

2019-08-22 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 5.2 073/135] arm64: unwind: Prohibit probing on return_address()

2019-08-22 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

[PATCH 5.2 078/135] RDMA/restrack: Track driver QP types in resource tracker

2019-08-22 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

[PATCH 5.2 072/135] arm64: Lower priority mask for GIC_PRIO_IRQON

2019-08-22 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

[PATCH 5.2 081/135] drm: msm: Fix add_gpu_components

2019-08-22 Thread Sasha Levin
From: Jeffrey Hugo [ Upstream commit 9ca7ad6c7706edeae331c1632d0c63897418ebad ] add_gpu_components() adds found GPU nodes from the DT to the match list, regardless of the status of the nodes. This is a problem, because if the nodes are disabled, they should not be on the match list because

[PATCH 5.2 085/135] arm64: Make debug exception handlers visible from RCU

2019-08-22 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 5.2 065/135] drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep

2019-08-22 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

[PATCH 5.2 063/135] drm/amdkfd: Fix byte align on VegaM

2019-08-22 Thread Sasha Levin
From: Kent Russell [ Upstream commit d65848657c3da5c0d4b685f823d0230f151ab34e ] This was missed during the addition of VegaM support Reviewed-by: Alex Deucher Signed-off-by: Kent Russell Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH 5.2 076/135] IB/core: Add mitigation for Spectre V1

2019-08-22 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 5.2 084/135] arm64: kprobes: Recover pstate.D in single-step exception handler

2019-08-22 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

[PATCH 5.2 079/135] IB/mad: Fix use-after-free in ib mad completion handling

2019-08-22 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 5.2 088/135] page flags: prioritize kasan bits over last-cpuid

2019-08-22 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

[PATCH 5.2 086/135] Revert "kmemleak: allow to coexist with fault injection"

2019-08-22 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

[PATCH 5.2 087/135] ocfs2: remove set but not used variable 'last_hash'

2019-08-22 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 5.2 089/135] asm-generic: fix -Wtype-limits compiler warnings

2019-08-22 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] arm64: dts: sdm845: Add parent clock for rpmhcc

2019-08-22 Thread Vinod Koul
RPM clock controller has parent as xo, so specify that in DT node for rpmhcc Signed-off-by: Vinod Koul --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index

[PATCH 5.2 093/135] staging: comedi: dt3000: Fix rounding up of timer divisor

2019-08-22 Thread Sasha Levin
From: Ian Abbott commit 8e2a589a3fc36ce858d42e767c3bcd8fc62a512b upstream. `dt3k_ns_to_timer()` determines the prescaler and divisor to use to produce a desired timing period. It is influenced by a rounding mode and can round the divisor up, down, or to the nearest value. However, the code

[PATCH net v3] ixgbe: fix double clean of tx descriptors with xdp

2019-08-22 Thread Ilya Maximets
Tx code doesn't clear the descriptors' status after cleaning. So, if the budget is larger than number of used elems in a ring, some descriptors will be accounted twice and xsk_umem_complete_tx will move prod_tail far beyond the prod_head breaking the completion queue ring. Fix that by limiting

[PATCH 5.2 083/135] drm/exynos: fix missing decrement of retry counter

2019-08-22 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 1bbbab097a05276e312dd2462791d32b21ceb1ee ] Currently the retry counter is not being decremented, leading to a potential infinite spin if the scalar_reads don't change state. Addresses-Coverity: ("Infinite loop") Fixes: 280e54c9f614 ("drm/exynos: scaler:

[PATCH 5.2 094/135] iio: adc: max9611: Fix temperature reading in probe

2019-08-22 Thread Sasha Levin
From: Jacopo Mondi commit b9ddd5091160793ee9fac10da765cf3f53d2aaf0 upstream. The max9611 driver reads the die temperature at probe time to validate the communication channel. Use the actual read value to perform the test instead of the read function return value, which was mistakenly used so

[PATCH 5.2 082/135] RDMA/hns: Fix error return code in hns_roce_v1_rsv_lp_qp()

2019-08-22 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 020fb3bebc224dfe9353a56ecbe2d5fac499dffc ] Fix to return error code -ENOMEM from the rdma_zalloc_drv_obj() error handling case instead of 0, as done elsewhere in this function. Fixes: e8ac9389f0d7 ("RDMA: Fix allocation failure on pointer pd") Fixes:

[PATCH 5.2 096/135] usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"

2019-08-22 Thread Sasha Levin
From: Yoshihiro Shimoda commit 5dac665cf403967bb79a7aeb8c182a621fe617ff upstream. Since the role_store() uses strncmp(), it's possible to refer out-of-memory if the sysfs data size is smaller than strlen("host"). This patch fixes it by using sysfs_streq() instead of strncmp(). Fixes:

[PATCH 5.2 099/135] USB: serial: option: add D-Link DWM-222 device ID

2019-08-22 Thread Sasha Levin
From: Rogan Dawes commit 552573e42aab5f75aff9bab855a9677979d9a7d5 upstream. Add device id for D-Link DWM-222 A2. MI_00 D-Link HS-USB Diagnostics MI_01 D-Link HS-USB Modem MI_02 D-Link HS-USB AT Port MI_03 D-Link HS-USB NMEA MI_04 D-Link HS-USB WWAN Adapter (qmi_wwan) MI_05 USB Mass Storage

[PATCH 5.2 100/135] USB: serial: option: Add support for ZTE MF871A

2019-08-22 Thread Sasha Levin
From: Yoshiaki Okamoto commit 7e7ae38bf928c5cfa6dd6e9a2cf8b42c84a27c92 upstream. This patch adds support for MF871A USB modem (aka Speed USB STICK U03) to option driver. This modem is manufactured by ZTE corporation, and sold by KDDI. Interface layout: 0: AT 1: MODEM usb-devices output: T:

[PATCH 5.2 090/135] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-08-22 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

[PATCH 5.2 101/135] USB: serial: option: add the BroadMobi BM818 card

2019-08-22 Thread Sasha Levin
From: Bob Ham commit e5d8badf37e6b547842f2fcde10361b29e08bd36 upstream. Add a VID:PID for the BroadMobi BM818 M.2 card T: Bus=01 Lev=03 Prnt=40 Port=03 Cnt=01 Dev#= 44 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2020 ProdID=2060 Rev=00.00 S:

[PATCH 5.2 098/135] USB: CDC: fix sanity checks in CDC union parser

2019-08-22 Thread Sasha Levin
From: Oliver Neukum commit 54364278fb3cabdea51d6398b07c87415065b3fc upstream. A few checks checked for the size of the pointer to a structure instead of the structure itself. Copy & paste issue presumably. Fixes: e4c6fb7794982 ("usbnet: move the CDC parser into USB core") Cc: stable

[PATCH 5.2 102/135] USB: serial: option: Add Motorola modem UARTs

2019-08-22 Thread Sasha Levin
From: Tony Lindgren commit 6caf0be40a707689e8ff8824fdb96ef77685b1ba upstream. On Motorola Mapphone devices such as Droid 4 there are five USB ports that do not use the same layout as Gobi 1K/2K/etc devices listed in qcserial.c. So we should use qcaux.c or option.c as noted by Dan Williams . As

[PATCH 5.2 103/135] usb: setup authorized_default attributes using usb_bus_notify

2019-08-22 Thread Sasha Levin
From: Thiébaud Weksteen commit 27709ae4e2fe6cf7da2ae45e718e190c5433342b upstream. Currently, the authorized_default and interface_authorized_default attributes for HCD are set up after the uevent has been sent to userland. This creates a race condition where userland may fail to access this

Re: [PATCH] /dev/mem: Bail out upon SIGKILL when reading memory.

2019-08-22 Thread Dmitry Vyukov
By the way, write_mem() worries me whether there is possibility of > > >> replacing > > >> kernel code/data with user-defined memory data supplied from userspace. > > >> If write_mem() were by chance replaced with code that does > > >> > > &

[PATCH 5.2 109/135] net: dsa: Check existence of .port_mdb_add callback before calling it

2019-08-22 Thread Sasha Levin
From: Chen-Yu Tsai [ Upstream commit 58799865be84e2a895dab72de0e1b996ed943f22 ] The dsa framework has optional .port_mdb_{prepare,add,del} callback fields for drivers to handle multicast database entries. When adding an entry, the framework goes through a prepare phase, then a commit phase.

[PATCH 5.2 108/135] bonding: Add vlan tx offload to hw_enc_features

2019-08-22 Thread Sasha Levin
From: YueHaibing [ Upstream commit d595b03de2cb0bdf9bcdf35ff27840cc3a37158f ] As commit 30d8177e8ac7 ("bonding: Always enable vlan tx offload") said, we should always enable bonding's vlan tx offload, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan

[PATCH 5.2 110/135] net/mlx4_en: fix a memory leak bug

2019-08-22 Thread Sasha Levin
From: Wenwen Wang [ Upstream commit 48ec7014c56e5eb2fbf6f479896143622d834f3b ] In mlx4_en_config_rss_steer(), 'rss_map->indir_qp' is allocated through kzalloc(). After that, mlx4_qp_alloc() is invoked to configure RSS indirection. However, if mlx4_qp_alloc() fails, the allocated

<    4   5   6   7   8   9   10   11   12   13   >