[PATCH 4.19 47/91] allocate_flower_entry: should check for null deref

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit bb1320834b8a80c6ac2697ab418d066981ea08ba ] allocate_flower_entry does not check for allocation success, but tries to deref the result. I only moved the spin_lock under null check, because the caller is checking allocation's status at line 652. Signed-off-by: Navid Emamdoost Si

[PATCH 4.19 56/91] perf tools: Fix proper buffer size for feature processing

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 79b2fe5e756163897175a8f57d66b26cd9befd59 ] After Song Liu's segfault fix for pipe mode, Arnaldo reported following error: # perf record -o - | perf script 0x514 [0x1ac]: failed to process type: 80 It's caused by wrong buffer size setup in feature processing, which makes cpu

[PATCH 4.19 58/91] drbd: dynamically allocate shash descriptor

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 77ce56e2bfaa64127ae5e23ef136c0168b818777 ] Building with clang and KASAN, we get a warning about an overly large stack frame on 32-bit architectures: drivers/block/drbd/drbd_receiver.c:921:31: error: stack frame size of 1280 bytes in function 'conn_connect' [-Werror,-Wfra

[PATCH 4.19 54/91] ALSA: compress: Dont allow paritial drain operations on capture streams

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit a70ab8a8645083f3700814e757f2940a88b7ef88 ] Partial drain and next track are intended for gapless playback and don't really have an obvious interpretation for a capture stream, so makes sense to not allow those operations on capture streams. Signed-off-by: Charles Keepax Acked-b

[PATCH 4.19 34/91] vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit c1ab69268d124ebdbb3864580808188ccd3ea355 ] So we don't call try to call vfio_unpin_pages() incorrectly. Fixes: 0a19e61e6d4c ("vfio: ccw: introduce channel program interfaces") Signed-off-by: Farhan Ali Reviewed-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <33a89467

[PATCH 4.19 76/91] drm/i915: Fix wrong escape clock divisor init for GLK

2019-08-14 Thread Greg Kroah-Hartman
From: Stanislav Lisovskiy commit 73a0ff0b30af79bf0303d557eb82f1d1945bb6ee upstream. According to Bspec clock divisor registers in GeminiLake should be initialized by shifting 1(<<) to amount of correspondent divisor. While i915 was writing all this time that value as is. Surprisingly that it by

[PATCH 4.19 63/91] scsi: megaraid_sas: fix panic on loading firmware crashdump

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 3b5f307ef3cb5022bfe3c8ca5b8f2114d5bf6c29 ] While loading fw crashdump in function fw_crash_buffer_show(), left bytes in one dma chunk was not checked, if copying size over it, overflow access will cause kernel panic. Signed-off-by: Junxiao Bi Acked-by: Sumit Saxena Signed-off-

[PATCH 4.19 75/91] hwmon: (nct7802) Fix wrong detection of in4 presence

2019-08-14 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 RTD

[PATCH 4.19 43/91] drm/amd/display: Increase size of audios array

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 7352193a33dfc9b69ba3bf6a8caea925b96243b1 ] [Why] The audios array defined in "struct resource_pool" is only 6 (MAX_PIPES) but the max number of audio devices (num_audio) is 7. In some projects, it will run out of audios array. [How] Incraese the audios array size to 7. Signed-o

[PATCH 4.19 41/91] drm/amd/display: Fix dc_create failure handling and 666 color depths

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 0905f32977268149f06e3ce6ea4bd6d374dd891f ] [Why] It is possible (but very unlikely) that constructing dc fails before current_state is created. We support 666 color depth in some scenarios, but this isn't handled in get_norm_pix_clk. It uses exactly the same pixel clock as the 8

[PATCH 4.19 74/91] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices

2019-08-14 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: syzbot+513e4d0985298538b...@syzkaller.appspotmail.c

[PATCH 4.19 89/91] iwlwifi: mvm: fix an out-of-bound access

2019-08-14 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit ba3224db78034435e9ff0247277cce7c7bb1756c upstream. The index for the elements of the ACPI object we dereference was static. This means that if we called the function twice we wouldn't start from 3 again, but rather from the latest index we reached in the previous c

[PATCH 4.19 87/91] mwifiex: fix 802.11n/WPA detection

2019-08-14 Thread Greg Kroah-Hartman
From: Brian Norris commit df612421fe2566654047769c6852ffae1a31df16 upstream. Commit 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs") adjusted the ieee_types_vendor_header struct, which inadvertently messed up the offsets used in mwifiex_is_wpa_oui_present(). Add that off

[PATCH 4.19 80/91] ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457)

2019-08-14 Thread Greg Kroah-Hartman
From: Takashi Iwai commit c02f77d32d2c45cfb1b2bb99eabd8a78f5ecc7db upstream. A long-time problem on the recent AMD chip (X370, X470, B450, etc with PCI ID 1022:1457) with Realtek codecs is the crackled or distorted sound for capture streams, as well as occasional playback hiccups. After lengthy

