* [PATCH net-next 0/4] qlcnic: Bug Fixes
@ 2013-04-02 15:34 Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 1/4] qlcnic: Fix potential NULL dereference Rajesh Borundia
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Rajesh Borundia @ 2013-04-02 15:34 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver
Please apply it to net-next.
Rajesh Borundia (4):
qlcnic: Fix potential NULL dereference
qlcnic: Fix NULL dereference in error path.
qlcnic: Fix sparse warnings.
qlcnic: Bump up the version to 5.2.40
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 1/4] qlcnic: Fix potential NULL dereference
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
@ 2013-04-02 15:34 ` Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 2/4] qlcnic: Fix NULL dereference in error path Rajesh Borundia
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Rajesh Borundia @ 2013-04-02 15:34 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver
[net-next:master 301/302] drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:563
qlcnic_set_multi() error: potential null dereference 'cur'. (kzalloc returns null)
o Break out of the loop after memory allocation failure. Program all the
MAC addresses that were cached in the return path.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index ddc130b..253b3ac 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -560,6 +560,8 @@ void qlcnic_set_multi(struct net_device *netdev)
netdev_for_each_mc_addr(ha, netdev) {
cur = kzalloc(sizeof(struct qlcnic_mac_list_s),
GFP_ATOMIC);
+ if (cur == NULL)
+ break;
memcpy(cur->mac_addr,
ha->addr, ETH_ALEN);
list_add_tail(&cur->list, &adapter->vf_mc_list);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/4] qlcnic: Fix NULL dereference in error path.
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 1/4] qlcnic: Fix potential NULL dereference Rajesh Borundia
@ 2013-04-02 15:34 ` Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 3/4] qlcnic: Fix sparse warnings Rajesh Borundia
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Rajesh Borundia @ 2013-04-02 15:34 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver
o Fix for smatch tool reported error
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:2029
qlcnic_probe() error: potential NULL dereference 'adapter'.
o While returning from an error path in probe, adapter is not
initialized. So do not access adapter in cleanup path.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 3ee593e..0d00b2b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -546,11 +546,10 @@ void qlcnic_teardown_intr(struct qlcnic_adapter *adapter)
}
}
-static void
-qlcnic_cleanup_pci_map(struct qlcnic_adapter *adapter)
+static void qlcnic_cleanup_pci_map(struct qlcnic_hardware_context *ahw)
{
- if (adapter->ahw->pci_base0 != NULL)
- iounmap(adapter->ahw->pci_base0);
+ if (ahw->pci_base0 != NULL)
+ iounmap(ahw->pci_base0);
}
static int qlcnic_get_act_pci_func(struct qlcnic_adapter *adapter)
@@ -2026,7 +2025,7 @@ err_out_free_netdev:
free_netdev(netdev);
err_out_iounmap:
- qlcnic_cleanup_pci_map(adapter);
+ qlcnic_cleanup_pci_map(ahw);
err_out_free_hw_res:
kfree(ahw);
@@ -2083,7 +2082,7 @@ static void qlcnic_remove(struct pci_dev *pdev)
qlcnic_remove_sysfs(adapter);
- qlcnic_cleanup_pci_map(adapter);
+ qlcnic_cleanup_pci_map(adapter->ahw);
qlcnic_release_firmware(adapter);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 3/4] qlcnic: Fix sparse warnings.
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 1/4] qlcnic: Fix potential NULL dereference Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 2/4] qlcnic: Fix NULL dereference in error path Rajesh Borundia
@ 2013-04-02 15:34 ` Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 4/4] qlcnic: Bump up the version to 5.2.40 Rajesh Borundia
2013-04-02 18:27 ` [PATCH net-next 0/4] qlcnic: Bug Fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Rajesh Borundia @ 2013-04-02 15:34 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver
warning: 'pf_info.max_tx_ques' may be used uninitialized in this function
[-Wmaybe-uninitialized]
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index d6ac7dc..bed5056 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -156,6 +156,7 @@ static int qlcnic_sriov_get_pf_info(struct qlcnic_adapter *adapter,
npar_info->max_local_ipv6_addrs = LSW(cmd.rsp.arg[8]);
npar_info->max_remote_ipv6_addrs = MSW(cmd.rsp.arg[8]);
+ qlcnic_sriov_pf_set_ff_max_res(adapter, npar_info);
dev_info(&adapter->pdev->dev,
"\n\ttotal_pf: %d,\n"
"\n\ttotal_rss_engines: %d max_vports: %d max_tx_ques %d,\n"
@@ -376,8 +377,6 @@ static int qlcnic_sriov_pf_init(struct qlcnic_adapter *adapter)
if (err)
goto delete_vport;
- qlcnic_sriov_pf_set_ff_max_res(adapter, &pf_info);
-
err = qlcnic_get_nic_info(adapter, &nic_info, func);
if (err)
goto delete_vport;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 4/4] qlcnic: Bump up the version to 5.2.40
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
` (2 preceding siblings ...)
2013-04-02 15:34 ` [PATCH net-next 3/4] qlcnic: Fix sparse warnings Rajesh Borundia
@ 2013-04-02 15:34 ` Rajesh Borundia
2013-04-02 18:27 ` [PATCH net-next 0/4] qlcnic: Bug Fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Rajesh Borundia @ 2013-04-02 15:34 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index e5af69d..ef55718 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -38,8 +38,8 @@
#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 2
-#define _QLCNIC_LINUX_SUBVERSION 39
-#define QLCNIC_LINUX_VERSIONID "5.2.39"
+#define _QLCNIC_LINUX_SUBVERSION 40
+#define QLCNIC_LINUX_VERSIONID "5.2.40"
#define QLCNIC_DRV_IDC_VER 0x01
#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\
(_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/4] qlcnic: Bug Fixes
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
` (3 preceding siblings ...)
2013-04-02 15:34 ` [PATCH net-next 4/4] qlcnic: Bump up the version to 5.2.40 Rajesh Borundia
@ 2013-04-02 18:27 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-04-02 18:27 UTC (permalink / raw)
To: rajesh.borundia; +Cc: netdev, Dept_NX_Linux_NIC_Driver
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
Date: Tue, 2 Apr 2013 11:34:39 -0400
> Please apply it to net-next.
>
> Rajesh Borundia (4):
> qlcnic: Fix potential NULL dereference
> qlcnic: Fix NULL dereference in error path.
> qlcnic: Fix sparse warnings.
> qlcnic: Bump up the version to 5.2.40
All applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-02 18:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02 15:34 [PATCH net-next 0/4] qlcnic: Bug Fixes Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 1/4] qlcnic: Fix potential NULL dereference Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 2/4] qlcnic: Fix NULL dereference in error path Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 3/4] qlcnic: Fix sparse warnings Rajesh Borundia
2013-04-02 15:34 ` [PATCH net-next 4/4] qlcnic: Bump up the version to 5.2.40 Rajesh Borundia
2013-04-02 18:27 ` [PATCH net-next 0/4] qlcnic: Bug Fixes David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).