[PATCH AUTOSEL 4.9 16/73] xfrm: Fix xfrm sel prefix length validation

2019-07-15 Thread Sasha Levin
From: Anirudh Gupta [ Upstream commit b38ff4075a80b4da5cb2202d7965332ca0efb213 ] Family of src/dst can be different from family of selector src/dst. Use xfrm selector family to validate address prefix length, while verifying new sa from userspace. Validated patch with this command: ip xfrm

[PATCH AUTOSEL 4.9 19/73] media: mc-device.c: don't memset __user pointer contents

2019-07-15 Thread Sasha Levin
From: Hans Verkuil [ Upstream commit 518fa4e0e0da97ea2e17c95ab57647ce748a96e2 ] You can't memset the contents of a __user pointer. Instead, call copy_to_user to copy links.reserved (which is zeroed) to the user memory. This fixes this sparse warning: SPARSE:drivers/media/mc/mc-device.c

[PATCH 8/9] acpi: Use built-in RCU list checking for acpi_ioremaps list (v1)

2019-07-15 Thread Joel Fernandes (Google)
list_for_each_entry_rcu has built-in RCU and lock checking. Make use of it for acpi_ioremaps list traversal. Signed-off-by: Joel Fernandes (Google) --- drivers/acpi/osl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index

[PATCH 2/9] rcu: Add support for consolidated-RCU reader checking (v3)

2019-07-15 Thread Joel Fernandes (Google)
This patch adds support for checking RCU reader sections in list traversal macros. Optionally, if the list macro is called under SRCU or other lock/mutex protection, then appropriate lockdep expressions can be passed to make the checks pass. Existing list_for_each_entry_rcu() invocations don't

[PATCH AUTOSEL 4.9 22/73] crypto: talitos - properly handle split ICV.

2019-07-15 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eae55a586c3c8b50982bad3c3426e9c9dd7a0075 ] The driver assumes that the ICV is as a single piece in the last element of the scatterlist. This assumption is wrong. This patch ensures that the ICV is properly handled regardless of the scatterlist layout.

[PATCH AUTOSEL 4.9 33/73] gpio: omap: fix lack of irqstatus_raw0 for OMAP4

2019-07-15 Thread Sasha Levin
From: Russell King [ Upstream commit 64ea3e9094a1f13b96c33244a3fb3a0f45690bd2 ] Commit 384ebe1c2849 ("gpio/omap: Add DT support to GPIO driver") added the register definition tables to the gpio-omap driver. Subsequently to that commit, commit 4e962e8998cc ("gpio/omap: remove cpu_is_omap()

[PATCH AUTOSEL 4.9 25/73] locking/lockdep: Fix merging of hlocks with non-zero references

2019-07-15 Thread Sasha Levin
From: Imre Deak [ Upstream commit d9349850e188b8b59e5322fda17ff389a1c0cd7d ] The sequence static DEFINE_WW_CLASS(test_ww_class); struct ww_acquire_ctx ww_ctx; struct ww_mutex ww_lock_a; struct ww_mutex ww_lock_b; struct ww_mutex ww_lock_c;

Re: [RFC PATCH] modpost: check for static EXPORT_SYMBOL* functions

2019-07-15 Thread Emil Velikov
Hi Denis, On 2019/07/14, Denis Efremov wrote: > This patch adds a check to warn about static EXPORT_SYMBOL* functions > during the modpost. In most of the cases, a static symbol marked for > exporting is an odd combination that should be fixed either by deleting > the exporting mark or by

[PATCH AUTOSEL 4.9 21/73] net: phy: Check against net_device being NULL

2019-07-15 Thread Sasha Levin
From: Ioana Ciornei [ Upstream commit 82c76aca81187b3d28a6fb3062f6916450ce955e ] In general, we don't want MAC drivers calling phy_attach_direct with the net_device being NULL. Add checks against this in all the functions calling it: phy_attach() and phy_connect_direct(). Signed-off-by: Ioana

[PATCH AUTOSEL 4.9 38/73] blkcg, writeback: dead memcgs shouldn't contribute to writeback ownership arbitration

2019-07-15 Thread Sasha Levin
From: Tejun Heo [ Upstream commit 6631142229005e1b1c311a09efe9fb3cfdac8559 ] wbc_account_io() collects information on cgroup ownership of writeback pages to determine which cgroup should own the inode. Pages can stay associated with dead memcgs but we want to avoid attributing IOs to dead

[PATCH AUTOSEL 4.9 52/73] x86/build: Add 'set -e' to mkcapflags.sh to delete broken capflags.c

2019-07-15 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit bc53d3d777f81385c1bb08b07bd1c06450ecc2c1 ] Without 'set -e', shell scripts continue running even after any error occurs. The missed 'set -e' is a typical bug in shell scripting. For example, when a disk space shortage occurs while this script is running,