[PATCH 4.19 77/91] ALSA: firewire: fix a memory leak bug

2019-08-14 Thread Greg Kroah-Hartman
From: Wenwen Wang commit 1be3c1fae6c1e1f5bb982b255d2034034454527a upstream. In iso_packets_buffer_init(), 'b->packets' is allocated through kmalloc_array(). Then, the aligned packet size is checked. If it is larger than PAGE_SIZE, -EINVAL will be returned to indicate the error. However, the allo

[PATCH 4.19 90/91] iwlwifi: mvm: dont send GEO_TX_POWER_LIMIT on version < 41

2019-08-14 Thread Greg Kroah-Hartman
From: Luca Coelho commit 39bd984c203e86f3109b49c2a2e20677c4d3ab65 upstream. Firmware versions before 41 don't support the GEO_TX_POWER_LIMIT command, and sending it to the firmware will cause a firmware crash. We allow this via debugfs, so we need to return an error value in case it's not suppor

[PATCH 4.19 86/91] KVM: Fix leak vCPUs VMCS value into other pCPU

2019-08-14 Thread Greg Kroah-Hartman
From: Wanpeng Li commit 17e433b54393a6269acbcb792da97791fe1592d8 upstream. After commit d73eb57b80b (KVM: Boost vCPUs that are delivering interrupts), a five years old bug is exposed. Running ebizzy benchmark in three 80 vCPUs VMs on one 80 pCPUs Skylake server, a lot of rcu_sched stall warning

[PATCH 4.19 83/91] SMB3: Fix deadlock in validate negotiate hits reconnect

2019-08-14 Thread Greg Kroah-Hartman
From: Pavel Shilovsky commit e99c63e4d86d3a94818693147b469fa70de6f945 upstream. Currently we skip SMB2_TREE_CONNECT command when checking during reconnect because Tree Connect happens when establishing an SMB session. For SMB 3.0 protocol version the code also calls validate negotiate which resu

[PATCH 4.19 64/91] scsi: ibmvfc: fix WARN_ON during event pool release

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 5578257ca0e21056821e6481bd534ba267b84e58 ] While removing an ibmvfc client adapter a WARN_ON like the following WARN_ON is seen in the kernel log: WARNING: CPU: 6 PID: 5421 at ./include/linux/dma-mapping.h:541 ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc] CPU: 6 PID: 5421 Comm: rm

[PATCH 4.19 85/91] NFSv4: Fix an Oops in nfs4_do_setattr

2019-08-14 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 09a54f0ebfe263bc27c90bbd80187b9a93283887 upstream. If the user specifies an open mode of 3, then we don't have a NFSv4 state attached to the context, and so we Oops when we try to dereference it. Reported-by: Olga Kornievskaia Fixes: 29b59f9416937 ("NFSv4: change n

[PATCH 4.19 65/91] scsi: scsi_dh_alua: always use a 2 second delay before retrying RTPG

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 20122994e38aef0ae50555884d287adde6641c94 ] Retrying immediately after we've received a 'transitioning' sense code is pretty much pointless, we should always use a delay before retrying. So ensure the default delay is applied before retrying. Signed-off-by: Hannes Reinecke Test

[PATCH 4.19 66/91] test_firmware: fix a memory leak bug

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit d4fddac5a51c378c5d3e68658816c37132611e1f ] In test_firmware_init(), the buffer pointed to by the global pointer 'test_fw_config' is allocated through kzalloc(). Then, the buffer is initialized in __test_firmware_config_init(). In the case that the initialization fails, the follow

[PATCH 4.14 03/69] crypto: ccp - Ignore tag length when decrypting GCM ciphertext

2019-08-14 Thread Greg Kroah-Hartman
From: Gary R Hook commit e2664ecbb2f26225ac6646876f2899558ffb2604 upstream. AES GCM input buffers for decryption contain AAD+CTEXT+TAG. Only decrypt the ciphertext, and use the tag for comparison. Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: Signed-off-by: G

[PATCH 4.14 11/69] lkdtm: support llvm-objcopy

2019-08-14 Thread Greg Kroah-Hartman
From: Nick Desaulniers commit e9e08a07385e08f1a7f85c5d1e345c21c9564963 upstream. With CONFIG_LKDTM=y and make OBJCOPY=llvm-objcopy, llvm-objcopy errors: llvm-objcopy: error: --set-section-flags=.text conflicts with --rename-section=.text=.rodata Rather than support setting flags then renaming s

[PATCH 4.14 05/69] usb: iowarrior: fix deadlock on disconnect

2019-08-14 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: op

[PATCH 4.14 10/69] Input: synaptics - enable RMI mode for HP Spectre X360

2019-08-14 Thread Greg Kroah-Hartman
From: Dmitry Torokhov commit 25f8c834e2a6871920cc1ca113f02fb301d007c3 upstream. The 2016 kabylake HP Spectre X360 (model number 13-w013dx) works much better with psmouse.synaptics_intertouch=1 kernel parameter, so let's enable RMI4 mode automatically. Bugzilla: https://bugzilla.kernel.org/show_

