[PATCH] kernel/dma: Fix panic caused by passing cma to command line

2018-09-16 Thread zhe.he
From: He Zhe early_cma does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "cma", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:a3e9db8d error 0 cr2 0x0 [0.0

[PATCH AUTOSEL 4.14 14/87] USB: serial: kobil_sct: fix modem-status error handling

2018-09-16 Thread Sasha Levin
From: Johan Hovold [ Upstream commit a420b5d939ee58f1d950f0ea782834056520aeaa ] Make sure to return -EIO in case of a short modem-status read request. While at it, split the debug message to not include the (zeroed) transfer-buffer content in case of errors. Fixes: 1da177e4c3f4 ("Linux-2.6.12-

[PATCH AUTOSEL 4.14 18/87] power: remove possible deadlock when unregistering power_supply

2018-09-16 Thread Sasha Levin
From: Benjamin Tissoires [ Upstream commit 3ffa6583e24e1ad1abab836d24bfc9d2308074e5 ] If a device gets removed right after having registered a power_supply node, we might enter in a deadlock between the remove call (that has a lock on the parent device) and the deferred register work. Allow the

[PATCH AUTOSEL 4.14 11/87] power: vexpress: fix corruption in notifier registration

2018-09-16 Thread Sasha Levin
From: Sudeep Holla [ Upstream commit 09bebb1adb21ecd04adf7ccb3b06f73e3a851e93 ] Vexpress platforms provide two different restart handlers: SYS_REBOOT that restart the entire system, while DB_RESET only restarts the daughter board containing the CPU. DB_RESET is overridden by SYS_REBOOT if it exi

[PATCH AUTOSEL 4.14 17/87] s390/mm: correct allocate_pgste proc_handler callback

2018-09-16 Thread Sasha Levin
From: Vasily Gorbik [ Upstream commit 5bedf8aa03c28cb8dc98bdd32a41b66d8f7d3eaa ] Since proc_dointvec does not perform value range control, proc_dointvec_minmax should be used to limit value range, which is clearly intended here, as the internal representation of the value: unsigned int alloc_pg

[PATCH AUTOSEL 4.14 16/87] iommu/msm: Don't call iommu_device_{,un}link from atomic context

2018-09-16 Thread Sasha Levin
From: Niklas Cassel [ Upstream commit 379521462e4add27f3514da8e4ab1fd7a54fe1c7 ] Fixes the following splat during boot: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 77, name: kworker/2:1 4 locks held by kworker/2:1/7

[PATCH AUTOSEL 4.14 12/87] iommu/amd: make sure TLB to be flushed before IOVA freed

2018-09-16 Thread Sasha Levin
From: Zhen Lei [ Upstream commit 3c120143f584360a13614787e23ae2cdcb5e5ccd ] Although the mapping has already been removed in the page table, it maybe still exist in TLB. Suppose the freed IOVAs is reused by others before the flush operation completed, the new user can not correctly access to its

[PATCH AUTOSEL 4.14 13/87] Bluetooth: Add a new Realtek 8723DE ID 0bda:b009

2018-09-16 Thread Sasha Levin
From: Jian-Hong Pan [ Upstream commit 45ae68b8cfc25bdbffc11248001c47ab1b76ff6e ] Without this patch we cannot turn on the Bluethooth adapter on HP 14-bs007la. T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vend

[PATCH AUTOSEL 4.14 10/87] uwb: hwa-rc: fix memory leak at probe

2018-09-16 Thread Sasha Levin
From: Anton Vasilyev [ Upstream commit 11b71782c1d10d9bccc31825cf84291cd7588a1e ] hwarc_probe() allocates memory for hwarc, but does not free it if uwb_rc_add() or hwarc_get_version() fail. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Signed-off

[PATCH AUTOSEL 4.14 08/87] misc: sram: enable clock before registering regions

2018-09-16 Thread Sasha Levin
From: Johan Hovold [ Upstream commit d5b9653dd2bb7a2b1c8cc783c5d3b607bbb6b271 ] Make sure to enable the clock before registering regions and exporting partitions to user space at which point we must be prepared for I/O. Fixes: ee895ccdf776 ("misc: sram: fix enabled clock leak on error path") Si

[PATCH AUTOSEL 4.14 07/87] power: supply: axp288_charger: Fix initial constant_charge_current value

2018-09-16 Thread Sasha Levin
From: Hans de Goede [ Upstream commit f2a42595f0865886a2d40524b0e9d15600848670 ] We should look at val which contains the value read from the register, not ret which is always 0 on a successful read. Signed-off-by: Hans de Goede Fixes: eac53b3664f59 ("power: supply: axp288_charger: Drop platfo

[PATCH AUTOSEL 4.14 06/87] staging: rts5208: fix missing error check on call to rtsx_write_register

2018-09-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit c5fae4f4fd28189b1062fb8ef7b21fec37cb8b17 ] Currently the check on error return from the call to rtsx_write_register is checking the error status from the previous call. Fix this by adding in the missing assignment of retval. Detected by CoverityScan, CID#7

[PATCH AUTOSEL 4.14 01/87] crypto: skcipher - Fix -Wstringop-truncation warnings

2018-09-16 Thread Sasha Levin
From: Stafford Horne [ Upstream commit cefd769fd0192c84d638f66da202459ed8ad63ba ] As of GCC 9.0.0 the build is reporting warnings like: crypto/ablkcipher.c: In function ‘crypto_ablkcipher_report’: crypto/ablkcipher.c:374:2: warning: ‘strncpy’ specified bound 64 equals destination size

[PATCH AUTOSEL 4.14 02/87] iio: adc: ina2xx: avoid kthread_stop() with stale task_struct

2018-09-16 Thread Sasha Levin
From: Akinobu Mita [ Upstream commit 7d6cd21d82bacab2d1786fe5e989e4815b75d9a3 ] When the buffer is enabled for ina2xx driver, a dedicated kthread is invoked to capture mesurement data. When the buffer is disabled, the kthread is stopped. However if the kthread gets register access errors, it i

[PATCH AUTOSEL 4.14 05/87] x86/numa_emulation: Fix emulated-to-physical node mapping

2018-09-16 Thread Sasha Levin
From: Dan Williams [ Upstream commit 3b6c62f363a19ce82bf378187ab97c9dc01e3927 ] Without this change the distance table calculation for emulated nodes may use the wrong numa node and report an incorrect distance. Signed-off-by: Dan Williams Cc: David Rientjes Cc: Linus Torvalds Cc: Peter Zijl

[PATCH AUTOSEL 4.14 03/87] tsl2550: fix lux1_input error in low light

2018-09-16 Thread Sasha Levin
From: Matt Ranostay [ Upstream commit ce054546cc2c26891cefa2f284d90d93b52205de ] ADC channel 0 photodiode detects both infrared + visible light, but ADC channel 1 just detects infrared. However, the latter is a bit more sensitive in that range so complete darkness or low light causes a error con

[PATCH AUTOSEL 4.18 136/136] gpio: tegra: Fix tegra_gpio_irq_set_type()

2018-09-16 Thread Sasha Levin
From: Dmitry Osipenko [ Upstream commit f78709a5d4114edc21a5d86586ed5e56e284f2bd ] Commit 36b312792b97 ("gpiolib: Respect error code of ->get_direction()") broke tegra_gpio_irq_set_type() because requesting of GPIO direction must be done after enabling GPIO function for a pin. This patch fixes

[PATCH AUTOSEL 4.18 122/136] EDAC: Fix memleak in module init error path

2018-09-16 Thread Sasha Levin
From: Johan Hovold [ Upstream commit 4708aa85d50cc6e962dfa8acf5ad4e0d290a21db ] Make sure to use put_device() to free the initialised struct device so that resources managed by driver core also gets released in the event of a registration failure. Signed-off-by: Johan Hovold Cc: Denis Kirjanov

[PATCH AUTOSEL 4.18 125/136] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64

2018-09-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit 5a211627004e2cddd0ab8b9df19e5fb0bbe97634 ] sizeof(struct ce_desc) should be a copy-paste mistake just use sizeof(struct ce_desc_64) to avoid mem leak Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990") Signed-off-by: YueHaibing Signed-

[PATCH AUTOSEL 4.18 116/136] ASoC: rsnd: SSI parent cares SWSP bit

2018-09-16 Thread Sasha Levin
From: Kuninori Morimoto [ Upstream commit 203cdf51f28820bee7893b4be392847418e6f4ec ] SSICR has SWSP bit (= Serial WS Polarity) which decides WS pin 1st channel polarity (low or hi). This bit shouldn't exchange after running. Current SSI "parent" doesn't care SSICR, just controls clock only. Bec

[PATCH AUTOSEL 4.18 135/136] perf tests: Fix indexing when invoking subtests

2018-09-16 Thread Sasha Levin
From: Sandipan Das [ Upstream commit aa90f9f9554616d5738f7bedb4a8f0e5e14d1bc6 ] Recently, the subtest numbering was changed to start from 1. While it is fine for displaying results, this should not be the case when the subtests are actually invoked. Typically, the subtests are stored in zero-i

[PATCH AUTOSEL 4.18 127/136] fs/lock: skip lock owner pid translation in case we are in init_pid_ns

2018-09-16 Thread Sasha Levin
From: Konstantin Khorenko [ Upstream commit 826d7bc9f013d01e92997883d2fd0c25f4af1f1c ] If the flock owner process is dead and its pid has been already freed, pid translation won't work, but we still want to show flock owner pid number when expecting /proc/$PID/fdinfo/$FD in init pidns. Reproduc

[PATCH AUTOSEL 4.18 123/136] EDAC, altera: Fix an error handling path in altr_s10_sdram_probe()

2018-09-16 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit 9d72fe1ce81bc757ecb6d57b58e5fd95b9ad1b26 ] If regmap_write() fails, we should release some resources as done in all the other error handling paths of the function. Signed-off-by: Christophe JAILLET Reviewed-by: Thor Thayer Cc: linux-edac Link: http

