Skip to content

Commit dc7ffef

Browse files
verygreengregkh
authored andcommitted
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: 9899cb6 ("Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.") CC: Sandhya Bankar <[email protected]> Cc: stable <[email protected]> # 4.7+ Signed-off-by: Oleg Drokin <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Doug Oucharek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7aa2a92 commit dc7ffef

File tree

1 file changed

+1
-1
lines changed
  • drivers/staging/lustre/lnet/selftest

1 file changed

+1
-1
lines changed

drivers/staging/lustre/lnet/selftest/rpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ srpc_service_init(struct srpc_service *svc)
255255
svc->sv_shuttingdown = 0;
256256

257257
svc->sv_cpt_data = cfs_percpt_alloc(lnet_cpt_table(),
258-
sizeof(*svc->sv_cpt_data));
258+
sizeof(**svc->sv_cpt_data));
259259
if (!svc->sv_cpt_data)
260260
return -ENOMEM;
261261

0 commit comments

Comments
 (0)