[PATCH 4.14 04/69] usb: usbfs: fix double-free of usb memory upon submiturb error

2019-08-14 Thread Greg Kroah-Hartman
From: Gavin Li commit c43f28dfdc4654e738aa6d3fd08a105b2bee758d upstream. Upon an error within proc_do_submiturb(), dec_usb_memory_use_count() gets called once by the error handling tail and again by free_async(). Remove the first call. Signed-off-by: Gavin Li Acked-by: Alan Stern Cc: stable

[PATCH 4.19 91/91] iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support

2019-08-14 Thread Greg Kroah-Hartman
From: Luca Coelho commit f5a47fae6aa3eb06f100e701d2342ee56b857bee upstream. We erroneously added a check for FW API version 41 before sending GEO_TX_POWER_LIMIT, but this was already implemented in version 38. Additionally, it was cherry-picked to older versions, namely 17, 26 and 29, so check f

[PATCH 4.14 08/69] mmc: cavium: Add the missing dma unmap when the dma has finished.

2019-08-14 Thread Greg Kroah-Hartman
From: Kevin Hao commit b803974a86039913d5280add083d730b2b9ed8ec upstream. This fixes the below calltrace when the CONFIG_DMA_API_DEBUG is enabled. DMA-API: thunderx_mmc :01:01.4: cpu touching an active dma mapped cacheline [cln=0x2fdf9800] WARNING: CPU: 21 PID: 1 at kernel/dma/d

[PATCH 4.14 06/69] sound: fix a memory leak bug

2019-08-14 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 fr

[PATCH 4.14 23/69] can: rcar_canfd: fix possible IRQ storm on high load

2019-08-14 Thread Greg Kroah-Hartman
From: Nikita Yushchenko commit d4b890aec4bea7334ca2ca56fd3b12fb48a00cd1 upstream. We have observed rcar_canfd driver entering IRQ storm under high load, with following scenario: - rcar_canfd_global_interrupt() in entered due to Rx available, - napi_schedule_prep() is called, and sets NAPIF_STATE

[PATCH 4.14 07/69] mmc: cavium: Set the correct dma max segment size for mmc_host

2019-08-14 Thread Greg Kroah-Hartman
From: Kevin Hao commit fa25eba6993b3750f417baabba169afaba076178 upstream. We have set the mmc_host.max_seg_size to 8M, but the dma max segment size of PCI device is set to 64K by default in function pci_device_add(). The mmc_host.max_seg_size is used to set the max segment size of the blk queue.

[PATCH 4.14 24/69] can: peak_usb: fix potential double kfree_skb()

2019-08-14 Thread Greg Kroah-Hartman
From: Stephane Grosjean commit fee6a8923ae0d318a7f7950c6c6c28a96cea099b upstream. When closing the CAN device while tx skbs are inflight, echo skb could be released twice. By calling close_candev() before unlinking all pending tx urbs, then the internal echo_skb[] array is fully and correctly cl

[PATCH 4.14 00/69] 4.14.139-stable review

2019-08-14 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.139 release. There are 69 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Fri 16 Aug 2019 04:55:34 PM UTC. Anything re

[PATCH 4.14 13/69] crypto: ccp - Add support for valid authsize values less than 16

2019-08-14 Thread Greg Kroah-Hartman
From: Gary R Hook commit 9f00baf74e4b6f79a3a3dfab44fb7bb2e797b551 upstream. AES GCM encryption allows for authsize values of 4, 8, and 12-16 bytes. Validate the requested authsize, and retain it to save in the request context. Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v

[PATCH 4.14 26/69] vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit c1ab69268d124ebdbb3864580808188ccd3ea355 ] So we don't call try to call vfio_unpin_pages() incorrectly. Fixes: 0a19e61e6d4c ("vfio: ccw: introduce channel program interfaces") Signed-off-by: Farhan Ali Reviewed-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <33a89467

[PATCH 4.14 37/69] ALSA: compress: Prevent bypasses of set_params

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 26c3f1542f5064310ad26794c09321780d00c57d ] Currently, whilst in SNDRV_PCM_STATE_OPEN it is possible to call snd_compr_stop, snd_compr_drain and snd_compr_partial_drain, which allow a transition to SNDRV_PCM_STATE_SETUP. The stream should only be able to move to the setup state on

[PATCH 4.14 28/69] netfilter: nft_hash: fix symhash with modulus one

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 28b1d6ef53e3303b90ca8924bb78f31fa527cafb ] The rule below doesn't work as the kernel raises -ERANGE. nft add rule netdev nftlb lb01 ip daddr set \ symhash mod 1 map { 0 : 192.168.0.10 } fwd to "eth0" This patch allows to use the symhash modulus with one element, in the

[PATCH 4.14 40/69] perf tools: Fix proper buffer size for feature processing

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 79b2fe5e756163897175a8f57d66b26cd9befd59 ] After Song Liu's segfault fix for pipe mode, Arnaldo reported following error: # perf record -o - | perf script 0x514 [0x1ac]: failed to process type: 80 It's caused by wrong buffer size setup in feature processing, which makes cpu