[PATCH] kernel/dma: Fix panic caused by passing swiotlb to command line

2018-09-16 Thread zhe.he
From: He Zhe setup_io_tlb_npages does not check input argument before passing it to isdigit. The argument would be a NULL pointer if "swiotlb", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:bb9b8e9f error 0 cr2 0x0 [0

[PATCH AUTOSEL 4.18 115/136] ASoC: rt1305: Use ULL suffixes for 64-bit constants

2018-09-16 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit 4f29b663c08d369fe320a148179996c94cf7d01b ] With gcc 4.1.2: sound/soc/codecs/rt1305.c: In function ‘rt1305_calibrate’: sound/soc/codecs/rt1305.c:1069: warning: integer constant is too large for ‘long’ type sound/soc/codecs/rt1305.c:1086: wa

[PATCH AUTOSEL 4.18 126/136] ath10k: snoc: use correct bus-specific pointer in RX retry

2018-09-16 Thread Sasha Levin
From: Brian Norris [ Upstream commit 426a0f0b5a2fe1df3496ba299ee3521159dba302 ] We're 'ath10k_snoc', not 'ath10k_pci'. This probably means we're accessing junk data in ath10k_snoc_rx_replenish_retry(), unless 'ath10k_snoc' and 'ath10k_pci' happen to have very similar struct layouts. Noticed by

