lkml.org 
[lkml]   [2024]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] [v2] scsi: mpi3mr: reduce stack usage in mpi3mr_refresh_sas_ports()
Date
On Tue, 23 Jan 2024 14:07:36 +0100, Arnd Bergmann wrote:

> Doubling the number of PHYs also doubled the stack usage of this function,
> exceeding the 32-bit limit of 1024 bytes:
>
> drivers/scsi/mpi3mr/mpi3mr_transport.c: In function 'mpi3mr_refresh_sas_ports':
> drivers/scsi/mpi3mr/mpi3mr_transport.c:1818:1: error: the frame size of 1636 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
>
> Since the sas_io_unit_pg0 structure is already allocated dynamically, use
> the same method here. The size of the allocation can be smaller based on the
> actual number of phys now, so use this as an upper bound.
>
> [...]

Applied to 6.8/scsi-fixes, thanks!

[1/1] scsi: mpi3mr: reduce stack usage in mpi3mr_refresh_sas_ports()
https://git.kernel.org/mkp/scsi/c/5cc2da0b60e5

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2024-05-27 15:24    [W:0.183 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site