[PATCH 4.14 31/69] mac80211: dont warn about CW params when not using them

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit d2b3fe42bc629c2d4002f652b3abdfb2e72991c7 ] ieee80211_set_wmm_default() normally sets up the initial CW min/max for each queue, except that it skips doing this if the driver doesn't support ->conf_tx. We still end up calling drv_conf_tx() in some cases (e.g., ieee80211_reconfig())

[PATCH 4.14 39/69] ALSA: compress: Be more restrictive about when a drain is allowed

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 3b8179944cb0dd53e5223996966746cdc8a60657 ] Draining makes little sense in the situation of hardware overrun, as the hardware will have consumed all its available samples. Additionally, draining whilst the stream is paused would presumably get stuck as no data is being consumed on

[PATCH 4.14 32/69] hwmon: (nct6775) Fix register address and added missed tolerance for nct6106

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit f3d43e2e45fd9d44ba52d20debd12cd4ee9c89bf ] Fixed address of third NCT6106_REG_WEIGHT_DUTY_STEP, and added missed NCT6106_REG_TOLERANCE_H. Fixes: 6c009501ff200 ("hwmon: (nct6775) Add support for NCT6102D/6106D") Signed-off-by: Bjoern Gerhart Signed-off-by: Guenter Roeck Signed-

[PATCH 4.14 17/69] mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()

2019-08-14 Thread Greg Kroah-Hartman
From: Joerg Roedel commit 3f8fd02b1bf1d7ba964485a56f2f4b53ae88c167 upstream. On x86-32 with PTI enabled, parts of the kernel page-tables are not shared between processes. This can cause mappings in the vmalloc/ioremap area to persist in some page-tables after the region is unmapped and released.

[PATCH 4.14 27/69] netfilter: Fix rpfilter dropping vrf packets by mistake

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit b575b24b8eee37f10484e951b62ce2a31c579775 ] When firewalld is enabled with ipv4/ipv6 rpfilter, vrf ipv4/ipv6 packets will be dropped. Vrf device will pass through netfilter hook twice. One with enslaved device and another one with l3 master device. So in device may dismatch witch

[PATCH 4.14 16/69] x86/mm: Sync also unmappings in vmalloc_sync_all()

2019-08-14 Thread Greg Kroah-Hartman
From: Joerg Roedel commit 8e998fc24de47c55b47a887f6c95ab91acd4a720 upstream. With huge-page ioremap areas the unmappings also need to be synced between all page-tables. Otherwise it can cause data corruption when a region is unmapped and later re-used. Make the vmalloc_sync_one() function ready

[PATCH 4.14 35/69] s390/qdio: add sanity checks to the fast-requeue path

2019-08-14 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.14 18/69] perf annotate: Fix s390 gap between kernel end and module start

2019-08-14 Thread Greg Kroah-Hartman
From: Thomas Richter commit b9c0a64901d5bdec6eafd38d1dc8fa0e2974fccb upstream. During execution of command 'perf top' the error message: Not enough memory for annotating '__irf_end' symbol!) is emitted from this call sequence: __cmd_top perf_top__mmap_read perf_top__mmap_read_id

[PATCH 4.14 38/69] ALSA: compress: Dont allow paritial drain operations on capture streams

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit a70ab8a8645083f3700814e757f2940a88b7ef88 ] Partial drain and next track are intended for gapless playback and don't really have an obvious interpretation for a capture stream, so makes sense to not allow those operations on capture streams. Signed-off-by: Charles Keepax Acked-b

[PATCH 4.14 14/69] tcp: Clear sk_send_head after purging the write queue

2019-08-14 Thread Greg Kroah-Hartman
From: Ben Hutchings Denis Andzakovic discovered a potential use-after-free in older kernel versions, using syzkaller. tcp_write_queue_purge() frees all skbs in the TCP write queue and can leave sk->sk_send_head pointing to freed memory. tcp_disconnect() clears that pointer after calling tcp_wri

[PATCH 4.14 34/69] cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init()

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit e0a12445d1cb186d875410d093a00d215bec6a89 ] The cpu variable is still being used in the of_get_property() call after the of_node_put() call, which may result in use-after-free. Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") Signed-off-by: Wen Yang Ack

[PATCH 4.14 15/69] x86/mm: Check for pfn instead of page in vmalloc_sync_one()

2019-08-14 Thread Greg Kroah-Hartman
From: Joerg Roedel commit 51b75b5b563a2637f9d8dc5bd02a31b2ff9e5ea0 upstream. Do not require a struct page for the mapped memory location because it might not exist. This can happen when an ioremapped region is mapped with 2MB pages. Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capab

[PATCH 4.14 62/69] NFSv4: Only pass the delegation to setattr if were sending a truncate

