Skip to contentSkip to conversation

patch "staging/lustre/lnet: Fix allocation size for sv_cpt_data" added to staging-linus

PATCH [email protected] 1 participant 1 message Feb 26, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

staging/lustre/lnet: Fix allocation size for sv_cpt_data

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From dc7ffefdcc28a45214aa707fdc3df6a5e611ba09 Mon Sep 17 00:00:00 2001

From: Oleg Drokin <[email protected]>
Date: Sun, 19 Feb 2017 16:35:59 -0500
Subject: 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 <[email protected]>
Cc stable <[email protected]> # 4.7+
---
 drivers/staging/lustre/lnet/selftest/rpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/selftest/rpc.c +1 -1
index 92cd4113cf75..87fe366f8f70 100644
@@ -255,7 +255,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;
 
Signature · 1 line
2.11.1