summaryrefslogtreecommitdiff
path: root/net/rds/connection.c
diff options
context:
space:
mode:
authorSalvatore Mesoraca <s.mesoraca16@gmail.com>2018-03-11 22:07:49 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-12 15:06:59 -0400
commitf1cb9d68b4d8789d7f48bd293772095430860d86 (patch)
tree238171f3f41d78691100707d296c3612aaa8ab28 /net/rds/connection.c
parent3ed898e8cd0588152d9f0d7f472387c4af7f640e (diff)
net: rds: drop VLA in rds_for_each_conn_info()
Avoid VLA[1] by using an already allocated buffer passed by the caller. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Salvatore Mesoraca <s.mesoraca16@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r--net/rds/connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 2da3176bf792..f80792c719eb 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -540,9 +540,9 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens,
int (*visitor)(struct rds_connection *, void *),
+ u64 *buffer,
size_t item_len)
{
- uint64_t buffer[(item_len + 7) / 8];
struct hlist_head *head;
struct rds_connection *conn;
size_t i;