aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2021-04-15i2c: mpc: Update license and copyrightChris Packham1-8/+3
Use SPDX-License-Identifier and add copyright for Allied Telesis because of the reasonably large rewrite in the preceding patch. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-15i2c: mpc: Interrupt driven transferChris Packham1-187/+239
The fsl-i2c controller will generate an interrupt after every byte transferred. Make use of this interrupt to drive a state machine which allows the next part of a transfer to happen as soon as the interrupt is received. This is particularly helpful with SMBUS devices like the LM81 which will timeout if we take too long between bytes in a transfer. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: sh7760: add IRQ checkSergey Shtylyov1-1/+4
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: a26c20b1fa6d ("i2c: Renesas SH7760 I2C master driver") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: rcar: add IRQ checkSergey Shtylyov1-1/+4
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with the invalid IRQ #s. Fixes: 6ccbe607132b ("i2c: add Renesas R-Car I2C driver") Signed-off-by: Sergey Shtylyov <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: mlxbf: add IRQ checkSergey Shtylyov1-0/+2
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: b5b5b32081cd ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: jz4780: add IRQ checkSergey Shtylyov1-1/+4
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: emev2: add IRQ checkSergey Shtylyov1-1/+4
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: 5faf6e1f58b4 ("i2c: emev2: add driver") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: cadence: add IRQ checkSergey Shtylyov1-1/+4
The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: imx: Fix PM reference leak in i2c_imx_reg_slave()Ye Weihua1-1/+1
pm_runtime_get_sync() will increment the PM reference count even on failure. Forgetting to put the reference again will result in a leak. Replace it with pm_runtime_resume_and_get() to keep the usage counter balanced. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Ye Weihua <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: xiic: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-2/+2
The PM reference count is not expected to be incremented on return in xiic_xfer and xiic_i2c_remove. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 10b17004a74c ("i2c: xiic: Fix the clocking across bind unbind") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: stm32f7: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-6/+6
The PM reference count is not expected to be incremented on return in these stm32f7_i2c_xx serious functions. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: ea6dd25deeb5 ("i2c: stm32f7: add PM_SLEEP suspend/resume support") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: sprd: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-2/+2
The PM reference count is not expected to be incremented on return in sprd_i2c_master_xfer() and sprd_i2c_remove(). However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: omap: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-4/+4
The PM reference count is not expected to be incremented on return in omap_i2c_probe() and omap_i2c_remove(). However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. I Replace it with pm_runtime_resume_and_get to keep usage counter balanced. What's more, error path 'err_free_mem' seems not like a proper name any more. So I change the name to err_disable_pm and move pm_runtime_disable below, for pm_runtime of 'pdev->dev' should be disabled when pm_runtime_resume_and_get fails. Fixes: 3b0fb97c8dc4 ("I2C: OMAP: Handle error check for pm runtime") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]> Reviewed-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: imx: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-2/+2
In i2c_imx_xfer() and i2c_imx_remove(), the pm reference count is not expected to be incremented on return. However, pm_runtime_get_sync will increment pm reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 3a5ee18d2a32 ("i2c: imx: implement master_xfer_atomic callback") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Reviewed-by: Oleksij Rempel <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: imx-lpi2c: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-1/+1
The PM reference count is not expected to be incremented on return in lpi2c_imx_master_enable. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: img-scb: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-2/+2
The PM reference count is not expected to be incremented on return in functions img_i2c_xfer and img_i2c_init. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 93222bd9b966 ("i2c: img-scb: Add runtime PM") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-14i2c: cadence: fix reference leak when pm_runtime_get_sync failsQinglang Miao1-2/+2
The PM reference count is not expected to be incremented on return in functions cdns_i2c_master_xfer and cdns_reg_slave. However, pm_runtime_get_sync will increment pm usage counter even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 7fa32329ca03 ("i2c: cadence: Move to sensible power management") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-13i2c: sprd: Add missing MODULE_DEVICE_TABLEBixuan Cui1-0/+1
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Bixuan Cui <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-13i2c: mpc: Remove redundant NULL checkChris Packham1-1/+1
In mpc_i2c_get_fdr_8xxx div is assigned as we iterate through the mpc_i2c_dividers_8xxx array. By the time we exit the loop div will either have the value that matches the requested speed or be pointing at the last entry in mpc_i2c_dividers_8xxx. Checking for div being NULL after the loop is redundant so remove the check. Reported-by: Wolfram Sang <[email protected]> Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-13i2c: mpc: drop release for resource allocated with devm_*Wei Yongjun1-6/+0
It's not necessary to release resource which allocated with devm_* and those release may leads to a double free. And also remove useless irq_dispose_mapping() call since mapping not created. Fixes: 09aab7add7bf ("i2c: mpc: use device managed APIs") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: mpc: use device managed APIsChris Packham1-28/+18
Use device managed functions an clean up error handling. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: mpc: make interrupt mandatory and remove polling codeChris Packham1-32/+19
All the in-tree dts files that use one of the compatible strings from i2c-mpc.c provide an interrupt property. By making this mandatory we can simplify the code. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: mpc: Make use of i2c_recover_bus()Chris Packham1-2/+16
Move the existing calls of mpc_i2c_fixup() to a recovery function registered via bus_recovery_info. This makes it more obvious that recovery is supported and allows for a future where recovery is triggered by the i2c core. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: ensure timely release of driver-allocated resourcesDmitry Torokhov1-1/+20
More and more drivers rely on devres to manage their resources, however if bus' probe() and release() methods are not trivial and control some of resources as well (for example enable or disable clocks, or attach device to a power domain), we need to make sure that driver-allocated resources are released immediately after driver's remove() method returns, and not postponed until driver core gets around to releasing resources. To fix that we open a new devres group before calling driver's probe() and explicitly release it when we return from driver's remove(). Tested-by: Jeff LaBundy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: designware: Switch over to i2c_freq_mode_string()Andy Shevchenko1-16/+4
Use generic i2c_freq_mode_string() helper to print chosen bus speed. Acked-by: Jarkko Nikula <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: add support for HiSilicon I2C controllerYicong Yang3-0/+515
Add HiSilicon I2C controller driver for the Kunpeng SoC. It provides the access to the i2c busses, which connects to the eeprom, rtc, etc. The driver works with IRQ mode, and supports basic I2C features and 10bit address. The DMA is not supported. Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: core: add api to provide frequency mode stringsYicong Yang1-0/+21
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: Jarkko Nikula <[email protected]> Reviewed-by: Jarkko Nikula <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: core: add managed function for adding i2c adaptersYicong Yang1-0/+26
Some I2C controller drivers will only unregister the I2C adapter in their .remove() callback, which can be done by simply using a managed variant to add the I2C adapter. So add the managed functions for adding the I2C adapter. Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Signed-off-by: Yicong Yang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10Merge branch 'i2c/software-nodes' into i2c/for-5.13Wolfram Sang373-1587/+2588
2021-04-10i2c: Remove support for dangling device propertiesHeikki Krogerus2-25/+1
From now on only accepting complete software nodes. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10Input: elantech - Prepare a complete software node for the deviceHeikki Krogerus1-2/+4
Creating a software node and supplying that for the device instead of only the device properties in it. A software node was always created in any case to hold the additional device properties, so this change does not have any real effect. This change makes it possible to remove support for the problematic "dangling" device properties from i2c subsystem, i.e. the "properties" member from struct i2c_board_info. The problems caused by them are not related to this driver. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10platform/chrome: chromeos_laptop - Prepare complete software nodesHeikki Krogerus1-40/+60
The older device property API is going to be removed soon and that will affect also I2C subystem. Supplying complete software nodes instead of only the properties in them for the I2C devices. Signed-off-by: Heikki Krogerus <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: icy: Constify the software nodeHeikki Krogerus1-23/+9
Complete software node can now be supplied to the device with struct i2c_board_info. Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Max Staudt <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: nvidia-gpu: Constify the software nodeHeikki Krogerus1-1/+5
Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10i2c: cht-wc: Constify the software nodeHeikki Krogerus1-1/+5
Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-10platform/x86: intel_cht_int33fe_microb: Constify the software nodeHeikki Krogerus1-1/+5
Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-08i2c: Add support for software nodesHeikki Krogerus1-1/+14
This makes it possible for the drivers to assign complete software fwnodes to the devices instead of only the device properties in those nodes. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-08i2c: remove unused 'version.h' include in driversTian Tao2-2/+0
Signed-off-by: Tian Tao <[email protected]> Signed-off-by: Zhiqi Song <[email protected]> Acked-by: Florian Fainelli <[email protected]> # for brcmstb Signed-off-by: Wolfram Sang <[email protected]>
2021-04-08i2c: core: simplify devm_i2c_new_dummy_device()Yicong Yang1-19/+9
Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional change. Signed-off-by: Yicong Yang <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-08i2c: designware: Fix return value check in navi_amd_register_client()Wei Yongjun1-2/+2
In case of error, the function i2c_new_client_device() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 17631e8ca2d3 ("i2c: designware: Add driver support for AMD NAVI GPU") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-06i2c: stm32f7: avoid ifdef CONFIG_PM_SLEEP for pm callbacksAlain Volmat1-6/+4
Avoid CONFIG_PM preprocessor check for pm suspend/resume callbacks and identify the functions with __maybe_unused. Signed-off-by: Alain Volmat <[email protected]> Reviewed-by: Pierre-Yves MORDRET <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-05i2c: tegra-bpmp: make some functions voidWolfram Sang1-16/+4
They return 0 always, so save some lines and code. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Thierry Reding <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-05i2c: tegra-bpmp: don't modify input variable in xlate_flagsWolfram Sang1-24/+8
Since commit bc1c2048abbe ("i2c: bpmp-tegra: Ignore unknown I2C_M flags") we don't need to mask out flags and can keep the input variable as is to save quite some lines. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Thierry Reding <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-05i2c: drivers: Use generic definitions for bus frequencies (part 2)Andy Shevchenko3-13/+7
Since we have generic definitions for bus frequencies, let's use them. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Khalil Blaiech <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-05i2c: designware: Add driver support for AMD NAVI GPUSanket Goswami4-0/+205
The Latest AMD NAVI GPU card has an integrated Type-C controller and Designware I2C with PCI Interface. The PD controller for USB Type-C can be accessed over I2C. The client driver is part of the USB Type-C UCSI driver. Also, there exists a couple of notable IP limitations that are dealt as workarounds: - I2C transaction work on a polling mode as IP does not generate interrupt. - I2C read command sent twice to address the IP issues. - AMD NAVI GPU based products are already in the commercial market, hence some of the I2C parameters are statically programmed as they can not be part of the ACPI table. Reviewed-by: Shyam Sundar S K <[email protected]> Co-developed-by: Nehal Bakulchandra Shah <[email protected]> Signed-off-by: Nehal Bakulchandra Shah <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2021-04-05i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio BridgeBence Csókás3-0/+341
Create an i2c_adapter for CP2615's I2C master interface Signed-off-by: Bence Csókás <[email protected]> [wsa: switched to '__packed', added some 'static' and an include] Signed-off-by: Wolfram Sang <[email protected]>
2021-04-04firewire: nosy: Fix a use-after-free bug in nosy_ioctl()Zheyu Ma1-2/+7
For each device, the nosy driver allocates a pcilynx structure. A use-after-free might happen in the following scenario: 1. Open nosy device for the first time and call ioctl with command NOSY_IOC_START, then a new client A will be malloced and added to doubly linked list. 2. Open nosy device for the second time and call ioctl with command NOSY_IOC_START, then a new client B will be malloced and added to doubly linked list. 3. Call ioctl with command NOSY_IOC_START for client A, then client A will be readded to the doubly linked list. Now the doubly linked list is messed up. 4. Close the first nosy device and nosy_release will be called. In nosy_release, client A will be unlinked and freed. 5. Close the second nosy device, and client A will be referenced, resulting in UAF. The root cause of this bug is that the element in the doubly linked list is reentered into the list. Fix this bug by adding a check before inserting a client. If a client is already in the linked list, don't insert it. The following KASAN report reveals it: BUG: KASAN: use-after-free in nosy_release+0x1ea/0x210 Write of size 8 at addr ffff888102ad7360 by task poc CPU: 3 PID: 337 Comm: poc Not tainted 5.12.0-rc5+ #6 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: nosy_release+0x1ea/0x210 __fput+0x1e2/0x840 task_work_run+0xe8/0x180 exit_to_user_mode_prepare+0x114/0x120 syscall_exit_to_user_mode+0x1d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Allocated by task 337: nosy_open+0x154/0x4d0 misc_open+0x2ec/0x410 chrdev_open+0x20d/0x5a0 do_dentry_open+0x40f/0xe80 path_openat+0x1cf9/0x37b0 do_filp_open+0x16d/0x390 do_sys_openat2+0x11d/0x360 __x64_sys_open+0xfd/0x1a0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 337: kfree+0x8f/0x210 nosy_release+0x158/0x210 __fput+0x1e2/0x840 task_work_run+0xe8/0x180 exit_to_user_mode_prepare+0x114/0x120 syscall_exit_to_user_mode+0x1d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888102ad7300 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 96 bytes inside of 128-byte region [ffff888102ad7300, ffff888102ad7380) [ Modified to use 'list_empty()' inside proper lock - Linus ] Link: https://lore.kernel.org/lkml/[email protected]/ Reported-and-tested-by: 马哲宇 (Zheyu Ma) <[email protected]> Signed-off-by: Zheyu Ma <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Stefan Richter <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2021-04-03Merge tag 'for-linus' of git://github.com/openrisc/linuxLinus Torvalds1-1/+0
Pull OpenRISC fix from Stafford Horne: "Fix duplicate header include in Litex SOC driver" * tag 'for-linus' of git://github.com/openrisc/linux: soc: litex: Remove duplicated header file inclusion
2021-04-04soc: litex: Remove duplicated header file inclusionZhen Lei1-1/+0
The header file <linux/errno.h> is already included above and can be removed here. Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Mateusz Holenko <[email protected]> Signed-off-by: Stafford Horne <[email protected]>
2021-04-03Merge tag 'hyperv-fixes-signed-20210402' of ↵Linus Torvalds1-3/+0
git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V fixes from Wei Liu: "One fix from Lu Yunlong for a double free in hvfb_probe" * tag 'hyperv-fixes-signed-20210402' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: video: hyperv_fb: Fix a double free in hvfb_probe