[PATCH AUTOSEL 4.18 111/136] audit: Fix extended comparison of GID/EGID

2018-09-16 Thread Sasha Levin
From: Ondrej Mosnáček [ Upstream commit af85d1772e31fed34165a1b3decef340cf4080c0 ] The audit_filter_rules() function in auditsc.c used the in_[e]group_p() functions to check GID/EGID match, but these functions use the current task's credentials, while the comparison should use the credentials of

[PATCH AUTOSEL 4.18 113/136] scsi: megaraid_sas: Update controller info during resume

2018-09-16 Thread Sasha Levin
From: Shivasharan S [ Upstream commit c3b10a55abc943a526aaecd7e860b15671beb906 ] There is a possibility that firmware on the controller was upgraded before system was suspended. During resume, driver needs to read updated controller properties. Signed-off-by: Shivasharan S Signed-off-by: Marti

[PATCH AUTOSEL 4.18 110/136] scsi: hisi_sas: Fix the conflict between dev gone and host reset

2018-09-16 Thread Sasha Levin
From: Xiaofei Tan [ Upstream commit d2fc401e47529d9ffd2673a5395d56002e31ad98 ] There is a possible conflict when a device is removed and host reset occurs concurrently. The reason is that then the device is notified as gone, we try to clear the ITCT, which is notified via an interrupt. The dev

[PATCH AUTOSEL 4.18 105/136] arm64: dts: renesas: Fix VSPD registers range

2018-09-16 Thread Sasha Levin
From: Laurent Pinchart [ Upstream commit e21adc781bb45e810f1c396c4bc2c1624a4c25b9 ] The VSPD and FCPVD nodes have overlapping register ranges, as the FCPVD devices are mapped in the memory range usually used by the VSP LUT and CLU, which are not present in the VSPD. Fix this by shortening the VS

[PATCH AUTOSEL 4.18 108/136] scsi: bnx2i: add error handling for ioremap_nocache

2018-09-16 Thread Sasha Levin
From: Zhouyang Jia [ Upstream commit aa154ea885eb0c2407457ce9c1538d78c95456fa ] When ioremap_nocache fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling ioremap_nocache. Signed-off-by: Zhouyang Jia Reviewed-by: Johannes Thumsh

[PATCH AUTOSEL 4.18 112/136] spi: orion: fix CS GPIO handling again

2018-09-16 Thread Sasha Levin
From: Jan Kundrát [ Upstream commit fb9acf5f1f21f1de193523ff780bda375b4c2e21 ] The code did not de-assert any CS GPIOs before probing slaves. This means that several CS signals could be active at once, garbling the communication. Whether this was actually a problem depended on the type of the SP

[PATCH AUTOSEL 4.18 107/136] perf/x86/intel/lbr: Fix incomplete LBR call stack

2018-09-16 Thread Sasha Levin
From: Kan Liang [ Upstream commit 0592e57b24e7e05ec1f4c50b9666c013abff7017 ] LBR has a limited stack size. If a task has a deeper call stack than LBR's stack size, only the overflowed part is reported. A complete call stack may not be reconstructed by perf tool. Current code doesn't access all

[PATCH AUTOSEL 4.18 096/136] drm/omap: gem: Fix mm_list locking

2018-09-16 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 5117bd898e8c0a31e8ab3a9b8523aecf0706e997 ] - None of the list walkings where protected. - Switch to a mutex since the list walking at device resume time can sleep when pinning buffers through the tiler. Only thing we need to be careful with here is that

[PATCH AUTOSEL 4.18 097/136] ARM: mvebu: declare asm symbols as character arrays in pmsu.c

2018-09-16 Thread Sasha Levin
From: Ethan Tuttle [ Upstream commit d0d378ff451a66e486488eec842e507d28145813 ] With CONFIG_FORTIFY_SOURCE, memcpy uses the declared size of operands to detect buffer overflows. If src or dest is declared as a char, attempts to copy more than byte will result in a fortify_panic(). Address this

[PATCH AUTOSEL 4.18 100/136] perf/hw_breakpoint: Split attribute parse and commit

2018-09-16 Thread Sasha Levin
From: Frederic Weisbecker [ Upstream commit 9a4903dde2c8633c5fcf887b98c4e047a6154a54 ] arch_validate_hwbkpt_settings() mixes up attribute check and commit into a single code entity. Therefore the validation may return an error due to incorrect atributes while still leaving halfway modified archi

[PATCH AUTOSEL 4.18 099/136] Documentation/process: fix reST table border error

2018-09-16 Thread Sasha Levin
From: Randy Dunlap [ Upstream commit cccd289f12d0e827070c847b1ff96ba02eb20eaf ] Fix reST error in Documentation/process/: Documentation/process/2.Process.rst:131: ERROR: Malformed table. Bottom/header table border does not match top border. Fixes: 8962e40c1993 ("docs: update kernel versions an

[PATCH AUTOSEL 4.18 092/136] rndis_wlan: potential buffer overflow in rndis_wlan_auth_indication()

2018-09-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit ae636fb1554833ee5133ca47bf4b2791b6739c52 ] This is a static checker fix, not something I have tested. The issue is that on the second iteration through the loop, we jump forward by le32_to_cpu(auth_req->length) bytes. The problem is that if the length is m

[PATCH AUTOSEL 4.18 098/136] RDMA/uverbs: Don't overwrite NULL pointer with ZERO_SIZE_PTR

