[PATCH 4.9 158/175] ceph: fix race in concurrent __ceph_remove_cap invocations

2020-12-28 Thread Greg Kroah-Hartman
From: Luis Henriques commit e5cafce3ad0f8652d6849314d951459c2bff7233 upstream. A NULL pointer dereference may occur in __ceph_remove_cap with some of the callbacks used in ceph_iterate_session_caps, namely trim_caps_cb and remove_session_caps_cb. Those callers hold the session->s_mutex, so they

[PATCH 4.9 148/175] USB: serial: keyspan_pda: fix write-wakeup use-after-free

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit 37faf50615412947868c49aee62f68233307f4e4 upstream. The driver's deferred write wakeup was never flushed on disconnect, something which could lead to the driver port data being freed while the wakeup work is still scheduled. Fix this by using the usb-serial write wakeup

[PATCH 4.9 171/175] iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume

2020-12-28 Thread Greg Kroah-Hartman
From: Qinglang Miao commit 560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b upstream. Fix the missing clk_disable_unprepare() of info->pclk before return from rockchip_saradc_resume in the error handling case when fails to prepare and enable info->clk. Suggested-by: Robin Murphy Fixes: 44d6f2ef94f9 ("

[PATCH 4.9 157/175] powerpc/xmon: Change printk() to pr_cont()

2020-12-28 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 7c6c86b36a36dd4a13d30bba07718e767aa2e7a1 upstream. Since some time now, printk() adds carriage return, leading to unusable xmon output if there is no udbg backend available: [ 54.288722] sysrq: Entering xmon [ 54.292209] Vector: 0 at [cace3d2c] [ 54.29

[PATCH 4.9 153/175] Btrfs: fix selftests failure due to uninitialized i_mode in test inodes

2020-12-28 Thread Greg Kroah-Hartman
From: Filipe Manana commit 9f7fec0ba89108b9385f1b9fb167861224912a4a upstream Some of the self tests create a test inode, setup some extents and then do calls to btrfs_get_extent() to test that the corresponding extent maps exist and are correct. However btrfs_get_extent(), since the 5.2 merge wi

[PATCH 4.9 167/175] spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path

2020-12-28 Thread Greg Kroah-Hartman
From: Lukas Wunner commit 5ef76dac0f2c26aeae4ee79eb830280f16d5aceb upstream. If the calls to devm_platform_ioremap_resource(), irq_of_parse_and_map() or devm_request_irq() fail on probe of the ST SSC4 SPI driver, the runtime PM disable depth is incremented even though it was not decremented befo

[PATCH 4.9 150/175] USB: serial: keyspan_pda: fix write unthrottling

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit 320f9028c7873c3c7710e8e93e5c979f4c857490 upstream. The driver did not update its view of the available device buffer space until write() was called in task context. This meant that write_room() would return 0 even after the device had sent a write-unthrottle notificatio

[PATCH 4.9 168/175] soc: qcom: smp2p: Safely acquire spinlock without IRQs

2020-12-28 Thread Greg Kroah-Hartman
From: Evan Green commit fc3e62e25c3896855b7c3d72df19ca6be3459c9f upstream. smp2p_update_bits() should disable interrupts when it acquires its spinlock. This is important because without the _irqsave, a priority inversion can occur. This function is called both with interrupts enabled in qcom_q6

[PATCH 4.9 149/175] USB: serial: keyspan_pda: fix tx-unthrottle use-after-free

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit 49fbb8e37a961396a5b6c82937c70df91de45e9d upstream. The driver's transmit-unthrottle work was never flushed on disconnect, something which could lead to the driver port data being freed while the unthrottle work is still scheduled. Fix this by cancelling the unthrottle

[PATCH 4.9 127/175] clk: s2mps11: Fix a resource leak in error handling paths in the probe function

2020-12-28 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit d2d94fc567624f96187e8b52083795620f93e69f ] Some resource should be released in the error handling path of the probe function, as already done in the remove function. The remove function was fixed in commit bf416bd45738 ("clk: s2mps11: Add missing of_no

[PATCH 4.9 121/175] net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function

2020-12-28 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 322e53d1e2529ae9d501f5e0f20604a79b873aef ] 'irq_of_parse_and_map()' should be balanced by a corresponding 'irq_dispose_mapping()' call. Otherwise, there is some resources leaks. Add such a call in the error handling path of the probe function and in th

[PATCH 4.9 147/175] USB: serial: keyspan_pda: fix stalled writes

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit c01d2c58698f710c9e13ba3e2d296328606f74fd upstream. Make sure to clear the write-busy flag also in case no new data was submitted due to lack of device buffer space so that writing is resumed once space again becomes available. Fixes: 507ca9bc0476 ("[PATCH] USB: add abi

[PATCH 4.9 146/175] USB: serial: keyspan_pda: fix write deadlock

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit 7353cad7ee4deaefc16e94727e69285563e219f6 upstream. The write() callback can be called in interrupt context (e.g. when used as a console) so interrupts must be disabled while holding the port lock to prevent a possible deadlock. Fixes: e81ee637e4ae ("usb-serial: possibl

[PATCH 4.9 118/175] powerpc/ps3: use dma_mapping_error()

2020-12-28 Thread Greg Kroah-Hartman
From: Vincent Stehlé [ Upstream commit d0edaa28a1f7830997131cbce87b6c52472825d1 ] The DMA address returned by dma_map_single() should be checked with dma_mapping_error(). Fix the ps3stor_setup() function accordingly. Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core") Signed-off-by: Vinc

[PATCH 4.9 126/175] qlcnic: Fix error code in probe

2020-12-28 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 0d52848632a357948028eab67ff9b7cc0c12a0fb ] Return -EINVAL if we can't find the correct device. Currently it returns success. Fixes: 13159183ec7a ("qlcnic: 83xx base driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwa

[PATCH 4.9 165/175] spi: rb4xx: Dont leak SPI master in probe error path

2020-12-28 Thread Greg Kroah-Hartman
From: Lukas Wunner commit a4729c3506c3eb1a6ca5c0289f4e7cafa4115065 upstream. If the calls to devm_clk_get(), devm_spi_register_master() or clk_prepare_enable() fail on probe of the Mikrotik RB4xx SPI driver, the spi_master struct is erroneously not freed. Fix by switching over to the new devm_s

[PATCH 4.9 119/175] checkpatch: fix unescaped left brace

2020-12-28 Thread Greg Kroah-Hartman
From: Dwaipayan Ray [ Upstream commit 03f4935135b9efeb780b970ba023c201f81cf4e6 ] There is an unescaped left brace in a regex in OPEN_BRACE check. This throws a runtime error when checkpatch is run with --fix flag and the OPEN_BRACE check is executed. Fix it by escaping the left brace. Link: h

[PATCH 4.9 093/175] pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe()

2020-12-28 Thread Greg Kroah-Hartman
From: Yu Kuai [ Upstream commit 89cce2b3f247a434ee174ab6803698041df98014 ] if of_find_device_by_node() succeed, pinctrl_falcon_probe() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: e316cb2b16bb ("OF: pinct

[PATCH 4.9 125/175] perf record: Fix memory leak when using --user-regs=? to list registers

2020-12-28 Thread Greg Kroah-Hartman
From: Zheng Zengkai [ Upstream commit 2eb5dd418034ecea2f7031e3d33f2991a878b148 ] When using 'perf record's option '-I' or '--user-regs=' along with argument '?' to list available register names, memory of variable 'os' allocated by strdup() needs to be released before __parse_regs() returns, oth

[PATCH 4.9 145/175] USB: serial: keyspan_pda: fix dropped unthrottle interrupts

2020-12-28 Thread Greg Kroah-Hartman
From: Johan Hovold commit 696c541c8c6cfa05d65aa24ae2b9e720fc01766e upstream. Commit c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") broke write-unthrottle handling by dropping well-formed unthrottle-interrupt packets which are precisely two bytes long. This could lead to blo

[PATCH 4.9 133/175] media: netup_unidvb: Dont leak SPI master in probe error path

2020-12-28 Thread Greg Kroah-Hartman
From: Lukas Wunner commit e297ddf296de35037fa97f4302782def196d350a upstream. If the call to spi_register_master() fails on probe of the NetUP Universal DVB driver, the spi_master struct is erroneously not freed. Likewise, if spi_new_device() fails, the spi_controller struct is not unregistered.

[PATCH 4.9 103/175] seq_buf: Avoid type mismatch for seq_buf_init

2020-12-28 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit d9a9280a0d0ae51dc1d4142138b99242b7ec8ac6 ] Building with W=2 prints a number of warnings for one function that has a pointer type mismatch: linux/seq_buf.h: In function 'seq_buf_init': linux/seq_buf.h:35:12: warning: pointer targets in assignment from 'unsi

[PATCH 4.9 092/175] clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent()

2020-12-28 Thread Greg Kroah-Hartman
From: Yu Kuai [ Upstream commit eee422c46e6840a81c9db18a497b74387a557b29 ] If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Repor

[PATCH 4.9 113/175] extcon: max77693: Fix modalias string

2020-12-28 Thread Greg Kroah-Hartman
From: Marek Szyprowski [ Upstream commit e1efdb604f5c9903a5d92ef42244009d3c04880f ] The platform device driver name is "max77693-muic", so advertise it properly in the modalias string. This fixes automated module loading when this driver is compiled as a module. Fixes: db1b9037424b ("extcon: MA

[PATCH 4.9 094/175] memstick: r592: Fix error return in r592_probe()

2020-12-28 Thread Greg Kroah-Hartman
From: Jing Xiangfeng [ Upstream commit db29d3d1c2451e673e29c7257471e3ce9d50383a ] Fix to return a error code from the error handling case instead of 0. Fixes: 926341250102 ("memstick: add driver for Ricoh R5C592 card reader") Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/202011

[PATCH 4.9 130/175] Input: goodix - add upside-down quirk for Teclast X98 Pro tablet

2020-12-28 Thread Greg Kroah-Hartman
From: Simon Beginn [ Upstream commit cffdd6d90482316e18d686060a4397902ea04bd2 ] The touchscreen on the Teclast x98 Pro is also mounted upside-down in relation to the display orientation. Signed-off-by: Simon Beginn Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20201117004253.2

[PATCH 4.9 129/175] Input: cros_ec_keyb - send scancodes in addition to key events

2020-12-28 Thread Greg Kroah-Hartman
From: Dmitry Torokhov [ Upstream commit 80db2a087f425b63f0163bc95217abd01c637cb5 ] To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN capab

[PATCH 4.9 089/175] NFS: switch nfsiod to be an UNBOUND workqueue.

2020-12-28 Thread Greg Kroah-Hartman
From: NeilBrown [ Upstream commit bf701b765eaa82dd164d65edc5747ec7288bb5c3 ] nfsiod is currently a concurrency-managed workqueue (CMWQ). This means that workitems scheduled to nfsiod on a given CPU are queued behind all other work items queued on any CMWQ on the same CPU. This can introduce une

[PATCH 4.9 111/175] x86/kprobes: Restore BTF if the single-stepping is cancelled

2020-12-28 Thread Greg Kroah-Hartman
From: Masami Hiramatsu [ Upstream commit 78ff2733ff352175eb7f4418a34654346e1b6cd2 ] Fix to restore BTF if single-stepping causes a page fault and it is cancelled. Usually the BTF flag was restored when the single stepping is done (in resume_execution()). However, if a page fault happens on the

[PATCH 4.9 128/175] cfg80211: initialize rekey_data

2020-12-28 Thread Greg Kroah-Hartman
From: Sara Sharon [ Upstream commit f495acd8851d7b345e5f0e521b2645b1e1f928a0 ] In case we have old supplicant, the akm field is uninitialized. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.930f0ab7ebee.Ic546e384efab3f4a89f318eafd

Re: [PATCH v3 06/14] include: fwnode.h: Define format macros for ports and endpoints

2020-12-28 Thread Sakari Ailus
Hi Daniel, Andy, On Thu, Dec 24, 2020 at 01:08:59AM +, Daniel Scally wrote: > OF, ACPI and software_nodes all implement graphs including nodes for ports > and endpoints. These are all intended to be named with a common schema, > as "port@n" and "endpoint@n" where n is an unsigned int represent

[PATCH 4.9 109/175] nfsd: Fix message level for normal termination

2020-12-28 Thread Greg Kroah-Hartman
From: kazuo ito [ Upstream commit 4420440c57892779f265108f46f83832a88ca795 ] The warning message from nfsd terminating normally can confuse system adminstrators or monitoring software. Though it's not exactly fair to pin-point a commit where it originated, the current form in the current place

[PATCH 4.9 088/175] lockd: dont use interval-based rebinding over TCP

2020-12-28 Thread Greg Kroah-Hartman
From: Calum Mackay [ Upstream commit 9b82d88d5976e5f2b8015d58913654856576ace5 ] NLM uses an interval-based rebinding, i.e. it clears the transport's binding under certain conditions if more than 60 seconds have elapsed since the connection was last bound. This rebinding is not necessary for an

[PATCH 4.9 108/175] speakup: fix uninitialized flush_lock

2020-12-28 Thread Greg Kroah-Hartman
From: Yang Yingliang [ Upstream commit d1b928ee1cfa965a3327bbaa59bfa005d97fa0fe ] The flush_lock is uninitialized, use DEFINE_SPINLOCK to define and initialize flush_lock. Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory") Reported-by: Hulk Robot Reviewed-by: Samuel Thibault

[PATCH 4.9 106/175] usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit d6ff32478d7e95d6ca199b5c852710d6964d5811 ] The pm_runtime_enable will decrement the power disable depth. Imbalance depth will resulted in enabling runtime PM of device fails later. Thus a pairing decrement must be needed on the error handling path to keep it

[PATCH 4.9 135/175] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"

2020-12-28 Thread Greg Kroah-Hartman
From: Daniel Scally commit 12fc4dad94dfac25599f31257aac181c691ca96f upstream. This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef. Switching this function to AE_CTRL_TERMINATE broke the documented behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in fact, terminate th

[PATCH 4.9 134/175] Input: cyapa_gen6 - fix out-of-bounds stack access

2020-12-28 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit f051ae4f6c732c231046945b36234e977f8467c6 upstream. gcc -Warray-bounds warns about a serious bug in cyapa_pip_retrieve_data_structure: drivers/input/mouse/cyapa_gen6.c: In function 'cyapa_pip_retrieve_data_structure.constprop': include/linux/unaligned/access_ok.h:40:1

[PATCH 4.9 131/175] media: gspca: Fix memory leak in probe

2020-12-28 Thread Greg Kroah-Hartman
From: Alan Stern commit e469d0b09a19496e1972a20974bbf55b728151eb upstream. The gspca driver leaks memory when a probe fails. gspca_dev_probe2() calls v4l2_device_register(), which takes a reference to the underlying device node (in this case, a USB interface). But the failure pathway neglects

[PATCH 4.9 136/175] ACPI: PNP: compare the string length in the matching_id()

2020-12-28 Thread Greg Kroah-Hartman
From: Hui Wang commit b08221c40febcbda9309dd70c61cf1b0ebb0e351 upstream. Recently we met a touchscreen problem on some Thinkpad machines, the touchscreen driver (i2c-hid) is not loaded and the touchscreen can't work. An i2c ACPI device with the name WACF2200 is defined in the BIOS, with the cur

[PATCH 4.9 120/175] net: bcmgenet: Fix a resource leak in an error handling path in the probe functin

2020-12-28 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 4375ada01963d1ebf733d60d1bb6e5db401e1ac6 ] If the 'register_netdev()' call fails, we must undo a previous 'bcmgenet_mii_init()' call. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Christophe JAILLET Acked-by: Florian Faine

[PATCH 4.9 105/175] powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops

2020-12-28 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit 52719fce3f4c7a8ac9eaa191e8d75a697f9fbcbc ] There are three ways pseries_suspend_begin() can be reached: 1. When "mem" is written to /sys/power/state: kobj_attr_store() -> state_store() -> pm_suspend() -> suspend_devices_and_enter() -> pseries_su

