[PATCH AUTOSEL 4.14 081/105] 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.14 080/105] 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.14 077/105] ath10k: fix PCIE device wake up failed

2019-07-15 Thread Sasha Levin
From: Miaoqing Pan [ Upstream commit 011d4111c8c602ea829fa4917af1818eb0500a90 ] Observed PCIE device wake up failed after ~120 iterations of soft-reboot test. The error message is "ath10k_pci :01:00.0: failed to wake up device : -110" The call trace as below: ath10k_pci_probe ->

[PATCH AUTOSEL 4.14 079/105] 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.14 072/105] 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.14 068/105] 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.14 070/105] media: hdpvr: fix locking and a missing msleep

2019-07-15 Thread Sasha Levin
From: Hans Verkuil [ Upstream commit 6bc5a4a1927556ff9adce1aa95ea408c95453225 ] This driver has three locking issues: - The wait_event_interruptible() condition calls hdpvr_get_next_buffer(dev) which uses a mutex, which is not allowed. Rewrite with list_empty_careful() that doesn't need

[PATCH AUTOSEL 4.14 071/105] rtlwifi: rtl8192cu: fix error handle when usb probe failed

2019-07-15 Thread Sasha Levin
From: Ping-Ke Shih [ Upstream commit 6c0ed66f1a5b84e2a812c7c2d6571a5621bf3396 ] rtl_usb_probe() must do error handle rtl_deinit_core() only if rtl_init_core() is done, otherwise goto error_out2. | usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 | rtl_usb: reg 0xf0,

[PATCH AUTOSEL 4.14 073/105] 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.14 075/105] ipvs: fix tinfo memory leak in start_sync_thread

2019-07-15 Thread Sasha Levin
From: Julian Anastasov [ Upstream commit 5db7c8b9f9fc2aeec671ae3ca6375752c162e0e7 ] syzkaller reports for memory leak in start_sync_thread [1] As Eric points out, kthread may start and stop before the threadfn function is called, so there is no chance the data (tinfo in our case) to be

[PATCH AUTOSEL 4.14 063/105] 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.14 057/105] 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.14 060/105] ipvs: defer hook registration to avoid leaks

2019-07-15 Thread Sasha Levin
From: Julian Anastasov [ Upstream commit cf47a0b882a4e5f6b34c7949d7b293e9287f1972 ] syzkaller reports for memory leak when registering hooks [1] As we moved the nf_unregister_net_hooks() call into __ip_vs_dev_cleanup(), defer the nf_register_net_hooks() call, so that hooks are allocated and

[PATCH AUTOSEL 4.14 069/105] media: vimc: cap: check v4l2_fill_pixfmt return value

2019-07-15 Thread Sasha Levin
From: André Almeida [ Upstream commit 77ae46e11df5c96bb4582633851f838f5d954df4 ] v4l2_fill_pixfmt() returns -EINVAL if the pixelformat used as parameter is invalid or if the user is trying to use a multiplanar format with the singleplanar API. Currently, the vimc_cap_try_fmt_vid_cap() returns

[PATCH AUTOSEL 4.14 064/105] 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.14 058/105] 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.14 059/105] 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

[PATCH AUTOSEL 4.14 065/105] 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.14 066/105] 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.14 067/105] media: coda: fix last buffer handling in V4L2_ENC_CMD_STOP

2019-07-15 Thread Sasha Levin
From: Marco Felsch [ Upstream commit f3775f89852d167990b0d718587774cf00d22ac2 ] coda_encoder_cmd() is racy, as the last scheduled picture run worker can still be in-flight while the ENC_CMD_STOP command is issued. Depending on the exact timing the sequence numbers might already be changed, but

[PATCH AUTOSEL 4.14 061/105] media: s5p-mfc: Make additional clocks optional

2019-07-15 Thread Sasha Levin
From: Marek Szyprowski [ Upstream commit e08efef8fe7db87206314c19b341612c719f891a ] Since the beginning the second clock ('special', 'sclk') was optional and it is not available on some variants of Exynos SoCs (i.e. Exynos5420 with v7 of MFC hardware). However commit 1bce6fb3edf1 ("[media]

[PATCH AUTOSEL 4.14 062/105] 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.14 051/105] 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.14 052/105] sched/core: Add __sched tag for io_schedule()

2019-07-15 Thread Sasha Levin
From: Gao Xiang [ Upstream commit e3b929b0a184edb35531153c5afcaebb09014f9d ] Non-inline io_schedule() was introduced in: commit 10ab56434f2f ("sched/core: Separate out io_schedule_prepare() and io_schedule_finish()") Keep in line with io_schedule_timeout(), otherwise "/proc//wchan" will

