[PATCH 5.1 194/371] net: usb: asix: init MAC address buffers

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 78226f6eaac80bf30256a33a4926c194ceefdf36 ] This is for fixing bug KMSAN: uninit-value in ax88772_bind Tested by https://groups.google.com/d/msg/syzkaller-bugs/aFQurGotng4/eB_HlNhhCwAJ Reported-by: syzbot+8a3fc6674bbc3978e...@syzkaller.appspotmail.com syzbot found the following

Re: [PATCH] drivers: thermal: processor_thermal_device: Export sysfs inteface for TCC offset

2019-07-24 Thread Benjamin Berg
Tested-by: Benjamin Berg Hi, this patch allows performance improvements of some machines. It would be nice if this could still make 5.3. Benjamin On Mon, 2019-07-22 at 18:03 -0700, Srinivas Pandruvada wrote: > This change exports an interface to read tcc offset and allow writing if > the platf

[PATCH 5.1 196/371] libbpf: fix GCC8 warning for strncpy

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit cdfc7f888c2a355b01308e97c6df108f1c2b64e8 ] GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size, which is generally unsafe, as can lead to non-zero terminated string being copied. Use IFNAMSIZ - 1 as number of bytes to ensure name

[PATCH 5.1 198/371] selftests: bpf: fix inlines in test_lwt_seg6local

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 11aca65ec4db09527d3e9b6b41a0615b7da4386b ] Selftests are reporting this failure in test_lwt_seg6local.sh: + ip netns exec ns2 ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev veth2 Error fetching program/map! Failed to parse eBPF program: Operatio

[PATCH 5.1 200/371] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 3285170f28a850638794cdfe712eb6d93e51e706 ] Commit 372e722ea4dd4ca1 ("gpiolib: use descriptors internally") renamed the functions to use a "gpiod" prefix, and commit 79a9becda8940deb ("gpiolib: export descriptor-based GPIO interface") introduced the "raw" variants, but both change

[PATCH 5.1 166/371] wil6210: drop old event after wmi_call timeout

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 1a276003111c0404f6bfeffe924c5a21f482428b ] This change fixes a rare race condition of handling WMI events after wmi_call expires. wmi_recv_cmd immediately handles an event when reply_buf is defined and a wmi_call is waiting for the event. However, in case the wmi_call has alread

[PATCH 5.1 202/371] tools: bpftool: Fix json dump crash on powerpc

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit aa52bcbe0e72fac36b1862db08b9c09c4caefae3 ] Michael reported crash with by bpf program in json mode on powerpc: # bpftool prog -p dump jited id 14 [{ "name": "0xda9aa760", "insns": [{ "pc": "0x0", "operation": "nop",

[PATCH 5.1 203/371] net: hns3: enable broadcast promisc mode when initializing VF

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 2d5066fc175ea77a733d84df9ef414b34f311641 ] For revision 0x20, the broadcast promisc is enabled by firmware, it's unnecessary to enable it when initializing VF. For revision 0x21, it's necessary to enable broadcast promisc mode when initializing or re-initializing VF, otherwise,

[PATCH 5.1 167/371] EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit d8655e7630dafa88bc37f101640e39c736399771 ] Commit 9da21b1509d8 ("EDAC: Poll timeout cannot be zero, p2") assumes edac_mc_poll_msec to be unsigned long, but the type of the variable still remained as int. Setting edac_mc_poll_msec can trigger out-of-bounds write. Reproducer: #

[PATCH 5.1 204/371] Bluetooth: hci_bcsp: Fix memory leak in rx_skb

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 4ce9146e0370fcd573f0372d9b4e5a22567c ] Syzkaller found that it is possible to provoke a memory leak by never freeing rx_skb in struct bcsp_struct. Fix by freeing in bcsp_close() Signed-off-by: Tomas Bortoli Reported-by: syzbot+98162c885993b72f1...@syzkaller.appspotmail.com

[PATCH 5.1 199/371] bonding: validate ip header before check IPPROTO_IGMP

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 9d1bc24b52fb8c5d859f9a47084bf1179470e04c ] bond_xmit_roundrobin() checks for IGMP packets but it parses the IP header even before checking skb->protocol. We should validate the IP header with pskb_may_pull() before using iph->protocol. Reported-and-tested-by: syzbot+e5be16aa39a

[PATCH 5.1 201/371] ASoC: audio-graph-card: fix use-after-free in graph_for_each_link

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 1bcc1fd64e4dd903f4d868a9e053986e3b102713 ] After calling of_node_put() on the codec_ep and codec_port variables, they are still being used, which may result in use-after-free. We fix this issue by calling of_node_put() after the last usage. Fixes: fce9b90c1ab7 ("ASoC: audio-grap

[PATCH 5.1 168/371] bcache: check CACHE_SET_IO_DISABLE in allocator code

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit e775339e1ae1205b47d94881db124c11385e597c ] If CACHE_SET_IO_DISABLE of a cache set flag is set by too many I/O errors, currently allocator routines can still continue allocate space which may introduce inconsistent metadata state. This patch checkes CACHE_SET_IO_DISABLE bit in fo

