[rds-devel] [PATCH] net: rds: Don't allocate rds_sock on stack

David Miller davem at davemloft.net
Mon Aug 25 12:57:40 PDT 2014


From: Mark Brown <broonie at kernel.org>
Date: Sun, 24 Aug 2014 19:32:35 -0500

> From: Mark Brown <broonie at linaro.org>
> 
> struct rds_sock is rather large ausing the following warning in an ARM
> allmodconfig:
> 
> net/rds/iw_rdma.c:200:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> 
> Fix this by dynamically allocating struct rds_sock in rds_iw_update_cm_id
> instead of allocating it on the stack.
> 
> Signed-off-by: Mark Brown <broonie at linaro.org>

I'd like you to fix this differently.  Creating pseudo instances of
objects, and partially initializing it, just to satisfy an interface
is always a really bad sign.

Create a key structure argument for rds_iw_get_device() and initialize that
and pass it in instead, update the other caller similarly.

Thanks.



More information about the rds-devel mailing list