[PATCH AUTOSEL 4.14 056/105] 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

[PATCH AUTOSEL 4.14 054/105] x86/atomic: Fix smp_mb__{before,after}_atomic()

2019-07-15 Thread Sasha Levin
From: Peter Zijlstra [ Upstream commit 69d927bba39517d0980462efc051875b7f4db185 ] Recent probing at the Linux Kernel Memory Model uncovered a 'surprise'. Strongly ordered architectures where the atomic RmW primitive implies full memory ordering and smp_mb__{before,after}_atomic() are a simple

[PATCH AUTOSEL 4.14 055/105] 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.14 053/105] sched/fair: Fix "runnable_avg_yN_inv" not used warnings

2019-07-15 Thread Sasha Levin
From: Qian Cai [ Upstream commit 509466b7d480bc5d22e90b9fbe6122ae0e2fbe39 ] runnable_avg_yN_inv[] is only used in kernel/sched/pelt.c but was included in several other places because they need other macros all came from kernel/sched/sched-pelt.h which was generated by

[PATCH AUTOSEL 4.14 045/105] 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.14 043/105] iommu: Fix a leak in iommu_insert_resv_region

2019-07-15 Thread Sasha Levin
From: Eric Auger [ Upstream commit ad0834dedaa15c3a176f783c0373f836e44b4700 ] In case we expand an existing region, we unlink this latter and insert the larger one. In that case we should free the original region after the insertion. Also we can immediately return. Fixes: 6c65fb318e8b ("iommu:

[PATCH AUTOSEL 4.14 042/105] media: fdp1: Support M3N and E3 platforms

2019-07-15 Thread Sasha Levin
From: Kieran Bingham [ Upstream commit 4e8c120de9268fc26f583268b9d22e7d37c4595f ] New Gen3 R-Car platforms incorporate the FDP1 with an updated version register. No code change is required to support these targets, but they will currently report an error stating that the device can not be

[PATCH AUTOSEL 4.14 050/105] 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.14 047/105] 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.14 044/105] 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.14 049/105] x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS

2019-07-15 Thread Sasha Levin
From: Aaron Lewis [ Upstream commit cbb99c0f588737ec98c333558922ce47e9a95827 ] Add the CPUID enumeration for Intel's de-feature bits to accommodate passing these de-features through to kvm guests. These de-features are (from SDM vol 1, section 8.1.8): - X86_FEATURE_FDP_EXCPTN_ONLY: If

[PATCH AUTOSEL 4.14 040/105] 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.14 041/105] 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.14 039/105] ipset: Fix memory accounting for hash types on resize

2019-07-15 Thread Sasha Levin
From: Stefano Brivio [ Upstream commit 11921796f4799ca9c61c4b22cc54d84aa69f8a35 ] If a fresh array block is allocated during resize, the current in-memory set size should be increased by the size of the block, not replaced by it. Before the fix, adding entries to a hash set type, leading to a

[PATCH AUTOSEL 4.14 037/105] RAS/CEC: Fix pfn insertion

2019-07-15 Thread Sasha Levin
From: Borislav Petkov [ Upstream commit 6d8e294bf5f0e85c34e8b14b064e2965f53f38b0 ] When inserting random PFNs for debugging the CEC through (debugfs)/ras/cec/pfn, depending on the return value of pfn_set(), multiple values get inserted per a single write. That is because simple_attr_write()

[PATCH AUTOSEL 4.14 038/105] net: sfp: add mutex to prevent concurrent state checks

2019-07-15 Thread Sasha Levin
From: Robert Hancock [ Upstream commit 2158e856f56bb762ef90f3ec244d41a519826f75 ] sfp_check_state can potentially be called by both a threaded IRQ handler and delayed work. If it is concurrently called, it could result in incorrect state management. Add a st_mutex to protect the state - this

[PATCH AUTOSEL 4.14 032/105] 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 AUTOSEL 4.14 020/105] 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.14 034/105] 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.14 019/105] af_key: fix leaks in key_pol_get_resp and dump_sp.

2019-07-15 Thread Sasha Levin
From: Jeremy Sowden [ Upstream commit 7c80eb1c7e2b8420477fbc998971d62a648035d9 ] In both functions, if pfkey_xfrm_policy2msg failed we leaked the newly allocated sk_buff. Free it on error. Fixes: 55569ce256ce ("Fix conversion between IPSEC_MODE_xxx and XFRM_MODE_xxx.") Reported-by:

[PATCH AUTOSEL 4.14 028/105] 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.14 030/105] 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;