2018-09-16 Thread Sasha Levin
From: Leon Romanovsky [ Upstream commit a5cc9831af05e658543593abaee45a29d061bac4 ] Number of specs is provided by user and in valid case can be equal to zero. Such argument causes to call to kcalloc() with zero-length request and in return the ZERO_SIZE_PTR is assigned. This pointer is different

[PATCH AUTOSEL 4.18 103/136] HID: i2c-hid: Use devm to allocate i2c_hid struct

2018-09-16 Thread Sasha Levin
From: Stephen Boyd [ Upstream commit d6f83894110de247a81392ab7ef89e5498df7e80 ] Use devm here to save some lines and prepare for bulk regulator usage in this driver. Otherwise, when we devm bulk get regulators we'll free the containing i2c_hid structure and try to put regulator pointers from fre

[PATCH AUTOSEL 4.18 102/136] HID: hid-ntrig: add error handling for sysfs_create_group

2018-09-16 Thread Sasha Levin
From: Zhouyang Jia [ Upstream commit 44d4d51de9a3534a2b63d69efda02a10e66541e4 ] When sysfs_create_group fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling sysfs_create_group. Signed-off-by: Zhouyang Jia Signed-off-by: Jiri Ko

[PATCH v3 0/3] i2c: designware: select gpio/default pin when prepare/unprepare recovery

2018-09-16 Thread Jisheng Zhang
On some platforms, the sda/scl pins are muxed with gpio functions, so they could be used for recovery. Select the gpio/default pin function when prepare/unprepare recovery. patch1 adds the missing scl-gpios, sda-gpios properties binding doc. patch2 adds the pintrl property for i2c bus recovery. pa

[PATCH AUTOSEL 4.18 095/136] wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()

2018-09-16 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit 4ec7cece87b3ed21ffcd407c62fb2f151a366bc1 ] Otherwise we can get: WARNING: CPU: 0 PID: 55 at drivers/net/wireless/ti/wlcore/io.h:84 I've only seen this few times with the runtime PM patches enabled so this one is probably not needed before that. This seems

[PATCH v3 1/3] dt-bindings: i2c: designware: add optional gpio recovery properties

2018-09-16 Thread Jisheng Zhang
Document the scl-gpios and sda-gpios properties for bus recovery. Signed-off-by: Jisheng Zhang --- Documentation/devicetree/bindings/i2c/i2c-designware.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetr

[PATCH AUTOSEL 4.18 093/136] brcmsmac: fix wrap around in conversion from constant to s16

2018-09-16 Thread Sasha Levin
From: Stefan Agner [ Upstream commit c9a61469fc97672a08b2f798830a55ea6e03dc4a ] The last value in the log_table wraps around to a negative value since s16 has a value range of -32768 to 32767. This is not what the table intends to represent. Use the closest positive value 32767. This fixes a wa

[PATCH AUTOSEL 4.18 101/136] arm: dts: mediatek: Add missing cooling device properties for CPUs

2018-09-16 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit 0c7f7a5150023f3c6f0b27c4d4940ce3dfaf62cc ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then t

[PATCH AUTOSEL 4.18 077/136] staging: mt7621-eth: Fix memory leak in mtk_add_mac() error path

2018-09-16 Thread Sasha Levin
From: Kamal Heib [ Upstream commit 85e1d42663a0c163002961d2685be952067b0dc2 ] Fix memory leak in error path of mtk_add_mac() by make sure to free the allocated netdev. Fixes: e3cbf478f846 ('staging: mt7621-eth: add the drivers core files') Signed-off-by: Kamal Heib Signed-off-by: Greg Kroah-Ha

[PATCH AUTOSEL 4.18 091/136] mt76x2: fix mrr idx/count estimation in mt76x2_mac_fill_tx_status()