2019-08-14 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 991eedb1371dc09b0f9848f59c8898fe63d198c0 upstream. Even then it isn't really necessary. The reason why we may not want to pass in a stateid in other cases is that we cannot use the delegation credential. Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hart

[PATCH 4.14 55/69] drm/i915: Fix wrong escape clock divisor init for GLK

2019-08-14 Thread Greg Kroah-Hartman
From: Stanislav Lisovskiy commit 73a0ff0b30af79bf0303d557eb82f1d1945bb6ee upstream. According to Bspec clock divisor registers in GeminiLake should be initialized by shifting 1(<<) to amount of correspondent divisor. While i915 was writing all this time that value as is. Surprisingly that it by

[PATCH 4.14 43/69] ACPI/IORT: Fix off-by-one check in iort_dev_find_its_id()

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 5a46d3f71d5e5a9f82eabc682f996f1281705ac7 ] Static analysis identified that index comparison against ITS entries in iort_dev_find_its_id() is off by one. Update the comparison condition and clarify the resulting error message. Fixes: 4bf2efd26d76 ("ACPI: Add new IORT functions t

[PATCH 4.14 61/69] smb3: send CAP_DFS capability during session setup

2019-08-14 Thread Greg Kroah-Hartman
From: Steve French commit 8d33096a460d5b9bd13300f01615df5bb454db10 upstream. We had a report of a server which did not do a DFS referral because the session setup Capabilities field was set to 0 (unlike negotiate protocol where we set CAP_DFS). Better to send it session setup in the capabilitie

[PATCH 4.14 54/69] hwmon: (nct7802) Fix wrong detection of in4 presence

2019-08-14 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 RTD

[PATCH 4.14 57/69] ALSA: hda - Dont override global PCM hw info flag

2019-08-14 Thread Greg Kroah-Hartman
From: Takashi Iwai commit c1c6c877b0c79fd7e05c931435aa42211eaeebaf upstream. The commit bfcba288b97f ("ALSA - hda: Add support for link audio time reporting") introduced the conditional PCM hw info setup, but it overwrites the global azx_pcm_hw object. This will cause a problem if any other HD-

[PATCH 4.14 51/69] HID: sony: Fix race condition between rumble and device remove.

2019-08-14 Thread Greg Kroah-Hartman
From: Roderick Colenbrander commit e0f6974a54d3f7f1b5fdf5a593bd43ce9206ec04 upstream. Valve reported a kernel crash on Ubuntu 18.04 when disconnecting a DS4 gamepad while rumble is enabled. This issue is reproducible with a frequency of 1 in 3 times in the game Borderlands 2 when using an automa

[PATCH 4.14 64/69] KVM: Fix leak vCPUs VMCS value into other pCPU

2019-08-14 Thread Greg Kroah-Hartman
From: Wanpeng Li commit 17e433b54393a6269acbcb792da97791fe1592d8 upstream. After commit d73eb57b80b (KVM: Boost vCPUs that are delivering interrupts), a five years old bug is exposed. Running ebizzy benchmark in three 80 vCPUs VMs on one 80 pCPUs Skylake server, a lot of rcu_sched stall warning

[PATCH 4.14 20/69] perf record: Fix module size on s390

2019-08-14 Thread Greg Kroah-Hartman
From: Thomas Richter commit 12a6d2940b5f02b4b9f71ce098e3bb02bc24a9ea upstream. On s390 the modules loaded in memory have the text segment located after the GOT and Relocation table. This can be seen with this output: [root@m35lp76 perf]# fgrep qeth /proc/modules qeth 151552 1 qeth_l2, Live

[PATCH 4.14 42/69] drbd: dynamically allocate shash descriptor

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 77ce56e2bfaa64127ae5e23ef136c0168b818777 ] Building with clang and KASAN, we get a warning about an overly large stack frame on 32-bit architectures: drivers/block/drbd/drbd_receiver.c:921:31: error: stack frame size of 1280 bytes in function 'conn_connect' [-Werror,-Wfra

[PATCH 4.14 58/69] ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457)

2019-08-14 Thread Greg Kroah-Hartman
From: Takashi Iwai commit c02f77d32d2c45cfb1b2bb99eabd8a78f5ecc7db upstream. A long-time problem on the recent AMD chip (X370, X470, B450, etc with PCI ID 1022:1457) with Realtek codecs is the crackled or distorted sound for capture streams, as well as occasional playback hiccups. After lengthy

[PATCH 4.14 19/69] perf db-export: Fix thread__exec_comm()

2019-08-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 3de7ae0b2a1d86dbb23d0cb135150534fdb2e836 upstream. Threads synthesized from /proc have comms with a start time of zero, and not marked as "exec". Currently, there can be 2 such comms. The first is created by processing a synthesized fork event and is set to the parent'

[PATCH 4.14 21/69] usb: host: xhci-rcar: Fix timeout in xhci_suspend()

2019-08-14 Thread Greg Kroah-Hartman
From: Yoshihiro Shimoda commit 783bda5e41acc71f98336e1a402c180f9748e5dc upstream. When a USB device is connected to the host controller and the system enters suspend, the following error happens in xhci_suspend(): xhci-hcd ee00.usb: WARN: xHC CMD_RUN timeout Since the firmware/inte

