mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
staging/lustre/lnet: Fix allocation size for sv_cpt_data
commitdc7ffefdccupstream. 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:9899cb68c6("Staging: lustre: rpc: Use sizeof type *pointer instead of sizeof type.") CC: Sandhya Bankar <bankarsandhya512@gmail.com> 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2893a55e39
commit
148c4526d7
@@ -252,7 +252,7 @@ srpc_service_init(struct srpc_service *svc)
|
||||
svc->sv_shuttingdown = 0;
|
||||
|
||||
svc->sv_cpt_data = cfs_percpt_alloc(lnet_cpt_table(),
|
||||
sizeof(*svc->sv_cpt_data));
|
||||
sizeof(**svc->sv_cpt_data));
|
||||
if (!svc->sv_cpt_data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user