[PATCH AUTOSEL 4.9 44/73] ipsec: select crypto ciphers for xfrm_algo

2019-07-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 597179b0ba550bd83fab1a9d57c42a9343c58514 ] kernelci.org reports failed builds on arc because of what looks like an old missed 'select' statement: net/xfrm/xfrm_algo.o: In function `xfrm_probe_algs': xfrm_algo.c:(.text+0x1e8): undefined reference to

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-15 Thread David Hildenbrand
On 15.07.19 11:33, David Hildenbrand wrote: > On 11.07.19 20:21, Dave Hansen wrote: >> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>> +static void bm_set_pfn(struct page *page) >>> +{ >>> + struct zone *zone = page_zone(page); >>> + int zone_idx = page_zonenum(page); >>> + unsigned long

[PATCH AUTOSEL 4.9 42/73] ipoib: correcly show a VF hardware address

2019-07-15 Thread Sasha Levin
From: Denis Kirjanov [ Upstream commit 64d701c608fea362881e823b666327f5d28d7ffd ] in the case of IPoIB with SRIOV enabled hardware ip link show command incorrecly prints 0 instead of a VF hardware address. Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256

[PATCH AUTOSEL 4.9 46/73] ntp: Limit TAI-UTC offset

2019-07-15 Thread Sasha Levin
From: Miroslav Lichvar [ Upstream commit d897a4ab11dc8a9fda50d2eccc081a96a6385998 ] Don't allow the TAI-UTC offset of the system clock to be set by adjtimex() to a value larger than 10 seconds. This prevents an overflow in the conversion to int, prevents the CLOCK_TAI clock from getting

[PATCH AUTOSEL 4.9 61/73] crypto: asymmetric_keys - select CRYPTO_HASH where needed

2019-07-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 90acc0653d2bee203174e66d519fbaaa513502de ] Build testing with some core crypto options disabled revealed a few modules that are missing CRYPTO_HASH: crypto/asymmetric_keys/x509_public_key.o: In function `x509_get_sig_params':

[PATCH AUTOSEL 4.9 67/73] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants

