diff options
author | Mitch Williams | 2013-11-28 06:39:39 +0000 |
---|---|---|
committer | Jeff Kirsher | 2014-01-06 02:32:26 -0800 |
commit | 3197ce220c821b869731872251f2e225c37cbbb0 (patch) | |
tree | 1abee371dd5ede7eadd93037168a14eb79a98967 | |
parent | 5a9769c827151def466f7e65619bc6aac643cf96 (diff) |
i40e: don't allocate zero size
Shockingly, the compiler didn't flag this uninitialized variable. This
fixes a potential memory corruption condition where ARQ messages are
written to random memory locations.
Change-Id: Iac82f4562d2bf3f42df3f3b2163d9cbed2160135
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index c0d7fe6ef2eb..40484e012637 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -4492,6 +4492,7 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf) if (!test_bit(__I40E_ADMINQ_EVENT_PENDING, &pf->state)) return; + event.msg_size = I40E_MAX_AQ_BUF_SIZE; event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL); if (!event.msg_buf) return; |