diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-07-30 15:44:14 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2013-08-14 15:48:17 -0700 |
commit | 42415c90ceaf50c792e29823e359463bc6d4ee05 (patch) | |
tree | 0857d63fdc8424b3ba8cbf688a4320674a29549e /net/openvswitch | |
parent | 30444e981ba28e892c439017fbc011d867f02a7d (diff) | |
download | linux-stable-42415c90ceaf50c792e29823e359463bc6d4ee05.tar.gz linux-stable-42415c90ceaf50c792e29823e359463bc6d4ee05.tar.bz2 linux-stable-42415c90ceaf50c792e29823e359463bc6d4ee05.zip |
openvswitch: Use correct type while allocating flex array.
Flex array is used to allocate hash buckets which is type struct
hlist_head, but we use `struct hlist_head *` to calculate
array size. Since hlist_head is of size pointer it works fine.
Following patch use correct type.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/flow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 5c519b121e1b..1aa84dc58777 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -240,7 +240,7 @@ static struct flex_array *alloc_buckets(unsigned int n_buckets) struct flex_array *buckets; int i, err; - buckets = flex_array_alloc(sizeof(struct hlist_head *), + buckets = flex_array_alloc(sizeof(struct hlist_head), n_buckets, GFP_KERNEL); if (!buckets) return NULL; |