2018-09-16 Thread Sasha Levin
From: Lorenzo Bianconi [ Upstream commit 2d1e9be0016230f3707812243561fbd16f1aea4b ] Fix mcs and attempt count estimation in mt76x2_mac_fill_tx_status routine if the number of tx retries reported by the hw is grater than IEEE80211_TX_MAX_RATES Fixes: 7bc04215a66b ("mt76: add driver code for MT76

[PATCH AUTOSEL 4.18 087/136] drm/sun4i: Enable DW HDMI PHY clock

2018-09-16 Thread Sasha Levin
From: Jernej Skrabec [ Upstream commit 09773c532d30187f86a142901c27c93e629ce6ba ] Current DW HDMI PHY code never prepares and enables PHY clock after it is created. It's just used as it is. This may work in some cases, but it's clearly wrong. Fix it by adding proper calls to enable/disable PHY c

[PATCH AUTOSEL 4.18 086/136] ath10k: protect ath10k_htt_rx_ring_free with rx_ring.lock

2018-09-16 Thread Sasha Levin
From: Ben Greear [ Upstream commit 168f75f11fe68455e0d058a818ebccfc329d8685 ] While debugging driver crashes related to a buggy firmware crashing under load, I noticed that ath10k_htt_rx_ring_free could be called without being under lock. I'm not sure if this is the root cause of the crash or n

[PATCH AUTOSEL 4.18 078/136] drivers/tty: add error handling for pcmcia_loop_config

2018-09-16 Thread Sasha Levin
From: Zhouyang Jia [ Upstream commit 85c634e919bd6ef17427f26a52920aeba12e16ee ] When pcmcia_loop_config fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling pcmcia_loop_config. Signed-off-by: Zhouyang Jia Signed-off-by: Greg Kr

[PATCH AUTOSEL 4.18 076/136] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-09-16 Thread Sasha Levin
From: Akinobu Mita [ Upstream commit 0b964d183cbf3f95a062ad9f3eec87ffa2790558 ] The ov772x driver only works when the i2c controller have I2C_FUNC_PROTOCOL_MANGLING. However, many i2c controller drivers don't support it. The reason that the ov772x requires I2C_FUNC_PROTOCOL_MANGLING is that it

[PATCH AUTOSEL 4.18 088/136] net: phy: xgmiitorgmii: Check phy_driver ready before accessing

2018-09-16 Thread Sasha Levin
From: Brandon Maier [ Upstream commit ab4e6ee578e88a659938db8fbf33720bc048d29c ] Since a phy_device is added to the global mdio_bus list during phy_device_register(), but a phy_device's phy_driver doesn't get attached until phy_probe(). It's possible of_phy_find_device() in xgmiitorgmii will ret

[PATCH AUTOSEL 4.18 074/136] media: ov772x: add checks for register read errors

2018-09-16 Thread Sasha Levin
From: Akinobu Mita [ Upstream commit 30f3b17eaf4913e9e56be15915ce57aae69db701 ] This change adds checks for register read errors and returns correct error code. Cc: Laurent Pinchart Cc: Hans Verkuil Reviewed-by: Jacopo Mondi Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-of

[PATCH AUTOSEL 4.18 075/136] staging: android: ashmem: Fix mmap size validation

2018-09-16 Thread Sasha Levin
From: Alistair Strachan [ Upstream commit 8632c614565d0c5fdde527889601c018e97b6384 ] The ashmem driver did not check that the size/offset of the vma passed to its .mmap() function was not larger than the ashmem object being mapped. This could cause mmap() to succeed, even though accessing parts

[PATCH AUTOSEL 4.18 085/136] net: phy: xgmiitorgmii: Check read_status results

2018-09-16 Thread Sasha Levin
From: Brandon Maier [ Upstream commit 8d0752d11312be830c33e84dfd1016e6a47c2938 ] We're ignoring the result of the attached phy device's read_status(). Return it so we can detect errors. Signed-off-by: Brandon Maier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha

[PATCH v3 2/3] dt-bindings: i2c: designware: add optional pinctrl for bus recovery

2018-09-16 Thread Jisheng Zhang
Document the pinctrl property for bus recovery. Signed-off-by: Jisheng Zhang --- Documentation/devicetree/bindings/i2c/i2c-designware.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2

[PATCH AUTOSEL 4.18 083/136] ASoC: qdsp6: qdafe: fix some off by one bugs

2018-09-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit c54c1c5ee8e73b7cb752834e52e2129b1dab00bd ] The > should be >= or we could read one element beyond the end of the port_maps[] array. Fixes: 7fa2d70f9766 ("ASoC: qdsp6: q6afe: Add q6afe driver") Signed-off-by: Dan Carpenter Acked-by: Srinivas Kandagatla Sig

[PATCH AUTOSEL 4.18 084/136] ALSA: hda: Add AZX_DCAPS_PM_RUNTIME for AMD Raven Ridge

2018-09-16 Thread Sasha Levin
From: Kai-Heng Feng [ Upstream commit 1adca4b0cd65c14cb8b8c9c257720385869c3d5f ] This patch can make audio controller in AMD Raven Ridge gets runtime suspended to D3, to save ~1W power when it's not in use. Cc: Vijendar Mukunda Signed-off-by: Kai-Heng Feng Signed-off-by: Takashi Iwai Signed-

[PATCH AUTOSEL 4.18 072/136] media: soc_camera: ov772x: correct setting of banding filter

2018-09-16 Thread Sasha Levin
From: Akinobu Mita [ Upstream commit 22216ec41e919682c15345e95928f266e8ba6f9e ] The banding filter ON/OFF is controlled via bit 5 of COM8 register. It is attempted to be enabled in ov772x_set_params() by the following line. ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, 1); But this

[PATCH AUTOSEL 4.18 073/136] media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data

2018-09-16 Thread Sasha Levin
From: Javier Martinez Canillas [ Upstream commit 2ec7debd44b49927a6e2861521994cc075a389ed ] The struct clk_init_data init variable is declared in the isp_xclk_init() function so is an automatic variable allocated in the stack. But it's not explicitly zero-initialized, so some init fields are lef

[PATCH AUTOSEL 4.18 068/136] nfp: fail probe if serial or interface id is missing

2018-09-16 Thread Sasha Levin
From: Jakub Kicinski [ Upstream commit 18aa5b180f00a10c2f63944b4f0ab116bf8ea19b ] On some platforms with broken ACPI tables we may not have access to the Serial Number PCIe capability. This capability is crucial for us for switchdev operation as we use serial number as switch ID, and for commun

[PATCH AUTOSEL 4.18 069/136] selftests: forwarding: Tweak tc filters for mirror-to-gretap tests

2018-09-16 Thread Sasha Levin
From: Petr Machata [ Upstream commit ec9fdc99f5a6a2cfe4061e807fcb0cc1129f0a2d ] When running mirror_gre_bridge_1d_vlan tests on veth, several issues cause spurious failures: - vlan_ethtype should be ip, not ipv6 even in mirror-to-ip6gretap case, because the overlay packet is still IPv4. - Sim

Re: [PATCH v2 2/2] power: supply: Add Spreadtrum SC2731 charger support

2018-09-16 Thread Baolin Wang
Hi Sebastian, On 16 September 2018 at 18:17, Sebastian Reichel wrote: > Hi Baolin, > > On Mon, Sep 03, 2018 at 04:55:46PM +0800, Baolin Wang wrote: >> This patch adds the SC2731 PMIC switch charger support. >> >> Signed-off-by: Baolin Wang >> --- > > The power-supply sysfs files uses uA instead