2019-07-15 Thread Sasha Levin
From: Geert Uytterhoeven [ 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

[PATCH AUTOSEL 4.9 73/73] gtp: fix use-after-free in gtp_newlink()

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ 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

[PATCH AUTOSEL 4.9 70/73] Bluetooth: Check state in l2cap_disconnect_rsp

2019-07-15 Thread Sasha Levin
From: Matias Karhumaa [ Upstream commit 28261da8a26f4915aa257d12d506c6ba179d961f ] Because of both sides doing L2CAP disconnection at the same time, it was possible to receive L2CAP Disconnection Response with CID that was already freed. That caused problems if CID was already reused and L2CAP

[PATCH AUTOSEL 4.9 65/73] iwlwifi: mvm: Drop large non sta frames

2019-07-15 Thread Sasha Levin
From: Andrei Otcheretianski [ Upstream commit ac70499ee97231a418dc1a4d6c9dc102e8f64631 ] In some buggy scenarios we could possible attempt to transmit frames larger than maximum MSDU size. Since our devices don't know how to handle this, it may result in asserts, hangs etc. This can happen, for

[PATCH AUTOSEL 4.9 72/73] gtp: fix Illegal context switch in RCU read-side critical section.

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ 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 &

[PATCH AUTOSEL 4.9 69/73] Bluetooth: 6lowpan: search for destination address in all peers

2019-07-15 Thread Sasha Levin
From: Josua Mayer [ 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

[PATCH AUTOSEL 4.9 71/73] Bluetooth: validate BLE connection interval updates

2019-07-15 Thread Sasha Levin
From: csonsino [ 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

[PATCH AUTOSEL 4.9 68/73] Bluetooth: hci_bcsp: Fix memory leak in rx_skb

2019-07-15 Thread Sasha Levin
From: Tomas Bortoli [ 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:

[PATCH AUTOSEL 4.9 64/73] bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush()

2019-07-15 Thread Sasha Levin
From: Coly Li [ 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

[PATCH AUTOSEL 4.9 66/73] net: usb: asix: init MAC address buffers

2019-07-15 Thread Sasha Levin
From: Phong Tran [ 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

[PATCH AUTOSEL 4.9 56/73] libata: don't request sense data on !ZAC ATA devices

2019-07-15 Thread Sasha Levin
From: Tejun Heo [ Upstream commit ca156e006add67e4beea7896be395160735e09b0 ] ZAC support added sense data requesting on error for both ZAC and ATA devices. This seems to cause erratic error handling behaviors on some SSDs where the device reports sense data availability and then delivers the

[PATCH AUTOSEL 4.9 59/73] rslib: Fix handling of of caller provided syndrome

2019-07-15 Thread Sasha Levin
From: Ferdinand Blomqvist [ Upstream commit ef4d6a8556b637ad27c8c2a2cff1dda3da38e9a9 ] Check if the syndrome provided by the caller is zero, and act accordingly. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link:

[PATCH AUTOSEL 4.9 55/73] perf tools: Increase MAX_NR_CPUS and MAX_CACHES

2019-07-15 Thread Sasha Levin
From: Kyle Meyer [ Upstream commit 9f94c7f947e919c343b30f080285af53d0fa9902 ] Attempting to profile 1024 or more CPUs with perf causes two errors: perf record -a [ perf record: Woken up X times to write data ] way too many cpu caches.. [ perf record: Captured and wrote X MB perf.data

[PATCH AUTOSEL 4.9 58/73] rslib: Fix decoding of shortened codes

2019-07-15 Thread Sasha Levin
From: Ferdinand Blomqvist [ Upstream commit 2034a42d1747fc1e1eeef2c6f1789c4d0762cb9c ] The decoding of shortenend codes is broken. It only works as expected if there are no erasures. When decoding with erasures, Lambda (the error and erasure locator polynomial) is initialized from the given

[PATCH AUTOSEL 4.9 62/73] PCI / ACPI: Use cached ACPI device state to get PCI device power state

2019-07-15 Thread Sasha Levin
From: Mika Westerberg [ Upstream commit 83a16e3f6d70da99896c7a2639c0b60fff13afb8 ] The ACPI power state returned by acpi_device_get_power() may depend on the configuration of ACPI power resources in the system which may change any time after acpi_device_get_power() has returned, unless the

[PATCH AUTOSEL 4.9 57/73] clocksource/drivers/exynos_mct: Increase priority over ARM arch timer

2019-07-15 Thread Sasha Levin
From: Marek Szyprowski [ Upstream commit 6282edb72bed5324352522d732080d4c1b9dfed6 ] Exynos SoCs based on CA7/CA15 have 2 timer interfaces: custom Exynos MCT (Multi Core Timer) and standard ARM Architected Timers. There are use cases, where both timer interfaces are used simultanously. One of

[PATCH AUTOSEL 4.9 63/73] EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec

2019-07-15 Thread Sasha Levin
From: Eiichi Tsukata [ 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

[PATCH AUTOSEL 4.9 53/73] mt7601u: fix possible memory leak when the device is disconnected

2019-07-15 Thread Sasha Levin
From: Lorenzo Bianconi [ Upstream commit 23377c200b2eb48a60d0f228b2a2e75ed6ee6060 ] When the device is disconnected while passing traffic it is possible to receive out of order urbs causing a memory leak since the skb linked to the current tx urb is not removed. Fix the issue deallocating the

[PATCH AUTOSEL 4.9 60/73] ixgbe: Check DDM existence in transceiver before access

2019-07-15 Thread Sasha Levin
From: "Mauro S. M. Rodrigues" [ 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

[PATCH AUTOSEL 4.9 45/73] media: i2c: fix warning same module names

2019-07-15 Thread Sasha Levin
From: Anders Roxell [ Upstream commit b2ce5617dad254230551feda3599f2cc68e53ad8 ] When building with CONFIG_VIDEO_ADV7511 and CONFIG_DRM_I2C_ADV7511 enabled as loadable modules, we see the following warning: drivers/gpu/drm/bridge/adv7511/adv7511.ko drivers/media/i2c/adv7511.ko Rework so

[PATCH AUTOSEL 4.9 43/73] EDAC/sysfs: Fix memory leak when creating a csrow object

2019-07-15 Thread Sasha Levin
From: Pan Bian [ Upstream commit 585fb3d93d32dbe89e718b85009f9c322cc554cd ] In edac_create_csrow_object(), the reference to the object is not released when adding the device to the device hierarchy fails (device_add()). This may result in a memory leak. Signed-off-by: Pan Bian Signed-off-by:

[PATCH AUTOSEL 4.9 47/73] timer_list: Guard procfs specific code

2019-07-15 Thread Sasha Levin
From: Nathan Huckleberry [ Upstream commit a9314773a91a1d3b36270085246a6715a326ff00 ] With CONFIG_PROC_FS=n the following warning is emitted: kernel/time/timer_list.c:361:36: warning: unused variable 'timer_list_sops' [-Wunused-const-variable] static const struct seq_operations

[PATCH AUTOSEL 4.9 51/73] mt7601u: do not schedule rx_tasklet when the device has been disconnected

2019-07-15 Thread Sasha Levin
From: Lorenzo Bianconi [ Upstream commit 4079e8ccabc3b6d1b503f2376123cb515d14921f ] Do not schedule rx_tasklet when the usb dongle is disconnected. Moreover do not grub rx_lock in mt7601u_kill_rx since usb_poison_urb can run concurrently with urb completion and we can unlink urbs from rx ring

[PATCH AUTOSEL 4.9 48/73] acpi/arm64: ignore 5.1 FADTs that are reported as 5.0

2019-07-15 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 2af22f3ec3ca452f1e79b967f634708ff01ced8a ] Some Qualcomm Snapdragon based laptops built to run Microsoft Windows are clearly ACPI 5.1 based, given that that is the first ACPI revision that supports ARM, and introduced the FADT 'arm_boot_flags' field, which

[PATCH AUTOSEL 4.9 50/73] media: coda: increment sequence offset for the last returned frame

2019-07-15 Thread Sasha Levin
From: Philipp Zabel [ Upstream commit b3b7d96817cdb8b6fc353867705275dce8f41ccc ] If no more frames are decoded in bitstream end mode, and a previously decoded frame has been returned, the firmware still increments the frame number. To avoid a sequence number mismatch after decoder restart,

[PATCH AUTOSEL 4.9 49/73] media: coda: fix mpeg2 sequence number handling

2019-07-15 Thread Sasha Levin
From: Philipp Zabel [ Upstream commit 56d159a4ec6d8da7313aac6fcbb95d8fffe689ba ] Sequence number handling assumed that the BIT processor frame number starts counting at 1, but this is not true for the MPEG-2 decoder, which starts at 0. Fix the sequence counter offset detection to handle this.

[PATCH AUTOSEL 4.9 40/73] perf evsel: Make perf_evsel__name() accept a NULL argument

2019-07-15 Thread Sasha Levin
From: Arnaldo Carvalho de Melo [ Upstream commit fdbdd7e8580eac9bdafa532746c865644d125e34 ] In which case it simply returns "unknown", like when it can't figure out the evsel->name value. This makes this code more robust and fixes a problem in 'perf trace' where a NULL evsel was being passed

[PATCH AUTOSEL 4.9 39/73] xfrm: fix sa selector validation

2019-07-15 Thread Sasha Levin
From: Nicolas Dichtel [ Upstream commit b8d6d0079757cbd1b69724cfd1c08e2171c68cee ] After commit b38ff4075a80, the following command does not work anymore: $ ip xfrm state add src 10.125.0.2 dst 10.125.0.1 proto esp spi 34 reqid 1 \ mode tunnel enc 'cbc(aes)' 0xb0abdba8b782ad9d364ec81e3a7d82a1

[PATCH AUTOSEL 4.9 41/73] vhost_net: disable zerocopy by default

2019-07-15 Thread Sasha Levin
From: Jason Wang [ Upstream commit 098eadce3c622c07b328d0a43dda379b38cf7c5e ] Vhost_net was known to suffer from HOL[1] issues which is not easy to fix. Several downstream disable the feature by default. What's more, the datapath was split and datacopy path got the support of batching and XDP

Re: [PATCH v3 2/4] of/platform: Add functional dependency link from DT bindings

2019-07-15 Thread Frank Rowand
On 7/15/19 7:26 AM, Frank Rowand wrote: > HiRob, > > Sorry for such a late reply... > > > On 7/1/19 8:25 PM, Saravana Kannan wrote: >> On Mon, Jul 1, 2019 at 6:32 PM Rob Herring wrote: >>> >>> On Mon, Jul 1, 2019 at 6:48 PM Saravana Kannan wrote: Add device-links after the devices

[PATCH AUTOSEL 4.9 37/73] rcu: Force inlining of rcu_read_lock()

2019-07-15 Thread Sasha Levin
From: Waiman Long [ Upstream commit 6da9f775175e516fc7229ceaa9b54f8f56aa7924 ] When debugging options are turned on, the rcu_read_lock() function might not be inlined. This results in lockdep's print_lock() function printing "rcu_read_lock+0x0/0x70" instead of rcu_read_lock()'s caller. For

[PATCH AUTOSEL 4.9 36/73] bpf: silence warning messages in core

2019-07-15 Thread Sasha Levin
From: Valdis Klētnieks [ Upstream commit aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca ] Compiling kernel/bpf/core.c with W=1 causes a flood of warnings: kernel/bpf/core.c:1198:65: warning: initialized field overwritten [-Woverride-init] 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y |

[PATCH AUTOSEL 4.9 35/73] regmap: fix bulk writes on paged registers

2019-07-15 Thread Sasha Levin
From: Srinivas Kandagatla [ Upstream commit db057679de3e9e6a03c1bcd5aee09b0d25fd9f5b ] On buses like SlimBus and SoundWire which does not support gather_writes yet in regmap, A bulk write on paged register would be silently ignored after programming page. This is because local variable 'ret'

Re: [PATCH 1/3] platform/x86/pcengines-apuv2: add mpcie reset gpio export

2019-07-15 Thread Florian Eckert
On APUx we have also mpcie2/mpcie3 reset pins. To make it possible to reset the ports from the userspace, add the definition to this platform device. The gpio can then be exported by the legancy gpio subsystem to toggle the mpcie reset pin. Just tested your patch on an apu3. The driver

[PATCH AUTOSEL 4.9 34/73] gpio: omap: ensure irq is enabled before wakeup

2019-07-15 Thread Sasha Levin
From: Russell King [ Upstream commit c859e0d479b3b4f6132fc12637c51e01492f31f6 ] Documentation states: NOTE: There must be a correlation between the wake-up enable and interrupt-enable registers. If a GPIO pin has a wake-up configured on it, it must also have the corresponding interrupt

[PATCH AUTOSEL 4.9 23/73] crypto: talitos - Align SEC1 accesses to 32 bits boundaries.

2019-07-15 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit c9cca7034b34a2d82e9a03b757de2485c294851c ] The MPC885 reference manual states: SEC Lite-initiated 8xx writes can occur only on 32-bit-word boundaries, but reads can occur on any byte boundary. Writing back a header read from a non-32-bit-word boundary

[PATCH AUTOSEL 4.9 29/73] net: axienet: Fix race condition causing TX hang

2019-07-15 Thread Sasha Levin
From: Robert Hancock [ Upstream commit 7de44285c1f69ccfbe8be1d6a16fcd956681fee6 ] It is possible that the interrupt handler fires and frees up space in the TX ring in between checking for sufficient TX ring space and stopping the TX queue in axienet_start_xmit. If this happens, the queue wake

[PATCH AUTOSEL 4.9 27/73] cpupower : frequency-set -r option misses the last cpu in related cpu list

2019-07-15 Thread Sasha Levin
From: Abhishek Goel [ Upstream commit 04507c0a9385cc8280f794a36bfff567c8cc1042 ] To set frequency on specific cpus using cpupower, following syntax can be used : cpupower -c #i frequency-set -f #f -r While setting frequency using cpupower frequency-set command, if we use '-r' option, it is

[PATCH 5/9] driver/core: Convert to use built-in RCU list checking (v1)

2019-07-15 Thread Joel Fernandes (Google)
list_for_each_entry_rcu has built-in RCU and lock checking. Make use of it in driver core. Acked-by: Greg Kroah-Hartman Signed-off-by: Joel Fernandes (Google) --- drivers/base/base.h | 1 + drivers/base/core.c | 10 ++ drivers/base/power/runtime.c | 15

[PATCH AUTOSEL 4.9 32/73] perf test 6: Fix missing kvm module load for s390

2019-07-15 Thread Sasha Levin
From: Thomas Richter [ Upstream commit 53fe307dfd309e425b171f6272d64296a54f4dff ] Command # perf test -Fv 6 fails with error running test 100 'kvm-s390:kvm_s390_create_vm' failed to parse event 'kvm-s390:kvm_s390_create_vm', err -1, str 'unknown tracepoint' event syntax error:

[PATCH AUTOSEL 4.9 28/73] net: fec: Do not use netdev messages too early

2019-07-15 Thread Sasha Levin
From: Fabio Estevam [ Upstream commit a19a0582363b9a5f8ba812f34f1b8df394898780 ] When a valid MAC address is not found the current messages are shown: fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00 fec 2188000.ethernet (unnamed net_device)

[PATCH AUTOSEL 4.9 31/73] perf cs-etm: Properly set the value of 'old' and 'head' in snapshot mode

2019-07-15 Thread Sasha Levin
From: Mathieu Poirier [ Upstream commit e45c48a9a4d20ebc7b639a62c3ef8f4b08007027 ] This patch adds the necessary intelligence to properly compute the value of 'old' and 'head' when operating in snapshot mode. That way we can get the latest information in the AUX buffer and be compatible with

[PATCH AUTOSEL 4.9 24/73] tua6100: Avoid build warnings.

2019-07-15 Thread Sasha Levin
From: "David S. Miller" [ Upstream commit 621ccc6cc5f8d6730b740d31d4818227866c93c9 ] Rename _P to _P_VAL and _R to _R_VAL to avoid global namespace conflicts: drivers/media/dvb-frontends/tua6100.c: In function ‘tua6100_set_params’: drivers/media/dvb-frontends/tua6100.c:79: warning: "_P"

[PATCH 9/9] doc: Update documentation about list_for_each_entry_rcu (v1)

2019-07-15 Thread Joel Fernandes (Google)
This patch updates the documentation with information about usage of lockdep with list_for_each_entry_rcu(). Signed-off-by: Joel Fernandes (Google) --- Documentation/RCU/lockdep.txt | 15 +++ Documentation/RCU/whatisRCU.txt | 9 - 2 files changed, 19 insertions(+), 5

[PATCH AUTOSEL 4.9 26/73] media: wl128x: Fix some error handling in fm_v4l2_init_video_device()

2019-07-15 Thread Sasha Levin
From: Kefeng Wang [ Upstream commit 69fbb3f47327d959830c94bf31893972b8c8f700 ] X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected The fm_v4l2_init_video_device() forget to unregister v4l2/video device in the error path, it could lead to UAF issue, eg, BUG: KASAN: use-after-free in

[PATCH AUTOSEL 4.9 30/73] s390/qdio: handle PENDING state for QEBSM devices

2019-07-15 Thread Sasha Levin
From: Julian Wiedmann [ Upstream commit 04310324c6f482921c071444833e70fe861b73d9 ] When a CQ-enabled device uses QEBSM for SBAL state inspection, get_buf_states() can return the PENDING state for an Output Queue. get_outbound_buffer_frontier() isn't prepared for this, and any PENDING buffer

[PATCH AUTOSEL 4.9 20/73] media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails.

2019-07-15 Thread Sasha Levin
From: Shailendra Verma [ Upstream commit 6995a659101bd4effa41cebb067f9dc18d77520d ] Fix to avoid possible memory leak if the decoder initialization got failed.Free the allocated memory for file handle object before return in case decoder initialization fails. Signed-off-by: Shailendra Verma

[PATCH AUTOSEL 4.9 06/73] media: dvb: usb: fix use after free in dvb_usb_device_exit

2019-07-15 Thread Sasha Levin
From: Oliver Neukum [ Upstream commit 6cf97230cd5f36b7665099083272595c55d72be7 ] dvb_usb_device_exit() frees and uses the device name in that order. Fix by storing the name in a buffer before freeing it. Signed-off-by: Oliver Neukum Reported-by:

[PATCH AUTOSEL 4.14 097/105] Bluetooth: 6lowpan: search for destination address in all peers

2019-07-15 Thread Sasha Levin
From: Josua Mayer [ 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

[PATCH AUTOSEL 4.9 05/73] batman-adv: fix for leaked TVLV handler.

2019-07-15 Thread Sasha Levin
From: Jeremy Sowden [ Upstream commit 17f78dd1bd624a4dd78ed5db3284a63ee807fcc3 ] A handler for BATADV_TVLV_ROAM was being registered when the translation-table was initialized, but not unregistered when the translation-table was freed. Unregister it. Fixes: 122edaa05940 ("batman-adv: tvlv -

[PATCH AUTOSEL 4.9 01/73] ath10k: Do not send probe response template for mesh

2019-07-15 Thread Sasha Levin
From: Surabhi Vishnoi [ Upstream commit 97354f2c432788e3163134df6bb144f4b6289d87 ] Currently mac80211 do not support probe response template for mesh point. When WMI_SERVICE_BEACON_OFFLOAD is enabled, host driver tries to configure probe response template for mesh, but it fails because the

[PATCH AUTOSEL 4.9 08/73] media: marvell-ccic: fix DMA s/g desc number calculation

2019-07-15 Thread Sasha Levin
From: Lubomir Rintel [ Upstream commit 0c7aa32966dab0b8a7424e1b34c7f206817953ec ] The commit d790b7eda953 ("[media] vb2-dma-sg: move dma_(un)map_sg here") left dma_desc_nent unset. It previously contained the number of DMA descriptors as returned from dma_map_sg(). We can now (since the commit

[PATCH AUTOSEL 4.9 02/73] ath9k: Check for errors when reading SREV register

2019-07-15 Thread Sasha Levin
From: Tim Schumacher [ Upstream commit 2f90c7e5d09437a4d8d5546feaae9f1cf48cfbe1 ] Right now, if an error is encountered during the SREV register read (i.e. an EIO in ath9k_regread()), that error code gets passed all the way to __ath9k_hw_init(), where it is visible during the "Chip rev not

[PATCH AUTOSEL 4.9 09/73] media: vpss: fix a potential NULL pointer dereference

2019-07-15 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit e08f0761234def47961d3252eac09ccedfe4c6a0 ] In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Reviewed-by: Mukesh Ojha Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin ---

[PATCH 3/9] rcu/sync: Remove custom check for reader-section (v2)

2019-07-15 Thread Joel Fernandes (Google)
The rcu/sync code was doing its own check whether we are in a reader section. With RCU consolidating flavors and the generic helper added in this series, this is no longer need. We can just use the generic helper and it results in a nice cleanup. Cc: Oleg Nesterov Acked-by: Oleg Nesterov

[PATCH 0/9] Harden list_for_each_entry_rcu() and family

2019-07-15 Thread Joel Fernandes (Google)
Hi, This series aims to provide lockdep checking to RCU list macros for additional kernel hardening. RCU has a number of primitives for "consumption" of an RCU protected pointer. Most of the time, these consumers make sure that such accesses are under a RCU reader-section (such as

[PATCH AUTOSEL 4.9 17/73] Revert "e1000e: fix cyclic resets at link up with active tx"

2019-07-15 Thread Sasha Levin
From: Konstantin Khlebnikov [ Upstream commit caff422ea81e144842bc44bab408d85ac449377b ] This reverts commit 0f9e980bf5ee1a97e2e401c846b2af989eb21c61. That change cased false-positive warning about hardware hang: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx IPv6:

[PATCH AUTOSEL 4.9 04/73] ath: DFS JP domain W56 fixed pulse type 3 RADAR detection

2019-07-15 Thread Sasha Levin
From: Anilkumar Kolli [ Upstream commit d8792393a783158cbb2c39939cb897dc5e5299b6 ] Increase pulse width range from 1-2usec to 0-4usec. During data traffic HW occasionally fails detecting radar pulses, so that SW cannot get enough radar reports to achieve the success rate. Tested ath10k hw and

[PATCH AUTOSEL 4.14 101/105] gtp: fix suspicious RCU usage

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ 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

[PATCH AUTOSEL 4.14 074/105] mt7601u: fix possible memory leak when the device is disconnected

2019-07-15 Thread Sasha Levin
From: Lorenzo Bianconi [ Upstream commit 23377c200b2eb48a60d0f228b2a2e75ed6ee6060 ] When the device is disconnected while passing traffic it is possible to receive out of order urbs causing a memory leak since the skb linked to the current tx urb is not removed. Fix the issue deallocating the

[PATCH AUTOSEL 4.9 10/73] media: media_device_enum_links32: clean a reserved field

2019-07-15 Thread Sasha Levin
From: Jungo Lin [ Upstream commit f49308878d7202e07d8761238e01bd0e5fce2750 ] In v4l2-compliance utility, test MEDIA_IOC_ENUM_ENTITIES will check whether reserved field of media_links_enum filled with zero. However, for 32 bit program, the reserved field is missing copy from kernel space to

[PATCH AUTOSEL 4.14 084/105] crypto: serpent - mark __serpent_setkey_sbox noinline

2019-07-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 473971187d6727609951858c63bf12b0307ef015 ] The same bug that gcc hit in the past is apparently now showing up with clang, which decides to inline __serpent_setkey_sbox: crypto/serpent_generic.c:268:5: error: stack frame size of 2112 bytes in function

[PATCH AUTOSEL 4.14 076/105] ath10k: add missing error handling

2019-07-15 Thread Sasha Levin
From: Claire Chang [ Upstream commit 4b553f3ca4cbde67399aa3a756c37eb92145b8a1 ] In function ath10k_sdio_mbox_rx_alloc() [sdio.c], ath10k_sdio_mbox_alloc_rx_pkt() is called without handling the error cases. This will make the driver think the allocation for skb is successful and try to access

[PATCH AUTOSEL 4.14 100/105] Bluetooth: validate BLE connection interval updates

2019-07-15 Thread Sasha Levin
From: csonsino [ 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

[PATCH AUTOSEL 4.14 086/105] PCI / ACPI: Use cached ACPI device state to get PCI device power state

2019-07-15 Thread Sasha Levin
From: Mika Westerberg [ Upstream commit 83a16e3f6d70da99896c7a2639c0b60fff13afb8 ] The ACPI power state returned by acpi_device_get_power() may depend on the configuration of ACPI power resources in the system which may change any time after acpi_device_get_power() has returned, unless the

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-15 Thread Michael S. Tsirkin
On Sun, Jul 14, 2019 at 02:51:18AM -0300, Thiago Jung Bauermann wrote: > > > Michael S. Tsirkin writes: > > > On Thu, Jun 27, 2019 at 10:58:40PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Mon, Jun 03, 2019 at 10:13:59PM -0300, Thiago Jung Bauermann

[PATCH AUTOSEL 4.14 103/105] gtp: fix use-after-free in gtp_encap_destroy()

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ 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

[PATCH AUTOSEL 4.14 102/105] gtp: fix Illegal context switch in RCU read-side critical section.

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ 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 &

[PATCH AUTOSEL 4.14 099/105] gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable()

2019-07-15 Thread Sasha Levin
From: Taehee Yoo [ Upstream commit e30155fd23c9c141cbe7d99b786e10a83a328837 ] If an invalid role is sent from user space, gtp_encap_enable() will fail. Then, it should call gtp_encap_disable_sock() but current code doesn't. It makes memory leak. Fixes: 91ed81f9abc7 ("gtp: support SGSN-side

[PATCH AUTOSEL 4.14 105/105] net: mvmdio: defer probe of orion-mdio if a clock is not ready

2019-07-15 Thread Sasha Levin
From: Josua Mayer [ Upstream commit 433a06d7d74e677c40b1148c70c48677ff62fb6b ] Defer probing of the orion-mdio interface when getting a clock returns EPROBE_DEFER. This avoids locking up the Armada 8k SoC when mdio is used before all clocks have been enabled. Signed-off-by: Josua Mayer

[PATCH AUTOSEL 4.14 098/105] Bluetooth: Check state in l2cap_disconnect_rsp

2019-07-15 Thread Sasha Levin
From: Matias Karhumaa [ Upstream commit 28261da8a26f4915aa257d12d506c6ba179d961f ] Because of both sides doing L2CAP disconnection at the same time, it was possible to receive L2CAP Disconnection Response with CID that was already freed. That caused problems if CID was already reused and L2CAP

[PATCH AUTOSEL 4.14 096/105] Bluetooth: hci_bcsp: Fix memory leak in rx_skb

2019-07-15 Thread Sasha Levin
From: Tomas Bortoli [ 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:

[PATCH AUTOSEL 4.14 095/105] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants

2019-07-15 Thread Sasha Levin
From: Geert Uytterhoeven [ 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

[PATCH AUTOSEL 4.14 093/105] perf stat: Make metric event lookup more robust

2019-07-15 Thread Sasha Levin
From: Andi Kleen [ Upstream commit 145c407c808352acd625be793396fd4f33c794f8 ] After setting up metric groups through the event parser, the metricgroup code looks them up again in the event list. Make sure we only look up events that haven't been used by some other metric. The data structures

[PATCH AUTOSEL 4.14 092/105] iwlwifi: mvm: Drop large non sta frames

2019-07-15 Thread Sasha Levin
From: Andrei Otcheretianski [ Upstream commit ac70499ee97231a418dc1a4d6c9dc102e8f64631 ] In some buggy scenarios we could possible attempt to transmit frames larger than maximum MSDU size. Since our devices don't know how to handle this, it may result in asserts, hangs etc. This can happen, for

[PATCH AUTOSEL 4.14 091/105] ath10k: destroy sdio workqueue while remove sdio module

2019-07-15 Thread Sasha Levin
From: Wen Gong [ Upstream commit 3ed39f8e747a7aafeec07bb244f2c3a1bdca5730 ] The workqueue need to flush and destory while remove sdio module, otherwise it will have thread which is not destory after remove sdio modules. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-7-QCARMSWP-1.

[PATCH AUTOSEL 4.14 090/105] net: hns3: add some error checking in hclge_tm module

2019-07-15 Thread Sasha Levin
From: Yunsheng Lin [ Upstream commit 04f25edb48c441fc278ecc154c270f16966cbb90 ] When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg with vport->vport_id as pri_id, which is used as index for hdev->tm_info.tc_info, it

[PATCH AUTOSEL 4.14 082/105] rslib: Fix handling of of caller provided syndrome

2019-07-15 Thread Sasha Levin
From: Ferdinand Blomqvist [ Upstream commit ef4d6a8556b637ad27c8c2a2cff1dda3da38e9a9 ] Check if the syndrome provided by the caller is zero, and act accordingly. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link:

[PATCH AUTOSEL 4.14 083/105] ixgbe: Check DDM existence in transceiver before access

2019-07-15 Thread Sasha Levin
From: "Mauro S. M. Rodrigues" [ 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

[PATCH AUTOSEL 4.14 087/105] EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec

2019-07-15 Thread Sasha Levin
From: Eiichi Tsukata [ 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

[PATCH AUTOSEL 4.14 085/105] crypto: asymmetric_keys - select CRYPTO_HASH where needed

2019-07-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 90acc0653d2bee203174e66d519fbaaa513502de ] Build testing with some core crypto options disabled revealed a few modules that are missing CRYPTO_HASH: crypto/asymmetric_keys/x509_public_key.o: In function `x509_get_sig_params':

[PATCH AUTOSEL 4.14 089/105] net: hns3: fix a -Wformat-nonliteral compile warning

2019-07-15 Thread Sasha Levin
From: Yonglong Liu [ Upstream commit 18d219b783da61a6cc77581f55fc4af2fa16bc36 ] When setting -Wformat=2, there is a compiler warning like this: hclge_main.c:xxx:x: warning: format not a string literal and no format arguments [-Wformat-nonliteral] strs[i].desc); ^~~~ This patch adds missing

[PATCH AUTOSEL 4.14 088/105] bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush()

2019-07-15 Thread Sasha Levin
From: Coly Li [ 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

[PATCH AUTOSEL 4.14 078/105] perf tools: Increase MAX_NR_CPUS and MAX_CACHES

2019-07-15 Thread Sasha Levin
From: Kyle Meyer [ Upstream commit 9f94c7f947e919c343b30f080285af53d0fa9902 ] Attempting to profile 1024 or more CPUs with perf causes two errors: perf record -a [ perf record: Woken up X times to write data ] way too many cpu caches.. [ perf record: Captured and wrote X MB perf.data

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