Thread (2 messages) flat view 2 messages, 2 authors, 2015-08-18

RE: [Intel-wired-lan] [PATCH] e100: Add a check after pci_pool_create to avoid null pointer dereference

From: Brown, Aaron F <hidden>
Date: 2015-08-18 02:54:37
Also in: intel-wired-lan, lkml

From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
Behalf Of Jia-Ju Bai
Sent: Sunday, August 02, 2015 7:17 PM
To: Kirsher, Jeffrey T; Brandeburg, Jesse
Cc: netdev@vger.kernel.org; Jia-Ju Bai; intel-wired-lan@lists.osuosl.org;
linux-kernel@vger.kernel.org
Subject: [Intel-wired-lan] [PATCH] e100: Add a check after pci_pool_create
to avoid null pointer dereference

The driver lacks the check of nic->cbs_pool after pci_pool_create
in e100_probe. When this function is failed, a null pointer dereference
occurs when pci_pool_alloc uses nic->cbs_pool in e100_alloc_cbs.
This patch adds a check and related error handling code to fix it.

Signed-off-by: Jia-Ju Bai <redacted>
---
 drivers/net/ethernet/intel/e100.c |    7 +++++++
 1 file changed, 7 insertions(+)
Tested-by: Aaron Brown <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help