* Patch "i40e: avoid null pointer dereference" has been added to the 4.7-stable tree
@ 2016-10-04 15:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-10-04 15:04 UTC (permalink / raw)
To: xypron.glpk, andrewx.bowers, gregkh, jeffrey.t.kirsher
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
i40e: avoid null pointer dereference
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
i40e-avoid-null-pointer-dereference.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cd956722167ba4fdba9c1ce3eed251b04ea2e10f Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Tue, 17 May 2016 22:41:33 +0200
Subject: i40e: avoid null pointer dereference
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
commit cd956722167ba4fdba9c1ce3eed251b04ea2e10f upstream.
In function i40e_debug_aq parameter desc is assumed to be
possibly NULL. Do not dereference it before checking the
value.
Fixes: f905dd62be88 ("i40e/i40evf: add max buf len to aq debug print helper")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -297,13 +297,15 @@ void i40e_debug_aq(struct i40e_hw *hw, e
void *buffer, u16 buf_len)
{
struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
- u16 len = le16_to_cpu(aq_desc->datalen);
+ u16 len;
u8 *buf = (u8 *)buffer;
u16 i = 0;
if ((!(mask & hw->debug_mask)) || (desc == NULL))
return;
+ len = le16_to_cpu(aq_desc->datalen);
+
i40e_debug(hw, mask,
"AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n",
le16_to_cpu(aq_desc->opcode),
Patches currently in stable-queue which might be from xypron.glpk@gmx.de are
queue-4.7/i40e-avoid-null-pointer-dereference.patch
queue-4.7/mwifiex-illegal-assignment.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-04 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 15:04 Patch "i40e: avoid null pointer dereference" has been added to the 4.7-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.