Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Douglas Gilbert
On 2018-12-25 3:15 p.m., Kangjie Lu wrote: What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Now this looks like a worthwhile optimization, in some pretty tricky code. I can't see a security angle in it. Did

[PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Kangjie Lu
What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Signed-off-by: Kangjie Lu --- drivers/scsi/sg.c | 4 ++-- kernel/sched/core.c | 18 -- 2 files changed, 14 insertions(+), 8 deletions(-)

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Yet something to improve: [auto build test ERROR on scsi/for-next] [also build test ERROR on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Kangjie Lu
What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Signed-off-by: Kangjie Lu --- drivers/scsi/sg.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/sg.c