[PATCH 4.14 52/69] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices

2019-08-14 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: syzbot+d6a5a1a3657b596ef...@syzkaller.appspotmail.c

Re: [PATCH 20/22] arm64: dts: qcom: sm8150: Add pmu node to SM8150 SoC

2019-08-14 Thread Stephen Boyd
Quoting Vinod Koul (2019-08-14 05:50:10) > From: Sibi Sankar > > Add the CPU PMU on SM8150 to get perf support for hardware events. > > Signed-off-by: Sibi Sankar > Signed-off-by: Vinod Koul > --- Squash it?

[PATCH 4.14 45/69] scsi: megaraid_sas: fix panic on loading firmware crashdump

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 3b5f307ef3cb5022bfe3c8ca5b8f2114d5bf6c29 ] While loading fw crashdump in function fw_crash_buffer_show(), left bytes in one dma chunk was not checked, if copying size over it, overflow access will cause kernel panic. Signed-off-by: Junxiao Bi Acked-by: Sumit Saxena Signed-off-

[PATCH 4.14 69/69] iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support

2019-08-14 Thread Greg Kroah-Hartman
From: Luca Coelho commit f5a47fae6aa3eb06f100e701d2342ee56b857bee upstream. We erroneously added a check for FW API version 41 before sending GEO_TX_POWER_LIMIT, but this was already implemented in version 38. Additionally, it was cherry-picked to older versions, namely 17, 26 and 29, so check f

[PATCH 4.14 46/69] scsi: ibmvfc: fix WARN_ON during event pool release

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 5578257ca0e21056821e6481bd534ba267b84e58 ] While removing an ibmvfc client adapter a WARN_ON like the following WARN_ON is seen in the kernel log: WARNING: CPU: 6 PID: 5421 at ./include/linux/dma-mapping.h:541 ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc] CPU: 6 PID: 5421 Comm: rm

[PATCH 4.14 67/69] iwlwifi: mvm: fix an out-of-bound access

2019-08-14 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit ba3224db78034435e9ff0247277cce7c7bb1756c upstream. The index for the elements of the ACPI object we dereference was static. This means that if we called the function twice we wouldn't start from 3 again, but rather from the latest index we reached in the previous c

[PATCH 4.14 68/69] iwlwifi: mvm: dont send GEO_TX_POWER_LIMIT on version < 41

2019-08-14 Thread Greg Kroah-Hartman
From: Luca Coelho commit 39bd984c203e86f3109b49c2a2e20677c4d3ab65 upstream. Firmware versions before 41 don't support the GEO_TX_POWER_LIMIT command, and sending it to the firmware will cause a firmware crash. We allow this via debugfs, so we need to return an error value in case it's not suppor

[PATCH 4.14 44/69] ARM: davinci: fix sleep.S build error on ARMv4

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit d64b212ea960db4276a1d8372bd98cb861dfcbb0 ] When building a multiplatform kernel that includes armv4 support, the default target CPU does not support the blx instruction, which leads to a build failure: arch/arm/mach-davinci/sleep.S: Assembler messages: arch/arm/mach-davinci/slee

[PATCH 4.14 50/69] perf/core: Fix creating kernel counters for PMUs that override event->cpu

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 4ce54af8b33d3e21ca935fc1b89b58cbba956051 ] Some hardware PMU drivers will override perf_event.cpu inside their event_init callback. This causes a lockdep splat when initialized through the kernel API: WARNING: CPU: 0 PID: 250 at kernel/events/core.c:2917 ctx_sched_out+0x78/0x20

[PATCH 4.14 49/69] tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 952041a8639a7a3a73a2b6573cb8aa8518bc39f8 ] While reviewing rwsem down_slowpath, Will noticed ldsem had a copy of a bug we just found for rwsem. X = 0; CPU0 CPU1 rwsem_down_read() for (;;) { set_current_state(TASK_UNINTERRUPTIBLE);

[PATCH 4.14 65/69] mwifiex: fix 802.11n/WPA detection

2019-08-14 Thread Greg Kroah-Hartman
From: Brian Norris commit df612421fe2566654047769c6852ffae1a31df16 upstream. Commit 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs") adjusted the ieee_types_vendor_header struct, which inadvertently messed up the offsets used in mwifiex_is_wpa_oui_present(). Add that off

[PATCH 4.14 48/69] test_firmware: fix a memory leak bug

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit d4fddac5a51c378c5d3e68658816c37132611e1f ] In test_firmware_init(), the buffer pointed to by the global pointer 'test_fw_config' is allocated through kzalloc(). Then, the buffer is initialized in __test_firmware_config_init(). In the case that the initialization fails, the follow

