projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d2b75f
)
staging/rdma/hfi1: diag.c correct sizeof parameter
author
Ira Weiny
<ira.weiny@intel.com>
Wed, 2 Dec 2015 05:43:32 +0000
(
00:43
-0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 21:53:37 +0000
(13:53 -0800)
sizeof should use the variable rather than the struct definition to ensure that
type changes are properly accounted for.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c
patch
|
blob
|
history
diff --git
a/drivers/staging/rdma/hfi1/diag.c
b/drivers/staging/rdma/hfi1/diag.c
index ed9cfccc860b4b23a384f7e568a2dc5f3a434f67..70a2614db77139c79f9f0779045ee9085ea4e482 100644
(file)
--- a/
drivers/staging/rdma/hfi1/diag.c
+++ b/
drivers/staging/rdma/hfi1/diag.c
@@
-1482,7
+1482,7
@@
static struct snoop_packet *allocate_snoop_packet(u32 hdr_len,
{
struct snoop_packet *packet;
- packet = kzalloc(sizeof(
struct snoop_
packet) + hdr_len + data_len
+ packet = kzalloc(sizeof(
*
packet) + hdr_len + data_len
+ md_len,
GFP_ATOMIC | __GFP_NOWARN);
if (likely(packet))