]> Git Repo - linux.git/commitdiff
Merge tag 'sh-for-v6.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubit...
authorLinus Torvalds <[email protected]>
Sat, 9 Sep 2023 21:46:57 +0000 (14:46 -0700)
committerLinus Torvalds <[email protected]>
Sat, 9 Sep 2023 21:46:57 +0000 (14:46 -0700)
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()

1  2 
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-kfr2r09/setup.c

index 310513646c9b3f2c452949f708f8fa5aa6ff8381,7ec03d4a4edf0f0f2f90443a703c96a5dabfb4ee..3be293335de545125ff8420cea36a28ee7873c51
@@@ -386,7 -386,7 +386,7 @@@ static struct property_entry gpio_backl
  };
  
  static struct gpio_backlight_platform_data gpio_backlight_data = {
 -      .fbdev = &lcdc_device.dev,
 +      .dev = &lcdc_device.dev,
  };
  
  static const struct platform_device_info gpio_backlight_device_info = {
@@@ -1454,15 -1454,13 +1454,13 @@@ static int __init arch_setup(void
        device_initialize(&ecovec_ceu_devices[0]->dev);
        dma_declare_coherent_memory(&ecovec_ceu_devices[0]->dev,
                                    ceu0_dma_membase, ceu0_dma_membase,
-                                   ceu0_dma_membase +
-                                   CEU_BUFFER_MEMORY_SIZE - 1);
+                                   CEU_BUFFER_MEMORY_SIZE);
        platform_device_add(ecovec_ceu_devices[0]);
  
        device_initialize(&ecovec_ceu_devices[1]->dev);
        dma_declare_coherent_memory(&ecovec_ceu_devices[1]->dev,
                                    ceu1_dma_membase, ceu1_dma_membase,
-                                   ceu1_dma_membase +
-                                   CEU_BUFFER_MEMORY_SIZE - 1);
+                                   CEU_BUFFER_MEMORY_SIZE);
        platform_device_add(ecovec_ceu_devices[1]);
  
        gpiod_add_lookup_table(&cn12_power_gpiod_table);
index a18e80394aedca6bb27d133374094bc739b4c0ea,c6d556dfbbbe6850017b4374098ff4d4a8dabb7f..6b775eae85c021bf0a7d02f64523f31a801dde61
@@@ -202,7 -202,7 +202,7 @@@ static struct platform_device kfr2r09_s
  };
  
  static struct lv5207lp_platform_data kfr2r09_backlight_data = {
 -      .fbdev = &kfr2r09_sh_lcdc_device.dev,
 +      .dev = &kfr2r09_sh_lcdc_device.dev,
        .def_value = 13,
        .max_value = 13,
  };
@@@ -603,7 -603,7 +603,7 @@@ static int __init kfr2r09_devices_setup
        device_initialize(&kfr2r09_ceu_device.dev);
        dma_declare_coherent_memory(&kfr2r09_ceu_device.dev,
                        ceu_dma_membase, ceu_dma_membase,
-                       ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1);
+                       CEU_BUFFER_MEMORY_SIZE);
  
        platform_device_add(&kfr2r09_ceu_device);
  
This page took 0.061996 seconds and 4 git commands to generate.