Re: [PATCH] net: neterion: vxge: reduce stack usage in VXGE_COMPLETE_VPATH_TX
From: Joe Perches
Date: Thu Jul 16 2020 - 05:46:59 EST
On Thu, 2020-07-16 at 17:32 +0000, Bixuan Cui wrote:
> Fix the warning: [-Werror=-Wframe-larger-than=]
[]
> diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
[]
> @@ -100,8 +100,14 @@ static inline void VXGE_COMPLETE_VPATH_TX(struct vxge_fifo *fifo)
> struct sk_buff **temp;
> #define NR_SKB_COMPLETED 128
> struct sk_buff *completed[NR_SKB_COMPLETED];
> + struct sk_buff **completed;
> int more;
>
> + completed = kcalloc(NR_SKB_COMPLETED, sizeof(*completed),
> + GFP_KERNEL);
I doubt this is a good idea.
Check the callers interrupt status.