summaryrefslogtreecommitdiff
path: root/arch/sh/drivers/push-switch.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-09-09 14:46:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-09-09 14:46:57 -0700
commit6b8bb5b8d9b35fb43f0dbf9fd91b7d35e6232e08 (patch)
treeeb6702bd1adcebe4e9519f26f922fcda4096018d /arch/sh/drivers/push-switch.c
parent1b37a0a2d46f0c5fa5eee170ddeeb83342faa117 (diff)
parent246f80a0b17f8f582b2c0996db02998239057c65 (diff)
Merge tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from Adrian Glaubitz: - Fix a use-after-free bug in the push-switch driver (Duoming Zhou) - Fix calls to dma_declare_coherent_memory() that incorrectly passed the buffer end address instead of the buffer size as the size parameter * tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: push-switch: Reorder cleanup operations to avoid use-after-free bug sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory()
Diffstat (limited to 'arch/sh/drivers/push-switch.c')
-rw-r--r--arch/sh/drivers/push-switch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c
index c95f48ff3f6f..6ecba5f521eb 100644
--- a/arch/sh/drivers/push-switch.c
+++ b/arch/sh/drivers/push-switch.c
@@ -101,8 +101,8 @@ static int switch_drv_remove(struct platform_device *pdev)
device_remove_file(&pdev->dev, &dev_attr_switch);
platform_set_drvdata(pdev, NULL);
- flush_work(&psw->work);
timer_shutdown_sync(&psw->debounce);
+ flush_work(&psw->work);
free_irq(irq, pdev);
kfree(psw);