[PATCH AUTOSEL 4.14 029/105] 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 AUTOSEL 4.14 027/105] 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.14 021/105] fscrypt: clean up some BUG_ON()s in block encryption/decryption

2019-07-15 Thread Sasha Levin
From: Eric Biggers [ Upstream commit eeacfdc68a104967162dfcba60f53f6f5b62a334 ] Replace some BUG_ON()s with WARN_ON_ONCE() and returning an error code, and move the check for len divisible by FS_CRYPTO_BLOCK_SIZE into fscrypt_crypt_block() so that it's done for both encryption and decryption,

[PATCH AUTOSEL 4.14 025/105] 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.14 031/105] 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.14 023/105] e1000e: start network tx queue only when link is up

2019-07-15 Thread Sasha Levin
From: Konstantin Khlebnikov [ Upstream commit d17ba0f616a08f597d9348c372d89b8c0405ccf3 ] Driver does not want to keep packets in Tx queue when link is lost. But present code only reset NIC to flush them, but does not prevent queuing new packets. Moreover reset sequence itself could generate new

[PATCH AUTOSEL 4.14 022/105] 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.14 026/105] 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.14 014/105] net: stmmac: dwmac1000: Clear unused address entries

2019-07-15 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 9463c445590091202659cdfdd44b236acadfbd84 ] In case we don't use a given address entry we need to clear it because it could contain previous values that are no longer valid. Found out while running stmmac selftests. Signed-off-by: Jose Abreu Cc: Joao Pinto

[PATCH AUTOSEL 4.14 012/105] 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 AUTOSEL 4.14 011/105] 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.14 008/105] 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 010/105] crypto: talitos - fix skcipher failure due to wrong output IV

2019-07-15 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 3e03e792865ae48b8cfc69a0b4d65f02f467389f ] Selftests report the following: [2.984845] alg: skcipher: cbc-aes-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" [2.995377] : 3d af ba 42 9d 9e b4 30 b4 22 da

[PATCH AUTOSEL 4.19 157/158] 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.19 154/158] 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.19 158/158] 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 004/105] ath6kl: add some bounds checking

2019-07-15 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 5d6751eaff672ea77642e74e92e6c0ac7f9709ab ] The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the

[PATCH AUTOSEL 4.19 153/158] 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 003/105] 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

Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size

2019-07-15 Thread Uladzislau Rezki
On Fri, Jul 12, 2019 at 11:09:00PM +0800, Pengfei Li wrote: > On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox wrote: > > > > On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote: > > > > I don't think you need struct union struct union. Because llist_node > > is just a pointer, you can get

[PATCH AUTOSEL 4.19 155/158] 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.19 156/158] 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 001/105] wil6210: fix potential out-of-bounds read

2019-07-15 Thread Sasha Levin
From: "Gustavo A. R. Silva" [ Upstream commit bfabdd6997323adbedccb13a3fed1967fb8cf8f5 ] Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h: enum gro_result { GRO_MERGED, GRO_MERGED_FREE, GRO_HELD, GRO_NORMAL, GRO_DROP,

[PATCH AUTOSEL 4.19 143/158] bonding: validate ip header before check IPPROTO_IGMP

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

[PATCH AUTOSEL 4.19 148/158] Bluetooth: Add new 13d3:3501 QCA_ROME device

2019-07-15 Thread Sasha Levin
From: João Paulo Rechi Vita [ 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

[PATCH AUTOSEL 4.19 147/158] Bluetooth: Add new 13d3:3491 QCA_ROME device

2019-07-15 Thread Sasha Levin
From: João Paulo Rechi Vita [ 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

[PATCH AUTOSEL 4.19 151/158] 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.19 142/158] selftests: bpf: fix inlines in test_lwt_seg6local

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

[PATCH AUTOSEL 4.19 152/158] 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.19 139/158] 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.19 150/158] perf tests: Fix record+probe_libc_inet_pton.sh for powerpc64

2019-07-15 Thread Sasha Levin
From: Seeteena Thoufeek [ Upstream commit bff5a556c149804de29347a88a884d25e4e4e3a2 ] 'probe libc's inet_pton & backtrace it with ping' testcase sometimes fails on powerpc because distro ping binary does not have symbol information and thus it prints "[unknown]" function name in the backtrace.

[PATCH AUTOSEL 4.19 141/158] bpf, libbpf, smatch: Fix potential NULL pointer dereference

2019-07-15 Thread Sasha Levin
From: Leo Yan [ Upstream commit 33bae185f74d49a0d7b1bfaafb8e959efce0f243 ] Based on the following report from Smatch, fix the potential NULL pointer dereference check: tools/lib/bpf/libbpf.c:3493 bpf_prog_load_xattr() warn: variable dereferenced before check 'attr' (see line 3483)

