Whamcloud - gitweb
LU-12678 o2iblnd: allocate init_qp_attr on stack. 22/39122/2
authorMr NeilBrown <neilb@suse.de>
Sun, 7 Jun 2020 23:24:35 +0000 (19:24 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 28 Jun 2020 02:48:58 +0000 (02:48 +0000)
commit524a5a733ba1c9f77fe078683dbe12a98f4885ec
tree554847dc455110f948cd38c76c9e969477b87f39
parent068cf5c7cd29cc1c27effb71ff9b511d14207147
LU-12678 o2iblnd: allocate init_qp_attr on stack.

'struct ib_qp_init_attr' is not so large that it cannot be allocated
on the stack.  It is about 100 bytes, various other function in Linux
allocate it on the stack, and the stack isn't as constrained as it
once was.

So allocate on stack instead of using kmalloc and handling errors.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Id1f2f695f298d1883a5d6817092a6f89f1e072ef
Reviewed-on: https://review.whamcloud.com/39122
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.c