* [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
@ 2012-09-14 15:50 nikolay
2012-09-17 17:53 ` Rajesh Borundia
2012-09-18 20:23 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: nikolay @ 2012-09-14 15:50 UTC (permalink / raw)
To: sony.chacko; +Cc: rajesh.borundia, netdev
From: Nikolay Aleksandrov <nikolay@redhat.com>
Add a check if pdev->bus->self == NULL (root bus). When attaching
a netxen NIC to a VM it can be on the root bus and the guest would
crash in netxen_mask_aer_correctable() because of a NULL pointer
dereference if CONFIG_PCIEAER is present.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 342b3a7..e2a4858 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -1378,6 +1378,10 @@ static void netxen_mask_aer_correctable(struct netxen_adapter *adapter)
struct pci_dev *root = pdev->bus->self;
u32 aer_pos;
+ /* root bus? */
+ if (!root)
+ return;
+
if (adapter->ahw.board_type != NETXEN_BRDTYPE_P3_4_GB_MM &&
adapter->ahw.board_type != NETXEN_BRDTYPE_P3_10G_TP)
return;
--
1.7.11.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
2012-09-14 15:50 [PATCH] netxen: check for root bus in netxen_mask_aer_correctable nikolay
@ 2012-09-17 17:53 ` Rajesh Borundia
2012-09-18 20:23 ` David Miller
2012-09-18 20:23 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Rajesh Borundia @ 2012-09-17 17:53 UTC (permalink / raw)
To: nikolay@redhat.com, Sony Chacko; +Cc: netdev
________________________________________
From: nikolay@redhat.com [nikolay@redhat.com]
Sent: Friday, September 14, 2012 9:20 PM
To: Sony Chacko
Cc: Rajesh Borundia; netdev
Subject: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
From: Nikolay Aleksandrov <nikolay@redhat.com>
Add a check if pdev->bus->self == NULL (root bus). When attaching
a netxen NIC to a VM it can be on the root bus and the guest would
crash in netxen_mask_aer_correctable() because of a NULL pointer
dereference if CONFIG_PCIEAER is present.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 342b3a7..e2a4858 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -1378,6 +1378,10 @@ static void netxen_mask_aer_correctable(struct netxen_adapter *adapter)
struct pci_dev *root = pdev->bus->self;
u32 aer_pos;
+ /* root bus? */
+ if (!root)
+ return;
+
if (adapter->ahw.board_type != NETXEN_BRDTYPE_P3_4_GB_MM &&
adapter->ahw.board_type != NETXEN_BRDTYPE_P3_10G_TP)
return;
--
1.7.11.4
Looks okay.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
2012-09-17 17:53 ` Rajesh Borundia
@ 2012-09-18 20:23 ` David Miller
2012-09-19 7:24 ` Rajesh Borundia
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-09-18 20:23 UTC (permalink / raw)
To: rajesh.borundia; +Cc: nikolay, sony.chacko, netdev
No, this is not the correct way to submit patches written by other
people.
Look at how people like Jeff Kirsher submits Intel driver patches
written by people other than himself.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
2012-09-14 15:50 [PATCH] netxen: check for root bus in netxen_mask_aer_correctable nikolay
2012-09-17 17:53 ` Rajesh Borundia
@ 2012-09-18 20:23 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2012-09-18 20:23 UTC (permalink / raw)
To: nikolay; +Cc: sony.chacko, rajesh.borundia, netdev
From: nikolay@redhat.com
Date: Fri, 14 Sep 2012 17:50:03 +0200
> From: Nikolay Aleksandrov <nikolay@redhat.com>
>
> Add a check if pdev->bus->self == NULL (root bus). When attaching
> a netxen NIC to a VM it can be on the root bus and the guest would
> crash in netxen_mask_aer_correctable() because of a NULL pointer
> dereference if CONFIG_PCIEAER is present.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
2012-09-18 20:23 ` David Miller
@ 2012-09-19 7:24 ` Rajesh Borundia
2012-09-19 17:40 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Rajesh Borundia @ 2012-09-19 7:24 UTC (permalink / raw)
To: David Miller; +Cc: nikolay@redhat.com, Sony Chacko, netdev
________________________________________
From: David Miller [davem@davemloft.net]
Sent: Wednesday, September 19, 2012 1:53 AM
To: Rajesh Borundia
Cc: nikolay@redhat.com; Sony Chacko; netdev
Subject: Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
No, this is not the correct way to submit patches written by other
people.
Look at how people like Jeff Kirsher submits Intel driver patches
written by people other than himself.
Apologies, will follow the guideline.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
2012-09-19 7:24 ` Rajesh Borundia
@ 2012-09-19 17:40 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-09-19 17:40 UTC (permalink / raw)
To: rajesh.borundia; +Cc: nikolay, sony.chacko, netdev
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
Date: Wed, 19 Sep 2012 02:24:29 -0500
>
> ________________________________________
> From: David Miller [davem@davemloft.net]
> Sent: Wednesday, September 19, 2012 1:53 AM
> To: Rajesh Borundia
> Cc: nikolay@redhat.com; Sony Chacko; netdev
> Subject: Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
>
> No, this is not the correct way to submit patches written by other
> people.
>
> Look at how people like Jeff Kirsher submits Intel driver patches
> written by people other than himself.
>
> Apologies, will follow the guideline.
This is also not the correct way to reply to people in email.
You haven't properly quoted me, so it's impossible to discern the text
that I wrote from the text that you have written in response.
If you look at how other people respond in email, you'll see that the
respondee is properly quoted using prefix characters in the initial
columns of the quoted test.
> Like
> this.
This is a function of your email client, please learn how to configure
it so that you can reply properly on these mailing lists. Don't try
to force it and do the quoting by hand.
It is extremely frustrating to communicate with contributors who
cannot write email that conforms to accepted practices and conventions
on the mailing list. Please get your act together, or you will find
that your postings will get less attention and care than you would
like.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-19 17:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 15:50 [PATCH] netxen: check for root bus in netxen_mask_aer_correctable nikolay
2012-09-17 17:53 ` Rajesh Borundia
2012-09-18 20:23 ` David Miller
2012-09-19 7:24 ` Rajesh Borundia
2012-09-19 17:40 ` David Miller
2012-09-18 20:23 ` 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).