[PATCH AUTOSEL 4.18 071/136] media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power

2018-09-16 Thread Sasha Levin
From: Akinobu Mita [ Upstream commit 30ed2b83343bd1e07884ca7355dac70d25ffc158 ] When the subdevice doesn't provide s_power core ops callback, the v4l2_subdev_call for s_power returns -ENOIOCTLCMD. If the subdevice doesn't have the special handling for its power saving mode, the s_power isn't re

[PATCH AUTOSEL 4.18 062/136] s390/extmem: fix gcc 8 stringop-overflow warning

2018-09-16 Thread Sasha Levin
From: Vasily Gorbik [ Upstream commit 6b2ddf33baec23dace85bd647e3fc4ac070963e8 ] arch/s390/mm/extmem.c: In function '__segment_load': arch/s390/mm/extmem.c:436:2: warning: 'strncat' specified bound 7 equals source length [-Wstringop-overflow=] strncat(seg->res_name, " (DCSS)", 7); What gcc co

[PATCH AUTOSEL 4.18 061/136] s390/scm_blk: correct numa_node in scm_blk_dev_setup

2018-09-16 Thread Sasha Levin
From: Vasily Gorbik [ Upstream commit d642d6262f4fcfa5d200ec6e218c17f0c15b3390 ] The numa_node field of the tag_set struct has to be explicitly initialized, otherwise it stays as 0, which is a valid numa node id and cause memory allocation failure if node 0 is offline. Acked-by: Sebastian Ott

[PATCH AUTOSEL 4.18 081/136] staging: mt7621-dts: Fix remaining pcie warnings

2018-09-16 Thread Sasha Levin
From: Rosen Penev [ Upstream commit d0233204fbc10f003d1ef077f57341c2feca4002 ] This currently fixes the remaining dtb warnings: Node /pcie@1e14/pcie0 has a reg or ranges property, but no unit name Node /pcie@1e14/pcie1 has a reg or ranges property, but no unit name Node /pcie@1e14/p

[PATCH AUTOSEL 4.18 056/136] platform/x86: asus-wireless: Fix uninitialized symbol usage

2018-09-16 Thread Sasha Levin
From: João Paulo Rechi Vita [ Upstream commit eca4c4e47eb0658ad251f0bff465e23c055377da ] 'ret' will not be initialized if acpi_evaluate_integer() returns through an error path, so it should not be used in this case. This fixes the following Smatch static analyser error: drivers/platform/x86/as

[PATCH AUTOSEL 4.18 051/136] scsi: target: Avoid that EXTENDED COPY commands trigger lock inversion

2018-09-16 Thread Sasha Levin
From: Bart Van Assche [ Upstream commit 36d4cb460bcbe2a1323732a6e4bb9dd783284368 ] The approach for adding a device to the devices_idr data structure and for removing it is as follows: * &dev->dev_group.cg_item is initialized before a device is added to devices_idr. * If the reference count

[PATCH AUTOSEL 4.18 053/136] ath10k: sdio: use same endpoint id for all packets in a bundle

2018-09-16 Thread Sasha Levin
From: Alagu Sankar [ Upstream commit 679e1f07c86221b7183dd69df7068fd42d0041f6 ] All packets in a bundle should use the same endpoint id as the first lookahead. This matches how things are done is ath6kl, however, this patch can theoretically handle several bundles in ath10k_sdio_mbox_rx_process

[PATCH AUTOSEL 4.18 050/136] scsi: ibmvscsi: Improve strings handling

2018-09-16 Thread Sasha Levin
From: Breno Leitao [ Upstream commit 1262dc09dc9ae7bf4ad00b6a2c5ed6a6936bcd10 ] Currently an open firmware property is copied into partition_name variable without keeping a room for \0. Later one, this variable (partition_name), which is 97 bytes long, is strncpyed into ibmvcsci_host_data->mada

[PATCH AUTOSEL 4.18 042/136] include/rdma/opa_addr.h: Fix an endianness issue

2018-09-16 Thread Sasha Levin
From: Bart Van Assche [ Upstream commit 4eefd62c17a9a5e7576207e84f3d2b4f73aba750 ] IB_MULTICAST_LID_BASE is defined as follows: #define IB_MULTICAST_LID_BASE cpu_to_be16(0xC000) Hence use be16_to_cpu() to convert it to CPU endianness. Compile-tested only. Fixes: af808ece5ce9 ("IB/SA: Chec

[PATCH AUTOSEL 4.18 049/136] scsi: klist: Make it safe to use klists in atomic context

2018-09-16 Thread Sasha Levin
From: Bart Van Assche [ Upstream commit 624fa7790f80575a4ec28fbdb2034097dc18d051 ] In the scsi_transport_srp implementation it cannot be avoided to iterate over a klist from atomic context when using the legacy block layer instead of blk-mq. Hence this patch that makes it safe to use klists in a

[PATCH v3 3/3] i2c: designware: select gpio/default pin when prepare/unprepare recovery

2018-09-16 Thread Jisheng Zhang
On some platforms, the sda/scl pins are muxed with gpio functions, so they could be used for recovery. Select the gpio/default pin function when prepare/unprepare recovery. Signed-off-by: Jisheng Zhang --- drivers/i2c/busses/i2c-designware-core.h | 3 +++ drivers/i2c/busses/i2c-designware-mas

[PATCH AUTOSEL 4.18 054/136] ath10k: sdio: set skb len for all rx packets