[PATCH 4.9 053/175] crypto: talitos - Fix return type of current_desc_hdr()

2020-12-28 Thread Greg Kroah-Hartman
From: Christophe Leroy [ Upstream commit 0237616173fd363a54bd272aa3bd376faa1d7caa ] current_desc_hdr() returns a u32 but in fact this is a __be32, leading to a lot of sparse warnings. Change the return type to __be32 and ensure it is handled as sure by the caller. Fixes: 3e721aeb3df3 ("crypto:

[PATCH 4.9 095/175] ASoC: jz4740-i2s: add missed checks for clk_get()

2020-12-28 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit 1c1fb2653a0c2e3f310c07eacd8fc3a10e08c97a ] jz4740_i2s_set_sysclk() does not check the return values of clk_get(), while the file dereferences the pointers in clk_put(). Add the missed checks to fix it. Fixes: 11bd3dd1b7c2 ("ASoC: Add JZ4740 ASoC support") Si

[PATCH 4.9 110/175] nfs_common: need lock during iterate through the list

2020-12-28 Thread Greg Kroah-Hartman
From: Cheng Lin [ Upstream commit 4a9d81caf841cd2c0ae36abec9c2963bf21d0284 ] If the elem is deleted during be iterated on it, the iteration process will fall into an endless loop. kernel: NMI watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [nfsd:17137] PID: 17137  TASK: 8818d93c  CPU