[PATCH 4.14 41/69] perf probe: Avoid calling freeing routine multiple times for same pointer

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit d95daf5accf4a72005daa13fbb1d1bd8709f2861 ] When perf_add_probe_events() we call cleanup_perf_probe_events() for the pev pointer it receives, then, as part of handling this failure the main 'perf probe' goes on and calls cleanup_params() and that will again call cleanup_perf_probe

Re: [PATCH V38 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

2019-08-14 Thread Matthew Garrett
On Wed, Aug 14, 2019 at 12:25 AM Borislav Petkov wrote: > #if defined(CONFIG_RANDOMIZE_BASE) && defined(CONFIG_MEMORY_HOTREMOVE) > > false and thus not available to early code anymore. We explicitly don't want to pay attention to the acpi_rsdp kernel parameter in early boot except for the case of

[PATCH 4.14 47/69] scsi: scsi_dh_alua: always use a 2 second delay before retrying RTPG

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 20122994e38aef0ae50555884d287adde6641c94 ] Retrying immediately after we've received a 'transitioning' sense code is pretty much pointless, we should always use a delay before retrying. So ensure the default delay is applied before retrying. Signed-off-by: Hannes Reinecke Test

[PATCH 4.14 56/69] ALSA: firewire: fix a memory leak bug

2019-08-14 Thread Greg Kroah-Hartman
From: Wenwen Wang commit 1be3c1fae6c1e1f5bb982b255d2034034454527a upstream. In iso_packets_buffer_init(), 'b->packets' is allocated through kmalloc_array(). Then, the aligned packet size is checked. If it is larger than PAGE_SIZE, -EINVAL will be returned to indicate the error. However, the allo

Re: [PATCH 21/22] arm64: dts: qcom: sm8150: Add SMEM nodes

2019-08-14 Thread Stephen Boyd
Quoting Vinod Koul (2019-08-14 05:50:11) > From: Sibi Sankar > > Add the necessary dt nodes to support SMEM on SM8150 SoC. > > Signed-off-by: Sibi Sankar > Signed-off-by: Vinod Koul > --- Squash it?

[PATCH 4.14 66/69] iwlwifi: dont unmap as page memory that was mapped as single

2019-08-14 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit 87e7e25aee6b59fef740856f4e86d4b60496c9e1 upstream. In order to remember how to unmap a memory (as single or as page), we maintain a bit per Transmit Buffer (TBs) in the meta data (structure iwl_cmd_meta). We maintain a bitmap: 1 bit per TB. If the TB is set, we wil

[PATCH 4.14 59/69] mac80211: dont WARN on short WMM parameters from AP

2019-08-14 Thread Greg Kroah-Hartman
From: Brian Norris commit 05aaa5c97dce4c10a9e7eae2f1569a684e0c5ced upstream. In a very similar spirit to commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs"), an AP may not transmit a fully-formed WMM IE. For example, it may miss or repeat an Access Category. The abo

[PATCH 4.14 63/69] NFSv4: Fix an Oops in nfs4_do_setattr

2019-08-14 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 09a54f0ebfe263bc27c90bbd80187b9a93283887 upstream. If the user specifies an open mode of 3, then we don't have a NFSv4 state attached to the context, and so we Oops when we try to dereference it. Reported-by: Olga Kornievskaia Fixes: 29b59f9416937 ("NFSv4: change n

[PATCH 4.14 60/69] SMB3: Fix deadlock in validate negotiate hits reconnect

2019-08-14 Thread Greg Kroah-Hartman
From: Pavel Shilovsky commit e99c63e4d86d3a94818693147b469fa70de6f945 upstream. Currently we skip SMB2_TREE_CONNECT command when checking during reconnect because Tree Connect happens when establishing an SMB session. For SMB 3.0 protocol version the code also calls validate negotiate which resu

Re: [PATCH 22/22] arm64: dts: qcom: sm8150: Add APSS shared mailbox

2019-08-14 Thread Stephen Boyd
Quoting Vinod Koul (2019-08-14 05:50:12) > @@ -338,6 +339,16 @@ > #interrupt-cells = <2>; > }; > > + aoss_qmp: qmp@c30 { Node name of 'clock-controller', or 'power-controller'? > + compatible = "qcom,sm8150-aoss-qmp

[PATCH 4.14 36/69] ALSA: compress: Fix regression on compressed capture streams

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 4475f8c4ab7b248991a60d9c02808dbb813d6be8 ] A previous fix to the stop handling on compressed capture streams causes some knock on issues. The previous fix updated snd_compr_drain_notify to set the state back to PREPARED for capture streams. This causes some issues however as the

[PATCH 4.14 53/69] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices

2019-08-14 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: syzbot+513e4d0985298538b...@syzkaller.appspotmail.c

[PATCH 4.14 29/69] scripts/sphinx-pre-install: fix script for RHEL/CentOS

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit b308467c916aa7acc5069802ab76a9f657434701 ] There's a missing parenthesis at the script, with causes it to fail to detect non-Fedora releases (e. g. RHEL/CentOS). Tested with Centos 7.6.1810. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- scripts/sphinx-p