[PATCH 5.1 205/371] Bluetooth: Add new 13d3:3491 QCA_ROME device

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 44d34af2e4cfd0c5357182f8b43f3e0a1fe30a2e ] Without the QCA ROME setup routine this adapter fails to establish a SCO connection. T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3

[PATCH 5.1 226/371] floppy: fix invalid pointer dereference in drive_name

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 9b04609b784027968348796a18f601aed9db3789 ] This fixes the invalid pointer dereference in the drive_name function of the floppy driver. The native_format field of the struct floppy_drive_params is used as floppy_type array index in the drive_name function. Thus, the field should

[PATCH 5.1 208/371] genirq: Update irq stats from NMI handlers

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit c09cb1293523dd786ae54a12fd88001542cba2f6 ] The NMI handlers handle_percpu_devid_fasteoi_nmi() and handle_fasteoi_nmi() do not update the interrupt counts. Due to that the NMI interrupt count does not show up correctly in /proc/interrupts. Add the statistics and treat the NMI han

[PATCH 5.1 171/371] bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush()

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit b387e9b58679c60f5b1e4313939bd4878204fc37 ] When system memory is in heavy pressure, bch_gc_thread_start() from run_cache_set() may fail due to out of memory. In such condition, c->gc_thread is assigned to -ENOMEM, not NULL pointer. Then in following failure code path bch_cache_se

[PATCH 5.1 218/371] xdp: fix race on generic receive path

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit bf0bdd1343efbbf65b4d53aef1fce14acbd79d50 ] Unlike driver mode, generic xdp receive could be triggered by different threads on different CPU cores at the same time leading to the fill and rx queue breakage. For example, this could happen while sending packets from two processes to

[PATCH 5.1 220/371] net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit f96315f2f17e7b2580d2fec7c4d6a706a131d904 ] When change MTU or other operations, which just calling .reset_notify to do HNAE3_DOWN_CLIENT and HNAE3_UP_CLIENT, then the netdev_tx_reset_queue() in the hns3_clear_all_ring() will be ignored. So the dev_watchdog() may misdiagnose a TX

[PATCH 5.1 169/371] bcache: check CACHE_SET_IO_DISABLE bit in bch_journal()

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 383ff2183ad16a8842d1fbd9dd3e1cbd66813e64 ] When too many I/O errors happen on cache set and CACHE_SET_IO_DISABLE bit is set, bch_journal() may continue to work because the journaling bkey might be still in write set yet. The caller of bch_journal() may believe the journal still w

[PATCH 5.1 223/371] libbpf: fix another GCC8 warning for strncpy

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 763ff0e7d9c72e7094b31e7fb84a859be9325635 ] Similar issue was fixed in cdfc7f888c2a ("libbpf: fix GCC8 warning for strncpy") already. This one was missed. Fixing now. Cc: Magnus Karlsson Signed-off-by: Andrii Nakryiko Acked-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov

[PATCH 5.1 224/371] floppy: fix div-by-zero in setup_format_params

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit f3554aeb991214cbfafd17d55e2bfddb50282e32 ] This fixes a divide by zero error in the setup_format_params function of the floppy driver. Two consecutive ioctls can trigger the bug: The first one should set the drive geometry with such .sect and .rate values for the F_SECT_PER_TRAC

[PATCH 5.1 170/371] bcache: acquire bch_register_lock later in cached_dev_free()

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 80265d8dfd77792e133793cef44a21323aac2908 ] When enable lockdep engine, a lockdep warning can be observed when reboot or shutdown system, [ 3142.764557][T1] bcache: bcache_reboot() Stopping all devices: [ 3142.776265][ T2649] [ 3142.777159][ T2649] ===

[PATCH 5.1 217/371] gtp: fix use-after-free in gtp_newlink()

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit a2bed90704c68d3763bf24decb1b781a45395de8 ] Current gtp_newlink() could be called after unregister_pernet_subsys(). gtp_newlink() uses gtp_net but it can be destroyed by unregister_pernet_subsys(). So unregister_pernet_subsys() should be called after rtnl_link_unregister(). Test

[PATCH 5.1 221/371] iavf: fix dereference of null rx_buffer pointer

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 9fe06a51287b2d41baef7ece94df34b5abf19b90 ] A recent commit efa14c3985828d ("iavf: allow null RX descriptors") added a null pointer sanity check on rx_buffer, however, rx_buffer is being dereferenced before that check, which implies a null pointer dereference bug can potentially o

[PATCH 5.1 216/371] gtp: fix use-after-free in gtp_encap_destroy()

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 1788b8569f5de27da09087fa3f6580d2aa04cc75 ] gtp_encap_destroy() is called twice. 1. When interface is deleted. 2. When udp socket is destroyed. either gtp->sk0 or gtp->sk1u could be freed by sock_put() in gtp_encap_destroy(). so, when gtp_encap_destroy() is called again, it would

[PATCH 5.1 234/371] scsi: zfcp: fix request object use-after-free in send path causing seqno errors

2019-07-24 Thread Greg Kroah-Hartman
From: Benjamin Block commit b76becde2b84137faa29bbc9a3b20953b5980e48 upstream. With a recent change to our send path for FSF commands we introduced a possible use-after-free of request-objects, that might further lead to zfcp crafting bad requests, which the FCP channel correctly complains about

