Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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()

+8 -12
+1 -1
arch/sh/boards/mach-ap325rxa/setup.c
··· 531 531 device_initialize(&ap325rxa_ceu_device.dev); 532 532 dma_declare_coherent_memory(&ap325rxa_ceu_device.dev, 533 533 ceu_dma_membase, ceu_dma_membase, 534 - ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1); 534 + CEU_BUFFER_MEMORY_SIZE); 535 535 536 536 platform_device_add(&ap325rxa_ceu_device); 537 537
+2 -4
arch/sh/boards/mach-ecovec24/setup.c
··· 1454 1454 device_initialize(&ecovec_ceu_devices[0]->dev); 1455 1455 dma_declare_coherent_memory(&ecovec_ceu_devices[0]->dev, 1456 1456 ceu0_dma_membase, ceu0_dma_membase, 1457 - ceu0_dma_membase + 1458 - CEU_BUFFER_MEMORY_SIZE - 1); 1457 + CEU_BUFFER_MEMORY_SIZE); 1459 1458 platform_device_add(ecovec_ceu_devices[0]); 1460 1459 1461 1460 device_initialize(&ecovec_ceu_devices[1]->dev); 1462 1461 dma_declare_coherent_memory(&ecovec_ceu_devices[1]->dev, 1463 1462 ceu1_dma_membase, ceu1_dma_membase, 1464 - ceu1_dma_membase + 1465 - CEU_BUFFER_MEMORY_SIZE - 1); 1463 + CEU_BUFFER_MEMORY_SIZE); 1466 1464 platform_device_add(ecovec_ceu_devices[1]); 1467 1465 1468 1466 gpiod_add_lookup_table(&cn12_power_gpiod_table);
+1 -1
arch/sh/boards/mach-kfr2r09/setup.c
··· 603 603 device_initialize(&kfr2r09_ceu_device.dev); 604 604 dma_declare_coherent_memory(&kfr2r09_ceu_device.dev, 605 605 ceu_dma_membase, ceu_dma_membase, 606 - ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1); 606 + CEU_BUFFER_MEMORY_SIZE); 607 607 608 608 platform_device_add(&kfr2r09_ceu_device); 609 609
+1 -1
arch/sh/boards/mach-migor/setup.c
··· 604 604 device_initialize(&migor_ceu_device.dev); 605 605 dma_declare_coherent_memory(&migor_ceu_device.dev, 606 606 ceu_dma_membase, ceu_dma_membase, 607 - ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1); 607 + CEU_BUFFER_MEMORY_SIZE); 608 608 609 609 platform_device_add(&migor_ceu_device); 610 610
+2 -4
arch/sh/boards/mach-se/7724/setup.c
··· 940 940 device_initialize(&ms7724se_ceu_devices[0]->dev); 941 941 dma_declare_coherent_memory(&ms7724se_ceu_devices[0]->dev, 942 942 ceu0_dma_membase, ceu0_dma_membase, 943 - ceu0_dma_membase + 944 - CEU_BUFFER_MEMORY_SIZE - 1); 943 + CEU_BUFFER_MEMORY_SIZE); 945 944 platform_device_add(ms7724se_ceu_devices[0]); 946 945 947 946 device_initialize(&ms7724se_ceu_devices[1]->dev); 948 947 dma_declare_coherent_memory(&ms7724se_ceu_devices[1]->dev, 949 948 ceu1_dma_membase, ceu1_dma_membase, 950 - ceu1_dma_membase + 951 - CEU_BUFFER_MEMORY_SIZE - 1); 949 + CEU_BUFFER_MEMORY_SIZE); 952 950 platform_device_add(ms7724se_ceu_devices[1]); 953 951 954 952 return platform_add_devices(ms7724se_devices,
+1 -1
arch/sh/drivers/push-switch.c
··· 101 101 device_remove_file(&pdev->dev, &dev_attr_switch); 102 102 103 103 platform_set_drvdata(pdev, NULL); 104 - flush_work(&psw->work); 105 104 timer_shutdown_sync(&psw->debounce); 105 + flush_work(&psw->work); 106 106 free_irq(irq, pdev); 107 107 108 108 kfree(psw);