Re: [PATCH v4 20/22] iommu/vt-d: Add bind guest PASID support

2019-08-14 Thread Jacob Pan
On Fri, 5 Jul 2019 10:21:27 +0800 Lu Baolu wrote: > Hi Jacob, > > On 6/28/19 4:22 AM, Jacob Pan wrote: > >>> + } > >>> + refcount_set(&svm->refs, 0); > >>> + ioasid_set_data(data->hpasid, svm); > >>> + INIT_LIST_HEAD_RCU(&svm->devs); > >>> + INIT_LIST_HEAD

Re: [PATCH 18/22] arm64: dts: qcom: sm8150: Add reserved-memory regions

2019-08-14 Thread Stephen Boyd
Quoting Vinod Koul (2019-08-14 05:50:08) > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi > b/arch/arm64/boot/dts/qcom/sm8150.dtsi > index 5258b79676f6..7111e1f092f4 100644 > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi > @@ -153,6 +153,117 @@ >

Re: [PATCH] ata: ahci: Lookup PCS register offset based on PCI device ID

2019-08-14 Thread Dan Williams
On Wed, Aug 14, 2019 at 9:54 AM Stephen Douthit wrote: > > On 8/14/19 12:09 PM, Dan Williams wrote: > > On Wed, Aug 14, 2019 at 7:34 AM Stephen Douthit > > wrote: > >> > >> On 8/13/19 6:07 PM, Dan Williams wrote: > >>> On Tue, Aug 13, 2019 at 12:31 AM Christoph Hellwig > >>> wrote: > > >>>

[PATCH 4.14 12/69] crypto: ccp - Validate buffer lengths for copy operations

2019-08-14 Thread Greg Kroah-Hartman
From: Gary R Hook commit b698a9f4c5c52317db486b069190c7e3d2b97e7e upstream. The CCP driver copies data between scatter/gather lists and DMA buffers. The length of the requested copy operation must be checked against the available destination buffer length. Reported-by: Maciej S. Szmigiero Sign

[PATCH 4.14 25/69] netfilter: nfnetlink: avoid deadlock due to synchronous request_module

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 1b0890cd60829bd51455dc5ad689ed58c4408227 ] Thomas and Juliana report a deadlock when running: (rmmod nf_conntrack_netlink/xfrm_user) conntrack -e NEW -E & modprobe -v xfrm_user They provided following analysis: conntrack -e NEW -E netlink_bind() netlink_lock_t

[PATCH 4.14 30/69] iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit 94bccc34071094c165c79b515d21b63c78f7e968 ] iscsi_ibft can use ACPI to find the iBFT entry during bootup, currently, ISCSI_IBFT depends on ISCSI_IBFT_FIND which is a X86 legacy way to find the iBFT by searching through the low memory. This patch changes the dependency so that othe

[PATCH 4.14 33/69] drm: silence variable conn set but not used

2019-08-14 Thread Greg Kroah-Hartman
[ Upstream commit bbb6fc43f131f77fcb7ae8081f6d7c51396a2120 ] The "struct drm_connector" iteration cursor from "for_each_new_connector_in_state" is never used in atomic_remove_fb() which generates a compilation warning, drivers/gpu/drm/drm_framebuffer.c: In function 'atomic_remove_fb': drivers/gpu

Re: [RFC 06/19] ktf: A simple debugfs interface to test results

2019-08-14 Thread Knut Omang
On Tue, 2019-08-13 at 10:21 +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 13, 2019 at 08:09:21AM +0200, Knut Omang wrote: > > From: Alan Maguire > > > > While test results is available via netlink from user space, sometimes > > it may be useful to be able to access the results from the kernel as

[PATCH 4.14 22/69] usb: yurex: Fix use-after-free in yurex_delete

2019-08-14 Thread Greg Kroah-Hartman
From: Suzuki K Poulose commit fc05481b2fcabaaeccf63e32ac1baab54e5b6963 upstream. syzbot reported the following crash [0]: BUG: KASAN: use-after-free in usb_free_coherent+0x79/0x80 drivers/usb/core/usb.c:928 Read of size 8 at addr 8881b18599c8 by task syz-executor.4/16007 CPU: 0 PID: 16007

[PATCH 4.14 09/69] loop: set PF_MEMALLOC_NOIO for the worker thread

2019-08-14 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit d0a255e795ab976481565f6ac178314b34fbf891 upstream. A deadlock with this stacktrace was observed. The loop thread does a GFP_KERNEL allocation, it calls into dm-bufio shrinker and the shrinker depends on I/O completion in the dm-bufio subsystem. In order to fix the

Re: [PATCH 1/2] dt-bindings: clock: Document SM8150 rpmh-clock compatible

2019-08-14 Thread Stephen Boyd
Quoting Vinod Koul (2019-08-14 05:29:57) > Document the SM8150 rpmh-clock compatible for rpmh clock controller > found on SM8150 platforms. > > Signed-off-by: Vinod Koul > --- > Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >

  1   2   3   4   5   6   7   8   9   10   >