[PATCH 4.9 101/175] cpufreq: scpi: Add missing MODULE_ALIAS

2020-12-28 Thread Greg Kroah-Hartman
From: Pali Rohár [ Upstream commit c0382d049d2def37b81e907a8b22661a4a4a6eb5 ] This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 8def31034d033 ("cpufreq: arm_big_little: add SCPI interfac

[PATCH 4.9 100/175] cpufreq: loongson1: Add missing MODULE_ALIAS

2020-12-28 Thread Greg Kroah-Hartman
From: Pali Rohár [ Upstream commit b9acab091842ca8b22798bb809f7abf5408a ] This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: a0a22cf14472f ("cpufreq: Loongson1: Add cpufreq driver for

[PATCH 4.9 102/175] scsi: pm80xx: Fix error return in pm8001_pci_probe()

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit 97031ccffa4f62728602bfea8439dd045cd3aeb2 ] The driver did not return an error in the case where pm8001_configure_phy_settings() failed. Use rc to store the return value of pm8001_configure_phy_settings(). Link: https://lore.kernel.org/r/20201205115551.20794

[PATCH] media: em28xx: Fix use-after-free in em28xx_alloc_urbs

2020-12-28 Thread Dinghao Liu
When kzalloc() fails, em28xx_uninit_usb_xfer() will free usb_bufs->buf and set it to NULL. Thus the later access to usb_bufs->buf[i] will lead to null pointer dereference. Also the kfree(usb_bufs->buf) after that is redundant. Fixes: d571b592c6206 ("media: em28xx: don't use coherent buffer for DMA

[PATCH 4.9 098/175] cpufreq: highbank: Add missing MODULE_DEVICE_TABLE

2020-12-28 Thread Greg Kroah-Hartman
From: Pali Rohár [ Upstream commit 9433777a6e0aae27468d3434b75cd51bb88ff711 ] This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 6754f55

[PATCH 4.9 086/175] NFSv4.2: condition READDIRs mask for security label based on LSM state

2020-12-28 Thread Greg Kroah-Hartman
From: Olga Kornievskaia [ Upstream commit 05ad917561fca39a03338cb21fe9622f998b0f9c ] Currently, the client will always ask for security_labels if the server returns that it supports that feature regardless of any LSM modules (such as Selinux) enforcing security policy. This adds performance pena

[PATCH 4.9 082/175] media: siano: fix memory leak of debugfs members in smsdvb_hotplug

2020-12-28 Thread Greg Kroah-Hartman
From: Keita Suzuki [ Upstream commit abf287eeff4c6da6aa804bbd429dfd9d0dfb6ea7 ] When dvb_create_media_graph fails, the debugfs kept inside client should be released. However, the current implementation does not release them. Fix this by adding a new goto label to call smsdvb_debugfs_release. F

[PATCH 4.9 080/175] orinoco: Move context allocation after processing the skb

2020-12-28 Thread Greg Kroah-Hartman
From: Sebastian Andrzej Siewior [ Upstream commit a31eb615646a63370aa1da1053c45439c7653d83 ] ezusb_xmit() allocates a context which is leaked if orinoco_process_xmit_skb() returns an error. Move ezusb_alloc_ctx() after the invocation of orinoco_process_xmit_skb() because the context is not need

[PATCH 4.9 073/175] soc: ti: knav_qmss: fix reference leak in knav_queue_probe

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit ec8684847d8062496c4619bc3fcff31c19d56847 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in knav_queue_probe, so we should fix it. Fixes: 41f93af900a20 ("soc: ti: add Key

[PATCH 4.9 055/175] ASoC: pcm: DRAIN support reactivation

2020-12-28 Thread Greg Kroah-Hartman
From: Cezary Rojewski [ Upstream commit 4c22b80f61540ea99d9b4af0127315338755f05b ] soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel v5.4 where explicit switch(cmd) has been introduced which takes into account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update sw

[PATCH 4.9 070/175] Input: ads7846 - fix unaligned access on 7845

2020-12-28 Thread Greg Kroah-Hartman
From: Dmitry Torokhov [ Upstream commit 03e2c9c782f721b661a0e42b1b58f394b5298544 ] req->sample[1] is not naturally aligned at word boundary, and therefore we should use get_unaligned_be16() when accessing it. Fixes: 3eac5c7e44f3 ("Input: ads7846 - extend the driver for ads7845 controller suppo

[PATCH 4.9 072/175] crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit ff8107200367f4abe0e5bce66a245e8d0f2d229e ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: f7b2b5dd6a62a ("crypto: omap-aes - add error ch

[PATCH 4.9 076/175] RDMA/cxgb4: Validate the number of CQEs

2020-12-28 Thread Greg Kroah-Hartman
From: Kamal Heib [ Upstream commit 6d8285e604e0221b67bd5db736921b7ddce37d00 ] Before create CQ, make sure that the requested number of CQEs is in the supported range. Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Link: https://lore.kernel.org/r/20201108132007.67537-1-kamalh

[PATCH 4.9 069/175] Input: ads7846 - fix integer overflow on Rt calculation

2020-12-28 Thread Greg Kroah-Hartman
From: Oleksij Rempel [ Upstream commit 820830ec918f6c3dcd77a54a1c6198ab57407916 ] In some rare cases the 32 bit Rt value will overflow if z2 and x is max, z1 is minimal value and x_plate_ohms is relatively high (for example 800 ohm). This would happen on some screen age with low pressure. There

[PATCH 4.9 078/175] ARM: dts: at91: sama5d4_xplained: add pincontrol for USB Host

2020-12-28 Thread Greg Kroah-Hartman
From: Cristian Birsan [ Upstream commit be4dd2d448816a27c1446f8f37fce375daf64148 ] The pincontrol node is needed for USB Host since Linux v5.7-rc1. Without it the driver probes but VBus is not powered because of wrong pincontrol configuration. Fixes: 38153a017896f ("ARM: at91/dt: sama5d4: add d

[PATCH 4.9 063/175] net: evaluate net.ipv4.conf.all.proxy_arp_pvlan

2020-12-28 Thread Greg Kroah-Hartman
From: Vincent Bernat [ Upstream commit 1af5318c00a8acc33a90537af49b3f23f72a2c4b ] Introduced in 65324144b50b, the "proxy_arp_vlan" sysctl is a per-interface sysctl to tune proxy ARP support for private VLANs. While the "all" variant is exposed, it was a noop and never evaluated. We use the usual

[PATCH 4.9 068/175] drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()

2020-12-28 Thread Greg Kroah-Hartman
From: Yang Yingliang [ Upstream commit 723ae803218da993143387bf966042eccefac077 ] Return -ENOMEM when allocating refill memory failed. Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Thomas Zimmermann

[PATCH 4.9 046/175] serial_core: Check for port state when tty is in error state

2020-12-28 Thread Greg Kroah-Hartman
From: Alexey Kardashevskiy commit 2f70e49ed860020f5abae4f7015018ebc10e1f0e upstream. At the moment opening a serial device node (such as /dev/ttyS3) succeeds even if there is no actual serial device behind it. Reading/writing/ioctls fail as expected because the uart port is not initialized (the

[PATCH 4.9 034/175] dm table: Remove BUG_ON(in_interrupt())

2020-12-28 Thread Greg Kroah-Hartman
From: Thomas Gleixner [ Upstream commit e7b624183d921b49ef0a96329f21647d38865ee9 ] The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context. Issuing a BUG for a wrong calling context is frowned upon and in_interru

[PATCH 4.9 024/175] ALSA: pcm: oss: Fix potential out-of-bounds shift

2020-12-28 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 175b8d89fe292796811fdee87fa39799a5b6b87a upstream. syzbot spotted a potential out-of-bounds shift in the PCM OSS layer where it calculates the buffer size with the arbitrary shift value given via an ioctl. Add a range check for avoiding the undefined behavior. As the v

[PATCH 4.9 025/175] serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access

2020-12-28 Thread Greg Kroah-Hartman
From: Alexander Sverdlin commit d96f04d347e4011977abdbb4da5d8f303ebd26f8 upstream. It has been observed that once per 300-1300 port openings the first transmitted byte is being corrupted on AM3352 ("v" written to FIFO appeared as "e" on the wire). It only happened if single byte has been transmi

[PATCH 4.9 067/175] media: solo6x10: fix missing snd_card_free in error handling case

2020-12-28 Thread Greg Kroah-Hartman
From: Qinglang Miao [ Upstream commit dcdff74fa6bc00c32079d0bebd620764c26f2d89 ] Fix to goto snd_error in error handling case when fails to do snd_ctl_add, as done elsewhere in this function. Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.") Reported-by: Hul

[PATCH v9 2/4] ARM: dts: berlin: Fix schema warnings for pwm-leds

2020-12-28 Thread Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml CHECK arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml /home/alex/bu

[PATCH v9 4/4] arm64: dts: meson: Fix schema warnings for pwm-leds

2020-12-28 Thread Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. Signed-off-by: Alexander Dahl Reviewed-by: Neil Armstrong --- Notes: v8 -> v9: * rebased on v5.11-rc1 v7 -> v8: *

[PATCH 4.9 074/175] soc: ti: Fix reference imbalance in knav_dma_probe

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit b4fa73358c306d747a2200aec6f7acb97e5750e6 ] The patch fix two reference leak. 1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to call put operation will result in reference leak. 2) The pm_runtime_enable will i

[PATCH v9 3/4] ARM: dts: stm32: Fix schema warnings for pwm-leds

2020-12-28 Thread Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml CHECK arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml /home/alex/build/linux/arch/a

[PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

2020-12-28 Thread Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml

[PATCH 4.9 066/175] staging: greybus: codecs: Fix reference counter leak in error handling

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit 3952659a6108f77a0d062d8e8487bdbdaf52a66c ] gb_pm_runtime_get_sync has increased the usage counter of the device here. Forgetting to call gb_pm_runtime_put_noidle will result in usage counter leak in the error branch of (gbcodec_hw_params and gbcodec_prepare).

[PATCH 4.9 020/175] ALSA: usb-audio: Fix potential out-of-bounds shift

2020-12-28 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 43d5ca88dfcd35e43010fdd818e067aa9a55f5ba upstream. syzbot spotted a potential out-of-bounds shift in the USB-audio format parser that receives the arbitrary shift value from the USB descriptor. Add a range check for avoiding the undefined behavior. Reported-by: syzbot

[PATCH 4.9 054/175] spi: img-spfi: fix reference leak in img_spfi_resume

2020-12-28 Thread Greg Kroah-Hartman
From: Zhang Qilong [ Upstream commit ee5558a9084584015c8754ffd029ce14a5827fa8 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in img_spfi_resume, so we should fix it. Fixes: deba25800a12b ("spi: Add driver f

[PATCH 4.9 064/175] RDMa/mthca: Work around -Wenum-conversion warning

2020-12-28 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit fbb7dc5db6dee553b5a07c27e86364a5223e244c ] gcc points out a suspicious mixing of enum types in a function that converts from MTHCA_OPCODE_* values to IB_WC_* values: drivers/infiniband/hw/mthca/mthca_cq.c: In function 'mthca_poll_one': drivers/infiniband/hw

[PATCH 4.9 065/175] MIPS: BCM47XX: fix kconfig dependency bug for BCM47XX_BCMA

2020-12-28 Thread Greg Kroah-Hartman
From: Necip Fazil Yildiran [ Upstream commit 3a5fe2fb9635c43359c9729352f45044f3c8df6b ] When BCM47XX_BCMA is enabled and BCMA_DRIVER_PCI is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for BCMA_DRIVER_PCI_HOSTMODE Depends on [n]: MIPS [=y]

[PATCH v9 0/4] leds: pwm: Make automatic labels work

2020-12-28 Thread Alexander Dahl
Hei hei, these are the not yet taken patches from a series which originally fixed a minor issue in the leds pwm driver, then migrated the leds pwm dts docs to yaml (by request), and then fixed all the dts files triggering warnings on those new bindings. The remaining four patches now only fix dts

Re: [PATCH v3 05/14] software_node: unregister software_nodes in reverse order

2020-12-28 Thread Sakari Ailus
Hi Daniel, On Thu, Dec 24, 2020 at 01:08:58AM +, Daniel Scally wrote: > To maintain consistency with software_node_unregister_nodes(), reverse > the order in which the software_node_unregister_node_group() function > unregisters nodes. > > Reported-by: kernel test robot > Reported-by: Dan Ca

[PATCH RESEND net-next 4/4] enetc: reorder macros and functions

2020-12-28 Thread Michael Walle
Now that there aren't any more macros with parameters, move the macros above any functions. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean --- .../net/ethernet/freescale/enetc/enetc_mdio.c | 22 +-- 1 file changed, 11 insertions(+), 11 deleti

[PATCH RESEND net-next 1/4] enetc: drop unneeded indirection

2020-12-28 Thread Michael Walle
Before commit 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") these macros actually had some benefits. But after the commit it just makes the code hard to read. Drop the macro indirections. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Reviewed-by

[PATCH RESEND net-next 0/4] enetc: code cleanups

2020-12-28 Thread Michael Walle
This are some code cleanups in the MDIO part of the enetc. They are intended to make the code more readable. Michael Walle (4): enetc: drop unneeded indirection enetc: don't use macro magic for the readx_poll_timeout() callback enetc: drop MDIO_DATA() macro enetc: reorder macros and functi

[PATCH RESEND net-next 3/4] enetc: drop MDIO_DATA() macro

2020-12-28 Thread Michael Walle
value is u16, masking with 0x is a nop. Drop it. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean --- drivers/net/ethernet/freescale/enetc/enetc_mdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver

[PATCH 4.9 009/175] pinctrl: amd: remove debounce filter setting in IRQ type setting

2020-12-28 Thread Greg Kroah-Hartman
From: Coiby Xu commit 47a0001436352c9853d72bf2071e85b316d688a2 upstream. Debounce filter setting should be independent from IRQ type setting because according to the ACPI specs, there are separate arguments for specifying debounce timeout and IRQ type in GpioIo() and GpioInt(). Together with co

[PATCH 4.9 019/175] USB: add RESET_RESUME quirk for Snapscan 1212

2020-12-28 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 08a02f954b0def3ada8ed6d4b2c7bcb67e885e9c upstream. I got reports that some models of this old scanner need this when using runtime PM. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20201207130323.23857-1-oneu...@suse.com Signed-off-by: Greg

[PATCH 4.9 030/175] RDMA/cm: Fix an attempt to use non-valid pointer when cleaning timewait

2020-12-28 Thread Greg Kroah-Hartman
From: Leon Romanovsky [ Upstream commit 340b940ea0ed12d9adbb8f72dea17d516b2019e8 ] If cm_create_timewait_info() fails, the timewait_info pointer will contain an error value and will be used in cm_remove_remote() later. general protection fault, probably for non-canonical address 0xdc

[PATCH 4.9 043/175] ARM: dts: exynos: fix USB 3.0 VBUS control and over-current pins on Exynos5410

2020-12-28 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski commit 3d992fd8f4e0f09c980726308d2f2725587b32d6 upstream. The VBUS control (PWREN) and over-current pins of USB 3.0 DWC3 controllers are on Exynos5410 regular GPIOs. This is different than for example on Exynos5422 where these are special ETC pins with proper reset val

[PATCH 4.9 050/175] drm/gma500: fix double free of gma_connector

2020-12-28 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 4e19d51ca5b28a1d435a844c7b2a8e1b1b6fa237 ] clang static analysis reports this problem: cdv_intel_dp.c:2101:2: warning: Attempt to free released memory kfree(gma_connector); ^~~~ In cdv_intel_dp_init() when the call to cdv_intel_ed

[PATCH 4.9 028/175] scsi: bnx2i: Requires MMU

2020-12-28 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit 2d586494c4a001312650f0b919d534e429dd1e09 ] The SCSI_BNX2_ISCSI kconfig symbol selects CNIC and CNIC selects UIO, which depends on MMU. Since 'select' does not follow dependency chains, add the same MMU dependency to SCSI_BNX2_ISCSI. Quietens this kconfig wa

[PATCH 4.9 027/175] pinctrl: baytrail: Avoid clearing debounce value when turning it off

2020-12-28 Thread Greg Kroah-Hartman
From: Andy Shevchenko [ Upstream commit 0b74e40a4e41f3cbad76dff4c50850d47b525b26 ] Baytrail pin control has a common register to set up debounce timeout. When a pin configuration requested debounce to be disabled, the rest of the pins may still want to have debounce enabled and thus rely on the

[PATCH 4.9 049/175] Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()

2020-12-28 Thread Greg Kroah-Hartman
From: Peilin Ye commit f7e0e8b2f1b0a09b527885babda3e912ba820798 upstream. `num_reports` is not being properly checked. A malformed event packet with a large `num_reports` number makes hci_le_direct_adv_report_evt() read out of bounds. Fix it. Cc: sta...@vger.kernel.org Fixes: 2f010b55884e ("Blu

[PATCH 4.9 048/175] md: fix a warning caused by a race between concurrent md_ioctl()s

2020-12-28 Thread Greg Kroah-Hartman
From: Dae R. Jeong commit c731b84b51bf7fe83448bea8f56a6d55006b0615 upstream. Syzkaller reports a warning as belows. WARNING: CPU: 0 PID: 9647 at drivers/md/md.c:7169 ... Call Trace: ... RIP: 0010:md_ioctl+0x4017/0x5980 drivers/md/md.c:7169 RSP: 0018:888096027950 EFLAGS: 00010293 RAX: 888

Re: [PATCH v3, 7/8] soc: mediatek: mmsys: Use function call for setting mmsys ovl mout register

2020-12-28 Thread Chun-Kuang Hu
Hi, Yongqiang: Yongqiang Niu 於 2020年12月28日 週一 下午4:38寫道: > > Use function call for setting mmsys ovl mout register > > Signed-off-by: Yongqiang Niu > --- > drivers/soc/mediatek/mmsys/mtk-mmsys.c | 20 > include/linux/soc/mediatek/mtk-mmsys.h | 3 +++ > 2 files changed, 23 i

[PATCH 4.9 038/175] USB: gadget: f_midi: setup SuperSpeed Plus descriptors

2020-12-28 Thread Greg Kroah-Hartman
From: Will McVicker commit 457a902ba1a73b7720666b21ca038cd19764db18 upstream. Needed for SuperSpeed Plus support for f_midi. This allows the gadget to work properly without crashing at SuperSpeed rates. Cc: Felipe Balbi Cc: stable Signed-off-by: Will McVicker Reviewed-by: Peter Chen Link:

[PATCH 4.9 022/175] xhci: Give USB2 ports time to enter U3 in bus suspend

2020-12-28 Thread Greg Kroah-Hartman
From: Li Jun commit c1373f10479b624fb6dba0805d673e860f1b421d upstream. If a USB2 device wakeup is not enabled/supported the link state may still be in U0 in xhci_bus_suspend(), where it's then manually put to suspended U3 state. Just as with selective suspend the device needs time to enter U3 s

Re: [PATCH] riscv: add BUILTIN_DTB support for MMU-enabled targets

2020-12-28 Thread Vitaly Wool
On Mon, Dec 28, 2020 at 3:10 PM Anup Patel wrote: > > On Mon, Dec 28, 2020 at 7:05 PM Vitaly Wool wrote: > > > > On Mon, Dec 28, 2020 at 12:59 PM Anup Patel wrote: > > > > > > On Sat, Dec 26, 2020 at 10:03 PM Vitaly Wool > > > wrote: > > > > > > > > Sometimes, especially in a production system

[PATCH 4.9 006/175] platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE

2020-12-28 Thread Greg Kroah-Hartman
From: Timo Witte [ Upstream commit 9e7a005ad56aa7d6ea5830c5ffcc60bf35de380b ] Got a dmesg message on my AMD Renoir based Acer laptop: "acer_wmi: Unknown key number - 0x84" when toggling keyboard background light Signed-off-by: Timo Witte Reviewed-by: "Lee, Chun-Yi" Link: https://lore.kernel.o

[PATCH 4.9 005/175] ARC: stack unwinding: dont assume non-current task is sleeping

2020-12-28 Thread Greg Kroah-Hartman
From: Vineet Gupta [ Upstream commit e42404fa10fd11fe72d0a0e149a321d10e577715 ] To start stack unwinding (SP, PC and BLINK) are needed. When the explicit execution context (pt_regs etc) is not available, unwinder assumes the task is sleeping (in __switch_to()) and fetches SP and BLINK from kerne

[PATCH 4.9 031/175] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling

2020-12-28 Thread Greg Kroah-Hartman
From: Nicholas Piggin [ Upstream commit 8ff00399b153440c1c83e20c43020385b416415b ] powerpc/64s keeps a counter in the mm which counts bits set in mm_cpumask as well as other things. This means it can't use generic code to clear bits out of the mask and doesn't adjust the arch specific counter.

[PATCH 4.9 003/175] iwlwifi: pcie: limit memory read spin time

2020-12-28 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 04516706bb99889986ddfa3a769ed50d2dc7ac13 ] When we read device memory, we lock a spinlock, write the address we want to read from the device and then spin in a loop reading the data in 32-bit quantities from another register. As the description makes clear,

[PATCH 4.9 002/175] spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe

2020-12-28 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit d853b3406903a7dc5b14eb5bada3e8cd677f66a2 ] Clang warns: drivers/spi/spi-bcm2835aux.c:532:50: warning: variable 'err' is uninitialized when used here [-Wuninitialized] dev_err(&pdev->dev, "could not get clk: %d\n", err);

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