2018-09-16 Thread Sasha Levin
From: Alagu Sankar [ Upstream commit 8530b4e7b22bc3bd8240579f3844c73947cd5f71 ] Without this, packets larger than 1500 will silently be dropped. Easily reproduced by sending a ping packet with a size larger than 1500. Co-Developed-by: Niklas Cassel Signed-off-by: Alagu Sankar Signed-off-by: N

[PATCH AUTOSEL 4.18 058/136] s390/sysinfo: add missing #ifdef CONFIG_PROC_FS

2018-09-16 Thread Sasha Levin
From: Heiko Carstens [ Upstream commit 9f35b818a2f90fb6cb291aa0c9f835d4f0974a9a ] Get rid of this compile warning for !PROC_FS: CC arch/s390/kernel/sysinfo.o arch/s390/kernel/sysinfo.c:275:12: warning: 'sysinfo_show' defined but not used [-Wunused-function] static int sysinfo_show(stru

[PATCH AUTOSEL 4.18 057/136] ACPI / button: increment wakeup count only when notified

2018-09-16 Thread Sasha Levin
From: Ravi Chandra Sadineni [ Upstream commit 7c058c7c74b3dbeb7d157c273959f87faf710350 ] Because acpi_lid_initialize_state() is called on every system resume and it triggers acpi_lid_notify_state() which invokes acpi_pm_wakeup_event() for the lid device, the lid's wakeup count is incremented eve

[PATCH AUTOSEL 4.18 017/136] power: vexpress: fix corruption in notifier registration

2018-09-16 Thread Sasha Levin
From: Sudeep Holla [ Upstream commit 09bebb1adb21ecd04adf7ccb3b06f73e3a851e93 ] Vexpress platforms provide two different restart handlers: SYS_REBOOT that restart the entire system, while DB_RESET only restarts the daughter board containing the CPU. DB_RESET is overridden by SYS_REBOOT if it exi

[PATCH AUTOSEL 4.18 046/136] ARM: dts: ls1021a: Add missing cooling device properties for CPUs

2018-09-16 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit 47768f372eae030db6fab5225f9504a820d2c07f ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then t

[PATCH AUTOSEL 4.18 045/136] x86/entry/64: Add two more instruction suffixes

2018-09-16 Thread Sasha Levin
From: Jan Beulich [ Upstream commit 6709812f094d96543b443645c68daaa32d3d3e77 ] Sadly, other than claimed in: a368d7fd2a ("x86/entry/64: Add instruction suffix") ... there are two more instances which want to be adjusted. As said there, omitting suffixes from instructions in AT&T mode is bad

[PATCH AUTOSEL 4.18 039/136] media: staging/imx: fill vb2_v4l2_buffer field entry

2018-09-16 Thread Sasha Levin
From: Peter Seiderer [ Upstream commit a38d4b71cb7a12b65317f4e3d59883a918957719 ] - fixes gstreamer v4l2src warning: 0:00:00.716640334 349 0x164f720 WARN v4l2bufferpool gstv4l2bufferpool.c:1195:gst_v4l2_buffer_pool_dqbuf: Driver should never set v4l2_buffer.field to ANY - fixes v4l2-com

[PATCH AUTOSEL 4.18 038/136] vhost_net: Avoid tx vring kicks during busyloop

2018-09-16 Thread Sasha Levin
From: Toshiaki Makita [ Upstream commit 027b17603b030f1334ade079b7a3e986569c956b ] Under heavy load vhost busypoll may run without suppressing notification. For example tx zerocopy callback can push tx work while handle_tx() is running, then busyloop exits due to vhost_has_work() condition and e

[PATCH AUTOSEL 4.18 036/136] powerpc/kdump: Handle crashkernel memory reservation failure

2018-09-16 Thread Sasha Levin
From: Hari Bathini [ Upstream commit 8950329c4a64c6d3ca0bc34711a1afbd9ce05657 ] Memory reservation for crashkernel could fail if there are holes around kdump kernel offset (128M). Fail gracefully in such cases and print an error message. Signed-off-by: Hari Bathini Tested-by: David Gibson Rev

[PATCH AUTOSEL 4.18 044/136] ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled

2018-09-16 Thread Sasha Levin
From: Dave Gerlach [ Upstream commit 6d609b35c815ba20132b7b64bcca04516bb17c56 ] When the RTC lock and unlock functions were introduced it was likely assumed that they would always be called from irq enabled context, hence the use of local_irq_disable/enable. This is no longer true as the RTC+DDR

Re: [PATCH v3 0/3] i2c: designware: select gpio/default pin when prepare/unprepare recovery

2018-09-16 Thread Jisheng Zhang
+ DT maintainers On Mon, 17 Sep 2018 11:26:33 +0800 Jisheng Zhang wrote: > On some platforms, the sda/scl pins are muxed with gpio functions, so > they could be used for recovery. Select the gpio/default pin function > when prepare/unprepare recovery. > > patch1 adds the missing scl-gpios, sda-

[PATCH AUTOSEL 4.18 043/136] x86/tsc: Add missing header to tsc_msr.c

2018-09-16 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit dbd0fbc76c77daac08ddd245afdcbade0d506e19 ] Add a missing header otherwise compiler warns about missed prototype: CC arch/x86/kernel/tsc_msr.o arch/x86/kernel/tsc_msr.c:73:15: warning: no previous prototype for ‘cpu_khz_from_msr’ [-Wmissing-prototype

[PATCH AUTOSEL 4.18 040/136] media: sta2x11: Add video_device and vb2_queue locks

2018-09-16 Thread Sasha Levin
From: Ezequiel Garcia [ Upstream commit cd63c0288fd760ce7de247fba618e2bbcfc0c35c ] Currently, this driver does not serialize its video4linux ioctls, which is a bug, as race conditions might appear. In addition, video_device and vb2_queue locks are now both mandatory. Add them, and implement wai

[PATCH AUTOSEL 4.18 037/136] media: fsl-viu: fix error handling in viu_of_probe()

2018-09-16 Thread Sasha Levin
From: Alexey Khoroshilov [ Upstream commit 662a99e145661c2b35155cf375044deae9b79896 ] viu_of_probe() ignores fails in i2c_get_adapter(), tries to unlock uninitialized mutex on error path. The patch streamlining the error handling in viu_of_probe(). Found by Linux Driver Verification project (l

[PATCH AUTOSEL 4.18 033/136] IB/core: type promotion bug in rdma_rw_init_one_mr()

2018-09-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit c2d7c8ff89b22ddefb1ac2986c0d48444a667689 ] "nents" is an unsigned int, so if ib_map_mr_sg() returns a negative error code then it's type promoted to a high unsigned int which is treated as success. Fixes: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API"

[PATCH AUTOSEL 4.18 031/136] RDMA/bnxt_re: Fix a bunch of off by one bugs in qplib_fp.c

2018-09-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit c1dfc0114c901b4f46c85ceff0491debf2b2a2ec ] The srq->swq[] is allocated in bnxt_qplib_create_srq(). It has srq->hwq.max_elements elements so these tests should be > instead of >= or we might go beyond the end of the array. Fixes: 1ac5a4047975 ("RDMA/bnxt_re

[PATCH AUTOSEL 4.18 034/136] media: exynos4-is: Prevent NULL pointer dereference in __isp_video_try_fmt()

2018-09-16 Thread Sasha Levin
From: Sylwester Nawrocki [ Upstream commit 7c1b9a5aeed91bef98988ac0fcf38c8c1f4f9a3a ] This patch fixes potential NULL pointer dereference as indicated by the following static checker warning: drivers/media/platform/exynos4-is/fimc-isp-video.c:408 isp_video_try_fmt_mplane() error: NULL derefere

[PATCH AUTOSEL 4.18 035/136] IB/mlx4: Test port number before querying type.

2018-09-16 Thread Sasha Levin
From: Tarick Bedeir [ Upstream commit f1228867adaf8890826f2b59e4caddb1c5cc2df7 ] rdma_ah_find_type() can reach into ib_device->port_immutable with a potentially out-of-bounds port number, so check that the port number is valid first. Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah

[PATCH AUTOSEL 4.18 023/136] s390/mm: correct allocate_pgste proc_handler callback

2018-09-16 Thread Sasha Levin
From: Vasily Gorbik [ Upstream commit 5bedf8aa03c28cb8dc98bdd32a41b66d8f7d3eaa ] Since proc_dointvec does not perform value range control, proc_dointvec_minmax should be used to limit value range, which is clearly intended here, as the internal representation of the value: unsigned int alloc_pg

[PATCH AUTOSEL 4.18 022/136] iommu/msm: Don't call iommu_device_{,un}link from atomic context

2018-09-16 Thread Sasha Levin
From: Niklas Cassel [ Upstream commit 379521462e4add27f3514da8e4ab1fd7a54fe1c7 ] Fixes the following splat during boot: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 77, name: kworker/2:1 4 locks held by kworker/2:1/7

Re: [PATCH v3 1/3] dt-bindings: i2c: designware: add optional gpio recovery properties

2018-09-16 Thread Jisheng Zhang
+ DT maintainers On Mon, 17 Sep 2018 11:27:41 +0800 Jisheng Zhang wrote: > Document the scl-gpios and sda-gpios properties for bus recovery. > > Signed-off-by: Jisheng Zhang > --- > Documentation/devicetree/bindings/i2c/i2c-designware.txt | 6 ++ > 1 file changed, 6 insertions(+) > > dif

[PATCH AUTOSEL 4.18 024/136] power: remove possible deadlock when unregistering power_supply

2018-09-16 Thread Sasha Levin
From: Benjamin Tissoires [ Upstream commit 3ffa6583e24e1ad1abab836d24bfc9d2308074e5 ] If a device gets removed right after having registered a power_supply node, we might enter in a deadlock between the remove call (that has a lock on the parent device) and the deferred register work. Allow the

[PATCH AUTOSEL 4.18 012/136] staging: rts5208: fix missing error check on call to rtsx_write_register

2018-09-16 Thread Sasha Levin
From: Colin Ian King [ Upstream commit c5fae4f4fd28189b1062fb8ef7b21fec37cb8b17 ] Currently the check on error return from the call to rtsx_write_register is checking the error status from the previous call. Fix this by adding in the missing assignment of retval. Detected by CoverityScan, CID#7

[PATCH AUTOSEL 4.18 019/136] Bluetooth: Add a new Realtek 8723DE ID 0bda:b009

2018-09-16 Thread Sasha Levin
From: Jian-Hong Pan [ Upstream commit 45ae68b8cfc25bdbffc11248001c47ab1b76ff6e ] Without this patch we cannot turn on the Bluethooth adapter on HP 14-bs007la. T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vend

[PATCH AUTOSEL 4.18 013/136] power: supply: axp288_charger: Fix initial constant_charge_current value

2018-09-16 Thread Sasha Levin
From: Hans de Goede [ Upstream commit f2a42595f0865886a2d40524b0e9d15600848670 ] We should look at val which contains the value read from the register, not ret which is always 0 on a successful read. Signed-off-by: Hans de Goede Fixes: eac53b3664f59 ("power: supply: axp288_charger: Drop platfo

<    1   2   3   4   5   6   >