netxen: check for root bus in netxen_mask_aer_correctable
Subsystems (3)
PATCH 1/1 netxen: check for root bus in netxen_mask_aer_correctable
From: Nikolay Aleksandrov <[email protected]>
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.
--- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +4 -0
@@ -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 ;
Signature · 1 line
1.7.11.4
________________________________________
From: [email protected] [[email protected]]
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 <[email protected]>
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.
--- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +4 -0
@@ -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.
David Miller
maintainerNo, 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.
David Miller
maintainerFrom: [email protected]
Date: Fri, 14 Sep 2012 17:50:03 +0200
Quoted 8 lines
From: Nikolay Aleksandrov <[email protected]>
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 innetxen_mask_aer_correctable()because of a NULL pointer dereference ifCONFIG_PCIEAERis present.Signed-off-by Nikolay Aleksandrov <[email protected]>
Applied and queued up for -stable, thanks.
________________________________________
From: David Miller [[email protected]]
Sent: Wednesday, September 19, 2012 1:53 AM
To: Rajesh Borundia
Cc: [email protected]; 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.
David Miller
maintainerFrom: Rajesh Borundia <[email protected]>
Date: Wed, 19 Sep 2012 02:24:29 -0500
Quoted 8 lines
________________________________________
From: David Miller [[email protected]]
Sent: Wednesday, September 19, 2012 1:53 AM
To: Rajesh Borundia
Cc: [email protected]; Sony Chacko; netdev
Subject: Re: [PATCH] netxen: check for root bus innetxen_mask_aer_correctable
Quoted 7 lines
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.
Quoted 2 lines
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.