lkml.org 
[lkml]   [2023]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH] nfs: reduce stack usage of nfs_get_root
Date
On 26 Sep 2023, at 20:16, Nicholas Piggin wrote:

> Move fsinfo allocation off stack, reducing stack overhead of
> nfs_get_root from 304 to 192 bytes.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> Hi,
>
> This is motivated by a stack overflow described here:
> https://lore.kernel.org/netdev/20230927001308.749910-1-npiggin@gmail.com/
>
> NFS is not really a major culprit but it seems not too hard to
> shrink the stack a little.
>
> Thanks,
> Nick

Looks good, might be able to get rid of the local "root" var too if the
compiler doesn't optimize it away.

Reviewed-by: Benjamin Coddington <bcodding@redhat.com>

Ben

\
 
 \ /
  Last update: 2023-09-27 18:52    [W:2.083 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site