[PATCH AUTOSEL 4.19 144/158] 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.19 146/158] 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.19 149/158] 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.19 145/158] tools: bpftool: Fix json dump crash on powerpc

2019-07-15 Thread Sasha Levin
From: Jiri Olsa [ 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",

[PATCH AUTOSEL 4.19 107/158] ipvs: fix tinfo memory leak in start_sync_thread

2019-07-15 Thread Sasha Levin
From: Julian Anastasov [ Upstream commit 5db7c8b9f9fc2aeec671ae3ca6375752c162e0e7 ] syzkaller reports for memory leak in start_sync_thread [1] As Eric points out, kthread may start and stop before the threadfn function is called, so there is no chance the data (tinfo in our case) to be

[PATCH AUTOSEL 4.19 138/158] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-07-15 Thread Sasha Levin
From: "Guilherme G. Piccoli" [ Upstream commit 3c91f25c2f72ba6001775a5932857c1d2131c531 ] Currently bnx2x ptp worker tries to read a register with timestamp information in case of TX packet timestamping and in case it fails, the routine reschedules itself indefinitely. This was reported as a

[PATCH AUTOSEL 4.19 135/158] bpf: fix uapi bpf_prog_info fields alignment

2019-07-15 Thread Sasha Levin
From: Baruch Siach [ Upstream commit 0472301a28f6cf53a6bc5783e48a2d0bbff4682f ] Merge commit 1c8c5a9d38f60 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next") undid the fix from commit 36f9814a494 ("bpf: fix uapi hole for 32 bit compat applications") by taking the

[PATCH AUTOSEL 4.19 136/158] 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.19 134/158] 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

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

2019-07-15 Thread Frank Rowand
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 are created (but before they are >>> probed) by looking at

[PATCH AUTOSEL 4.19 123/158] cpufreq: Don't skip frequency validation for has_target() drivers

2019-07-15 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit 9801522840cc1073f8064b4c979b7b6995c74bca ] CPUFREQ_CONST_LOOPS was introduced in a very old commit from pre-2.6 kernel release by commit 6a4a93f9c0d5 ("[CPUFREQ] Fix 'out of sync' issue"). Basically, that commit does two things: - It adds the frequency

[PATCH AUTOSEL 4.19 126/158] bcache: acquire bch_register_lock later in cached_dev_free()

2019-07-15 Thread Sasha Levin
From: Coly Li [ 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 AUTOSEL 4.19 128/158] bcache: fix potential deadlock in cached_def_free()

2019-07-15 Thread Sasha Levin
From: Coly Li [ Upstream commit 7e865eba00a3df2dc8c4746173a8ca1c1c7f042e ] When enable lockdep and reboot system with a writeback mode bcache device, the following potential deadlock warning is reported by lockdep engine. [ 101.536569][ T401] kworker/2:2/401 is trying to acquire lock: [

[PATCH AUTOSEL 4.19 133/158] igb: clear out skb->tstamp after reading the txtime

2019-07-15 Thread Sasha Levin
From: Vedang Patel [ Upstream commit 1e08511d5d01884a3c9070afd52a47799312074a ] If a packet which is utilizing the launchtime feature (via SO_TXTIME socket option) also requests the hardware transmit timestamp, the hardware timestamp is not delivered to the userspace. This is because the value

[PATCH AUTOSEL 4.19 127/158] 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.19 132/158] net: mvpp2: prs: Don't override the sign bit in SRAM parser shift

2019-07-15 Thread Sasha Levin
From: Maxime Chevallier [ Upstream commit 8ec3ede559956f8ad58db7b57d25ac724bab69e9 ] The Header Parser allows identifying various fields in the packet headers, used for various kind of filtering and classification steps. This is a re-entrant process, where the offset in the packet header

Re: [PATCH] x86/paravirt: Drop {read,write}_cr8() hooks

2019-07-15 Thread Andy Lutomirski
On Mon, Jul 15, 2019 at 6:23 AM Juergen Gross wrote: > > On 15.07.19 15:00, Andrew Cooper wrote: > > There is a lot of infrastructure for functionality which is used > > exclusively in __{save,restore}_processor_state() on the suspend/resume > > path. > > > > cr8 is an alias of APIC_TASKPRI, and

[PATCH AUTOSEL 4.19 130/158] 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.19 131/158] 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.19 125/158] bcache: check CACHE_SET_IO_DISABLE bit in bch_journal()

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

[PATCH AUTOSEL 4.19 121/158] wil6210: drop old event after wmi_call timeout

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

[PATCH AUTOSEL 4.19 122/158] 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

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