]> Gentwo Git Trees - linux/.git/commit
serial: 8250_platform: Reduce stack usage in serial8250_probe_acpi()
authorAbinash Singh <abinashsinghlalotra@gmail.com>
Wed, 6 Aug 2025 21:51:33 +0000 (03:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Aug 2025 09:58:50 +0000 (11:58 +0200)
commitd9b7679611d320db4f4436f0281a7797f2e06e15
tree22d1cc3b1441db24fbe5ff105d8ebe054d058710
parent672a37ba8af1f2ebcedeb94aea2cdd047f805f30
serial: 8250_platform: Reduce stack usage in serial8250_probe_acpi()

The function serial8250_probe_acpi() in 8250_platform.c triggered a
    frame size warning:
drivers/tty/serial/8250/8250_platform.c: In function ‘serial8250_probe_acpi’:
drivers/tty/serial/8250/8250_platform.c:152:1: warning: the frame size of 1160 bytes is larger than 1024 bytes [-Wframe-larger-than=]

This patch reduces the stack usage by dynamically allocating the
`uart` structure using kzalloc(), rather than placing it on
the stack. This eliminates the overflow warning and improves kernel
robustness.

Signed-off-by: Abinash Singh <abinashsinghlalotra@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250806215134.4921-2-abinashsinghlalotra@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_platform.c