[PATCH 5.1 228/371] xen: let alloc_xenballooned_pages() fail if not enough memory free

2019-07-24 Thread Greg Kroah-Hartman
From: Juergen Gross commit a1078e821b605813b63bf6bca414a85f804d5c66 upstream. Instead of trying to allocate pages with GFP_USER in add_ballooned_pages() check the available free memory via si_mem_available(). GFP_USER is far less limiting memory exhaustion than the test via si_mem_available().

[PATCH 5.1 231/371] Revert "scsi: ncr5380: Increase register polling limit"

2019-07-24 Thread Greg Kroah-Hartman
From: Finn Thain commit 25fcf94a2fa89dd3e73e965ebb0b38a2a4f72aa4 upstream. This reverts commit 4822827a69d7cd3bc5a07b7637484ebd2cf88db6. The purpose of that commit was to suppress a timeout warning message which appeared to be caused by target latency. But suppressing the warning is undesirable

[PATCH 5.1 238/371] scsi: mac_scsi: Fix pseudo DMA implementation, take 2

2019-07-24 Thread Greg Kroah-Hartman
From: Finn Thain commit 78ff751f8e6a9446e9fb26b2bff0b8d3f8974cbd upstream. A system bus error during a PDMA transfer can mess up the calculation of the transfer residual (the PDMA handshaking hardware lacks a byte counter). This results in data corruption. The algorithm in this patch anticipate

[PATCH 5.1 243/371] crypto: arm64/sha2-ce - correct digest for empty data in finup

