aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2017-02-19 16:35:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-26 11:05:48 -0500
commitdc7ffefdcc28a45214aa707fdc3df6a5e611ba09 (patch)
tree9e355065f7b0b59bad43658947a85048d804d20c
parent7aa2a92c491ecdd98b60845548a7041b159b3de3 (diff)
staging/lustre/lnet: Fix allocation size for sv_cpt_data
This is unbreaking another of those "stealth" janitor patches that got in and subtly broke some things. sv_cpt_data is a pointer to pointer, so need to dereference it twice to allocate the correct structure size. Fixes: 9899cb68c6c2 ("Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.") CC: Sandhya Bankar <bankarsandhya512@gmail.com> Cc: stable <stable@vger.kernel.org> # 4.7+ Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lnet/selftest/rpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c
index 92cd4113cf75..87fe366f8f70 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.c
+++ b/drivers/staging/lustre/lnet/selftest/rpc.c
@@ -255,7 +255,7 @@ srpc_service_init(struct srpc_service *svc)
255 svc->sv_shuttingdown = 0; 255 svc->sv_shuttingdown = 0;
256 256
257 svc->sv_cpt_data = cfs_percpt_alloc(lnet_cpt_table(), 257 svc->sv_cpt_data = cfs_percpt_alloc(lnet_cpt_table(),
258 sizeof(*svc->sv_cpt_data)); 258 sizeof(**svc->sv_cpt_data));
259 if (!svc->sv_cpt_data) 259 if (!svc->sv_cpt_data)
260 return -ENOMEM; 260 return -ENOMEM;
261 261