2019-07-24 Thread Greg Kroah-Hartman
From: Elena Petrova commit 6bd934de1e393466b319d29c4427598fda096c57 upstream. The sha256-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: the actual digest, result: initial value of SHA internal state. The error is in sha256_ce_finup: for empty data `fin

[PATCH 5.1 241/371] crypto: ccp - Validate the the error value used to index error messages

2019-07-24 Thread Greg Kroah-Hartman
From: Hook, Gary commit 52393d617af7b554f03531e6756facf2ea687d2e upstream. The error code read from the queue status register is only 6 bits wide, but we need to verify its value is within range before indexing the error messages. Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-re

[PATCH 5.1 235/371] scsi: zfcp: fix request object use-after-free in send path causing wrong traces

2019-07-24 Thread Greg Kroah-Hartman
From: Benjamin Block commit 106d45f350c7cac876844dc685845cba4ffdb70b upstream. When tracing instances where we open and close WKA ports, we also pass the request-ID of the respective FSF command. But after successfully sending the FSF command we must not use the request-object anymore, as this

[PATCH 5.1 245/371] crypto: crypto4xx - fix AES CTR blocksize value

2019-07-24 Thread Greg Kroah-Hartman
From: Christian Lamparter commit bfa2ba7d9e6b20aca82b99e6842fe18842ae3a0f upstream. This patch fixes a issue with crypto4xx's ctr(aes) that was discovered by libcapi's kcapi-enc-test.sh test. The some of the ctr(aes) encryptions test were failing on the non-power-of-two test: kcapi-enc - Error

[PATCH 5.1 244/371] crypto: chacha20poly1305 - fix atomic sleep when using async algorithm

2019-07-24 Thread Greg Kroah-Hartman
From: Eric Biggers commit 7545b6c2087f4ef0287c8c9b7eba6a728c67ff8e upstream. Clear the CRYPTO_TFM_REQ_MAY_SLEEP flag when the chacha20poly1305 operation is being continued from an async completion callback, since sleeping may not be allowed in that context. This is basically the same bug that w

[PATCH 5.1 240/371] crypto: caam - limit output IV to CBC to work around CTR mode DMA issue

2019-07-24 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b upstream. The CAAM driver currently violates an undocumented and slightly controversial requirement imposed by the crypto stack that a buffer referred to by the request structure via its virtual address may not be modified whil

[PATCH 5.1 246/371] crypto: crypto4xx - fix blocksize for cfb and ofb

2019-07-24 Thread Greg Kroah-Hartman
From: Christian Lamparter commit 70c4997f34b6c6888b3ac157adec49e01d0df2d5 upstream. While the hardware consider them to be blockciphers, the reference implementation defines them as streamciphers. Do the right thing and set the blocksize to 1. This was found by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS

[PATCH 5.1 236/371] scsi: megaraid_sas: Fix calculation of target ID

2019-07-24 Thread Greg Kroah-Hartman
From: Shivasharan S commit c8f96df5b8e633056b7ebf5d52a9d6fb1b156ce3 upstream. In megasas_get_target_prop(), driver is incorrectly calculating the target ID for devices with channel 1 and 3. Due to this, firmware will either fail the command (if there is no device with the target id sent from dr

[PATCH 5.1 213/371] Bluetooth: validate BLE connection interval updates

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit c49a8682fc5d298d44e8d911f4fa14690ea9485e ] Problem: The Linux Bluetooth stack yields complete control over the BLE connection interval to the remote device. The Linux Bluetooth stack provides access to the BLE connection interval min and max values through /sys/kernel/debug/blue

[PATCH 5.1 269/371] iwlwifi: add support for hr1 RF ID

2019-07-24 Thread Greg Kroah-Hartman
From: Oren Givon commit 498d3eb5bfbb2e05e40005152976a7b9eadfb59c upstream. The 22000 series FW that was meant to be used with hr is also the FW that is used for hr1 and has a different RF ID. Add support to load the hr FW when hr1 RF ID is detected. Cc: sta...@vger.kernel.org # 5.1+ Signed-off-

[PATCH v2] drm/panel: check failure cases in the probe func

2019-07-24 Thread Navid Emamdoost
The following function calls may fail and return NULL, so the null check is added. of_graph_get_next_endpoint of_graph_get_remote_port_parent of_graph_get_remote_port Update: Thanks to Sam Ravnborg, for suggession on the use of goto to avoid leaking endpoint. Signed-off-by: Navid Emamdoost ---

[PATCH 5.1 162/371] ixgbe: Check DDM existence in transceiver before access

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 655c91414579d7bb115a4f7898ee726fc18e0984 ] Some transceivers may comply with SFF-8472 but not implement the Digital Diagnostic Monitoring (DDM) interface described in it. The existence of such area is specified by bit 6 of byte 92, set to 1 if implemented. Currently, due to not

[PATCH 5.1 261/371] bcache: destroy dc->writeback_write_wq if failed to create dc->writeback_thread

2019-07-24 Thread Greg Kroah-Hartman
From: Coly Li commit f54d801dda14942dbefa00541d10603015b7859c upstream. Commit 9baf30972b55 ("bcache: fix for gc and write-back race") added a new work queue dc->writeback_write_wq, but forgot to destroy it in the error condition when creating dc->writeback_thread failed. This patch destroys dc

[PATCH 5.1 264/371] Input: synaptics - whitelist Lenovo T580 SMBus intertouch

2019-07-24 Thread Greg Kroah-Hartman
From: Nick Black commit 1976d7d200c5a32e72293a2ada36b7b7c9d6dd6e upstream. Adds the Lenovo T580 to the SMBus intertouch list for Synaptics touchpads. I've tested with this for a week now, and it seems a great improvement. It's also nice to have the complaint gone from dmesg. Signed-off-by: Nick

[PATCH 5.1 215/371] gtp: fix Illegal context switch in RCU read-side critical section.

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 3f167e1921865b379a9becf03828e7202c7b4917 ] ipv4_pdp_add() is called in RCU read-side critical section. So GFP_KERNEL should not be used in the function. This patch make ipv4_pdp_add() to use GFP_ATOMIC instead of GFP_KERNEL. Test commands: gtp-link add gtp1 & gtp-tunnel add gtp1

[PATCH 5.1 206/371] Bluetooth: Add new 13d3:3501 QCA_ROME device

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit 881cec4f6b4da78e54b73c046a60f39315964c7d ] Without the QCA ROME setup routine this adapter fails to establish a SCO connection. T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3

[PATCH 5.1 207/371] Bluetooth: 6lowpan: search for destination address in all peers

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit b188b03270b7f8568fc714101ce82fbf5e811c5a ] Handle overlooked case where the target address is assigned to a peer and neither route nor gateway exist. For one peer, no checks are performed to see if it is meant to receive packets for a given address. As soon as there is a second

[PATCH 5.1 214/371] gtp: fix suspicious RCU usage

2019-07-24 Thread Greg Kroah-Hartman
[ Upstream commit e198987e7dd7d3645a53875151cd6f8fc425b706 ] gtp_encap_enable_socket() and gtp_encap_destroy() are not protected by rcu_read_lock(). and it's not safe to write sk->sk_user_data. This patch make these functions to use lock_sock() instead of rcu_dereference_sk_user_data(). Test comm

[PATCH 5.1 273/371] iwlwifi: fix RF-Kill interrupt while FW load for gen2 devices

2019-07-24 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit ed3e4c6d3cd8f093a3636cb05492429fe2af228d upstream. Newest devices have a new firmware load mechanism. This mechanism is called the context info. It means that the driver doesn't need to load the sections of the firmware. The driver rather prepares a place in DRAM,

[PATCH 5.1 276/371] opp: Dont use IS_ERR on invalid supplies

2019-07-24 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit 560d1bcad715c215e7ffe5d7cffe045974b623d0 upstream. _set_opp_custom() receives a set of OPP supplies as its arguments and the caller of it passes NULL when the supplies are not valid. But _set_opp_custom(), by mistake, checks for error by performing IS_ERR(old_supply)

[PATCH 5.1 271/371] iwlwifi: pcie: fix ALIVE interrupt handling for gen2 devices w/o MSI-X

2019-07-24 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit ec46ae30245ecb41d73f8254613db07c653fb498 upstream. We added code to restock the buffer upon ALIVE interrupt when MSI-X is disabled. This was added as part of the context info code. This code was added only if the ISR debug level is set which is very unlikely to be

Re: [PATCH] ARM: dts: rockchip: Limit WiFi TX power on rk3288-veyron-jerry

2019-07-24 Thread Doug Anderson
Hi, On Tue, Jul 23, 2019 at 3:53 PM Matthias Kaehlcke wrote: > > The downstream Chrome OS 3.14 kernel for jerry limits WiFi TX power > through calibration data in the device tree [1]. Add a DT node for > the WiFi chip and use the downstream calibration data. > > Not all calibration data entries h

[PATCH 5.1 274/371] iwlwifi: mvm: delay GTK setting in FW in AP mode

2019-07-24 Thread Greg Kroah-Hartman
From: Johannes Berg commit c56e00a3feaee2b46b7d33875fb7f52efd30241f upstream. In AP (and IBSS) mode, we can only set GTKs to firmware after we have sent down the multicast station, but this we can only do after we've enabled beaconing, etc. However, during rfkill exit, hostapd will configure th

[PATCH 5.1 281/371] pnfs: Fix a problem where we gratuitously start doing I/O through the MDS

2019-07-24 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 58bbeab425c6c5e318f5b6ae31d351331ddfb34b upstream. If the client has to stop in pnfs_update_layout() to wait for another layoutget to complete, it currently exits and defaults to I/O through the MDS if the layoutget was successful. Fixes: d03360aaf5cc ("pNFS: Ensure

[PATCH 5.1 286/371] raid5-cache: Need to do start() part job after adding journal device

2019-07-24 Thread Greg Kroah-Hartman
From: Xiao Ni commit d9771f5ec46c282d518b453c793635dbdc3a2a94 upstream. commit d5d885fd514f ("md: introduce new personality funciton start()") splits the init job to two parts. The first part run() does the jobs that do not require the md threads. The second part start() does the jobs that requi

Re: [PATCH] can: ti_hecc: use timestamp based rx-offloading

2019-07-24 Thread Saeed Mahameed
On Mon, 2019-04-29 at 12:03 +, Jeroen Hofstee wrote: > As already mentioned in [1] and included in [2], there is an off by > one > issue since the high bank is already enabled when the _next_ mailbox > to > be read has index 12, so the mailbox being read was 13. The message > can > therefore go

[PATCH 5.1 280/371] pnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error

2019-07-24 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 8e04fdfadda75a849c649f7e50fe7d97772e1fcb upstream. mirror->mirror_ds can be NULL if uninitialised, but can contain a PTR_ERR() if call to GETDEVICEINFO failed. Fixes: 65990d1afbd2 ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET") Signed-off-by: Trond Myklebust Cc: st

[PATCH 5.1 277/371] arm64: Fix interrupt tracing in the presence of NMIs

2019-07-24 Thread Greg Kroah-Hartman
From: Julien Thierry commit 17ce302f3117e9518395847a3120c8a108b587b8 upstream. In the presence of any form of instrumentation, nmi_enter() should be done before calling any traceable code and any instrumentation code. Currently, nmi_enter() is done in handle_domain_nmi(), which is much too late

[PATCH 5.1 282/371] SUNRPC: Ensure the bvecs are reset when we re-encode the RPC request

2019-07-24 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 75369089820473eac45e9ddd970081901a373c08 upstream. The bvec tracks the list of pages, so if the number of pages changes due to a re-encode, we need to reset the bvec as well. Fixes: 277e4ab7d530 ("SUNRPC: Simplify TCP receive code by switching...") Signed-off-by: Tr

[PATCH 5.1 254/371] cifs: flush before set-info if we have writeable handles

2019-07-24 Thread Greg Kroah-Hartman
From: Ronnie Sahlberg commit aa081859b10c5d8b19f5c525c78883a59d73c2b8 upstream. Servers can defer destaging any data and updating the mtime until close(). This means that if we do a setinfo to modify the mtime while other handles are open for write the server may overwrite our setinfo timestamps

[PATCH 5.1 279/371] Revert "NFS: readdirplus optimization by cache mechanism" (memleak)

2019-07-24 Thread Greg Kroah-Hartman
From: Max Kellermann commit db531db951f950b86d274cc8ed7b21b9e2240036 upstream. This reverts commit be4c2d4723a4a637f0d1b4f7c66447141a4b3564. That commit caused a severe memory leak in nfs_readdir_make_qstr(). When listing a directory with more than 100 files (this is how many struct nfs_cache_

[PATCH 5.1 294/371] media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom()

2019-07-24 Thread Greg Kroah-Hartman
From: Boris Brezillon commit 07d89227a983df957a6a7c56f7c040cde9ac571f upstream. cfg->type can be overridden by v4l2_ctrl_fill() and the new value is stored in the local type var. Fix the tests to use this local var. Fixes: 0996517cf8ea ("V4L/DVB: v4l2: Add new control handling framework") Cc:

[PATCH 5.1 293/371] ceph: fix end offset in truncate_inode_pages_range call

2019-07-24 Thread Greg Kroah-Hartman
From: Luis Henriques commit d31d07b97a5e76f41e00eb81dcca740e84aa7782 upstream. Commit e450f4d1a5d6 ("ceph: pass inclusive lend parameter to filemap_write_and_wait_range()") fixed the end offset parameter used to call filemap_write_and_wait_range and invalidate_inode_pages2_range. Unfortunately i

[PATCH 5.1 258/371] bcache: Revert "bcache: free heap cache_set->flush_btree in bch_journal_free"

2019-07-24 Thread Greg Kroah-Hartman
From: Coly Li commit ba82c1ac1667d6efb91a268edb13fc9cdaecec9b upstream. This reverts commit 6268dc2c4703aabfb0b35681be709acf4c2826c6. This patch depends on commit c4dc2497d50d ("bcache: fix high CPU occupancy during journal") which is reverted in previous patch. So revert this one too. Fixes:

[PATCH 5.1 306/371] arm64: tegra: Fix AGIC register range

2019-07-24 Thread Greg Kroah-Hartman
From: Jon Hunter commit ba24eee6686f6ed3738602b54d959253316a9541 upstream. The Tegra AGIC interrupt controller is an ARM GIC400 interrupt controller. Per the ARM GIC device-tree binding, the first address region is for the GIC distributor registers and the second address region is for the GIC CP

[PATCH 5.1 251/371] cifs: always add credits back for unsolicited PDUs

2019-07-24 Thread Greg Kroah-Hartman
From: Ronnie Sahlberg commit 3e2725796cbdfe4efc7eb7b27cacaeac2ddad1a5 upstream. not just if CONFIG_CIFS_DEBUG2 is enabled. Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/connect.c |2 +-

[PATCH 5.1 309/371] signal: Correct namespace fixups of si_pid and si_uid

2019-07-24 Thread Greg Kroah-Hartman
From: Eric W. Biederman commit 7a0cf094944e2540758b7f957eb6846d5126f535 upstream. The function send_signal was split from __send_signal so that it would be possible to bypass the namespace logic based upon current[1]. As it turns out the si_pid and the si_uid fixup are both inappropriate in the

[PATCH 5.1 308/371] signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio

2019-07-24 Thread Greg Kroah-Hartman
From: Eric W. Biederman commit 70f1b0d34bdf03065fe869e93cc17cad1ea20c4a upstream. The usb support for asyncio encoded one of it's values in the wrong field. It should have used si_value but instead used si_addr which is not present in the _rt union member of struct siginfo. The practical resul

[PATCH 5.1 312/371] kconfig: fix missing choice values in auto.conf

2019-07-24 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit 8e2442a5f86e1f77b86401fce274a7f622740bc4 upstream. Since commit 00c864f8903d ("kconfig: allow all config targets to write auto.conf if missing"), Kconfig creates include/config/auto.conf in the defconfig stage when it is missing. Joonas Kylmälä reported incorrect au

[PATCH v10 5/5] overlayfs: override_creds=off option bypass creator_cred

2019-07-24 Thread Mark Salyzyn
By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of t

[PATCH 5.1 310/371] fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.

2019-07-24 Thread Greg Kroah-Hartman
From: Radoslaw Burny commit 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf upstream. Normally, the inode's i_uid/i_gid are translated relative to s_user_ns, but this is not a correct behavior for proc. Since sysctl permission check in test_perm is done against GLOBAL_ROOT_[UG]ID, it makes more sense

Re: [PATCH 5.3] mwifiex: fix 802.11n/WPA detection

2019-07-24 Thread Guenter Roeck
On 7/24/19 12:46 PM, Brian Norris wrote: 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 offset back in, mirroring mwifiex_is_rsn

[PATCH 5.1 316/371] dm zoned: fix zone state management race

2019-07-24 Thread Greg Kroah-Hartman
From: Damien Le Moal commit 3b8cafdd5436f9298b3bf6eb831df5eef5ee82b6 upstream. dm-zoned uses the zone flag DMZ_ACTIVE to indicate that a zone of the backend device is being actively read or written and so cannot be reclaimed. This flag is set as long as the zone atomic reference counter is not 0

[PATCH 5.1 314/371] drm/nouveau/i2c: Enable i2c pads & busses during preinit

2019-07-24 Thread Greg Kroah-Hartman
From: Lyude Paul commit 7cb95eeea6706c790571042a06782e378b2561ea upstream. It turns out that while disabling i2c bus access from software when the GPU is suspended was a step in the right direction with: commit 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after ->fini()") We also end

[PATCH 5.1 324/371] perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs

2019-07-24 Thread Greg Kroah-Hartman
From: Kim Phillips commit 2f217d58a8a086d3399fecce39fb358848e799c4 upstream. Fill in the L3 performance event select register ThreadMask bitfield, to enable per hardware thread accounting. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnal

[PATCH 5.1 323/371] perf/x86/amd/uncore: Do not set ThreadMask and SliceMask for non-L3 PMCs

2019-07-24 Thread Greg Kroah-Hartman
From: Kim Phillips commit 16f4641166b10e199f0d7b68c2c5f004fef0bda3 upstream. The following commit: d7cbbe49a930 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events") enables L3 PMC events for all threads and slices by writing 1's in 'ChL3PmcCfg' (L3 PMC PERF_CTL) re

[PATCH 5.1 313/371] ARM: dts: gemini: Set DIR-685 SPI CS as active low

2019-07-24 Thread Greg Kroah-Hartman
From: Linus Walleij commit f90b8fda3a9d72a9422ea80ae95843697f94ea4a upstream. The SPI to the display on the DIR-685 is active low, we were just saved by the SPI library enforcing active low on everything before, so set it as active low to avoid ambiguity. Link: https://lore.kernel.org/r/2019071

[PATCH 5.1 317/371] xen/events: fix binding user event channels to cpus

2019-07-24 Thread Greg Kroah-Hartman
From: Juergen Gross commit bce5963bcb4f9934faa52be323994511d59fd13c upstream. When binding an interdomain event channel to a vcpu via IOCTL_EVTCHN_BIND_INTERDOMAIN not only the event channel needs to be bound, but the affinity of the associated IRQi must be changed, too. Otherwise the IRQ and th

[PATCH 5.1 298/371] KVM: nVMX: Dont dump VMCS if virtual APIC page cant be mapped

2019-07-24 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 73cb85568433feadb79e963bf2efba9b3e9ae3df upstream. ... as a malicious userspace can run a toy guest to generate invalid virtual-APIC page addresses in L1, i.e. flood the kernel log with error messages. Fixes: 690908104e39d ("KVM: nVMX: allow tests to use bad vir

[PATCH 5.1 315/371] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs

2019-07-24 Thread Greg Kroah-Hartman
From: Daniel Jordan commit cf144f81a99d1a3928f90b0936accfd3f45c9a0a upstream. Testing padata with the tcrypt module on a 5.2 kernel... # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 ...produces this splat: INFO: task modprobe:10075 blocke

[PATCH 5.1 299/371] KVM: nVMX: Always sync GUEST_BNDCFGS when it comes from vmcs01

2019-07-24 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 3b013a2972d5bc344d6eaa8f24fdfe268211e45f upstream. If L1 does not set VM_ENTRY_LOAD_BNDCFGS, then L1's BNDCFGS value must be propagated to vmcs02 since KVM always runs with VM_ENTRY_LOAD_BNDCFGS when MPX is supported. Because the value effectively comes from vmc

[PATCH 5.1 330/371] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-07-24 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 4df591b20b80cb77920953812d894db259d85bd7 upstream. Fix a use-after-free in hv_eject_device_work(). Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in hv_eject_device_work()") Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Cc: s

[PATCH 5.1 331/371] PCI: Do not poll for PME if the device is in D3cold

2019-07-24 Thread Greg Kroah-Hartman
From: Mika Westerberg commit 000dd5316e1c756a1c028f22e01d06a38249dd4d upstream. PME polling does not take into account that a device that is directly connected to the host bridge may go into D3cold as well. This leads to a situation where the PME poll thread reads from a config space of a device

[PATCH 5.1 333/371] Btrfs: fix data loss after inode eviction, renaming it, and fsync it

2019-07-24 Thread Greg Kroah-Hartman
From: Filipe Manana commit d1d832a0b51dd9570429bb4b81b2a6c1759e681a upstream. When we log an inode, regardless of logging it completely or only that it exists, we always update it as logged (logged_trans and last_log_commit fields of the inode are updated). This is generally fine and avoids futu

[PATCH 5.1 319/371] 9p/virtio: Add cleanup path in p9_virtio_init

2019-07-24 Thread Greg Kroah-Hartman
From: YueHaibing commit d4548543fc4ece56c6f04b8586f435fb4fd84c20 upstream. KASAN report this: BUG: unable to handle kernel paging request at a0097000 PGD 3870067 P4D 3870067 PUD 3871063 PMD 2326e2067 PTE 0 Oops: [#1 CPU: 0 PID: 5340 Comm: modprobe Not tainted 5.1.0-rc7+ #25 Hardwar

[PATCH 5.1 337/371] HID: wacom: generic: only switch the mode on devices with LEDs

2019-07-24 Thread Greg Kroah-Hartman
From: Aaron Armstrong Skomra commit d8e9806005f28bbb49899dab2068e3359e22ba35 upstream. Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the ke

[PATCH 5.1 301/371] KVM: VMX: check CPUID before allowing read/write of IA32_XSS

2019-07-24 Thread Greg Kroah-Hartman
From: Wanpeng Li commit 4d763b168e9c5c366b05812c7bba7662e5ea3669 upstream. Raise #GP when guest read/write IA32_XSS, but the CPUID bits say that it shouldn't exist. Fixes: 203000993de5 (kvm: vmx: add MSR logic for XSAVES) Reported-by: Xiaoyao Li Reported-by: Tao Xu Cc: Paolo Bonzini Cc: Radi

[PATCH 5.1 335/371] Btrfs: add missing inode version, ctime and mtime updates when punching hole

2019-07-24 Thread Greg Kroah-Hartman
From: Filipe Manana commit 179006688a7e888cbff39577189f2e034786d06a upstream. If the range for which we are punching a hole covers only part of a page, we end up updating the inode item but we skip the update of the inode's iversion, mtime and ctime. Fix that by ensuring we update those properti

[PATCH 5.1 336/371] IB/mlx5: Report correctly tag matching rendezvous capability

2019-07-24 Thread Greg Kroah-Hartman
From: Danit Goldberg commit 89705e92700170888236555fe91b45e4c1bb0985 upstream. Userspace expects the IB_TM_CAP_RC bit to indicate that the device supports RC transport tag matching with rendezvous offload. However the firmware splits this into two capabilities for eager and rendezvous tag matchi

[PATCH 5.1 296/371] media: videobuf2-core: Prevent size alignment wrapping buffer size to 0

2019-07-24 Thread Greg Kroah-Hartman
From: Sakari Ailus commit defcdc5d89ced780fb45196d539d6570ec5b1ba5 upstream. PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by checking that the aligned value is not smaller than the unaligned one. Note on backporting to stable: the file used to be under drivers/media/v4l2-core

[PATCH 5.1 304/371] KVM: PPC: Book3S HV: Fix CR0 setting in TM emulation

2019-07-24 Thread Greg Kroah-Hartman
From: Michael Neuling commit 3fefd1cd95df04da67c83c1cb93b663f04b3324f upstream. When emulating tsr, treclaim and trechkpt, we incorrectly set CR0. The code currently sets: CR0 <- 00 || MSR[TS] but according to the ISA it should be: CR0 <- 0 || MSR[TS] || 0 This fixes the bit shift to p

[PATCH 5.1 303/371] KVM: PPC: Book3S HV: Clear pending decrementer exceptions on nested guest entry

2019-07-24 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit 3c25ab35fbc8526ac0c9b298e8a78e7ad7a55479 upstream. If we enter an L1 guest with a pending decrementer exception then this is cleared on guest exit if the guest has writtien a positive value into the decrementer (indicating that it handled the decrementer excepti

[PATCH 5.1 341/371] libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields

2019-07-24 Thread Greg Kroah-Hartman
From: Dan Williams commit 7e3e888dfc138089f4c15a81b418e88f0978f744 upstream. At namespace creation time there is the potential for the "expected to be zero" fields of a 'pfn' info-block to be filled with indeterminate data. While the kernel buffer is zeroed on allocation it is immediately overw

[PATCH 5.1 302/371] KVM: PPC: Book3S HV: Signed extend decrementer value if not using large decrementer

2019-07-24 Thread Greg Kroah-Hartman
From: Suraj Jitindar Singh commit 869537709ebf1dc865e75c3fc97b23f8acf37c16 upstream. On POWER9 the decrementer can operate in large decrementer mode where the decrementer is 56 bits and signed extended to 64 bits. When not operating in this mode the decrementer behaves as a 32 bit decrementer wh

[PATCH 5.1 358/371] mtd: rawnand: mtk: Correct low level time calculation of r/w cycle

2019-07-24 Thread Greg Kroah-Hartman
From: Xiaolei Li commit e1884ffddacc0424d7e785e6f8087bd12f7196db upstream. At present, the flow of calculating AC timing of read/write cycle in SDR mode is that: At first, calculate high hold time which is valid for both read and write cycle using the max value between tREH_min and tWH_min. Seco

[PATCH 5.1 354/371] powerpc/pseries: Fix xive=off command line

2019-07-24 Thread Greg Kroah-Hartman
From: Greg Kurz commit a3bf9fbdad600b1e4335dd90979f8d6072e4f602 upstream. On POWER9, if the hypervisor supports XIVE exploitation mode, the guest OS will unconditionally requests for the XIVE interrupt mode even if XIVE was deactivated with the kernel command line xive=off. Later on, when the sp

[PATCH 5.1 353/371] powerpc/powernv: Fix stale iommu table base after VFIO

2019-07-24 Thread Greg Kroah-Hartman
From: Alexey Kardashevskiy commit 5636427d087a55842c1a199dfb839e6545d30e5d upstream. The powernv platform uses @dma_iommu_ops for non-bypass DMA. These ops need an iommu_table pointer which is stored in dev->archdata.iommu_table_base. It is initialized during pcibios_setup_device() which handles

[PATCH 5.1 356/371] mmc: sdhci-msm: fix mutex while in spinlock

2019-07-24 Thread Greg Kroah-Hartman
From: Jorge Ramirez-Ortiz commit 5e6b6651d22de109ebf48ca00d0373bc2c0cc080 upstream. mutexes can sleep and therefore should not be taken while holding a spinlock. move clk_get_rate (can sleep) outside the spinlock protected region. Fixes: 83736352e0ca ("mmc: sdhci-msm: Update DLL reset sequence"

[PATCH 5.1 357/371] eCryptfs: fix a couple type promotion bugs

2019-07-24 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 0bdf8a8245fdea6f075a5fede833a5fcf1b3466c upstream. ECRYPTFS_SIZE_AND_MARKER_BYTES is type size_t, so if "rc" is negative that gets type promoted to a high positive value and treated as success. Fixes: 778aeb42a708 ("eCryptfs: Cleanup and optimize ecryptfs_lookup_inte

[PATCH 5.1 342/371] coda: pass the host file in vma->vm_file on mmap

2019-07-24 Thread Greg Kroah-Hartman
From: Jan Harkes commit 7fa0a1da3dadfd9216df7745a1331fdaa0940d1c upstream. Patch series "Coda updates". The following patch series is a collection of various fixes for Coda, most of which were collected from linux-fsdevel or linux-kernel but which have as yet not found their way upstream. This

  1   2   3   4   5   6   7   8   9   10   >