Daniel Borkmann
ffd5939381
net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode
...
SCTP's sctp_connectx() abi breaks for 64bit kernels compiled with 32bit
emulation (e.g. ia32 emulation or x86_x32). Due to internal usage of
'struct sctp_getaddrs_old' which includes a struct sockaddr pointer,
sizeof(param) check will always fail in kernel as the structure in
64bit kernel space is 4bytes larger than for user binaries compiled
in 32bit mode. Thus, applications making use of sctp_connectx() won't
be able to run under such circumstances.
Introduce a compat interface in the kernel to deal with such
situations by using a 'struct compat_sctp_getaddrs_old' structure
where user data is copied into it, and then sucessively transformed
into a 'struct sctp_getaddrs_old' structure with the help of
compat_ptr(). That fixes sctp_connectx() abi without any changes
needed in user space, and lets the SCTP test suite pass when compiled
in 32bit and run on 64bit kernels.
Fixes: f9c67811eb ("sctp: Fix regression introduced by new sctp_connectx api")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com >
Acked-by: Neil Horman <nhorman@tuxdriver.com >
Acked-by: Vlad Yasevich <vyasevich@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 16:06:48 -05:00
David S. Miller
7ffb0d317d
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
...
Included changes:
- fix soft-interface MTU computation
- fix bogus pointer mangling when parsing the TT-TVLV
container. This bug led to a wrong memory access.
- fix memory leak by properly releasing the VLAN object
after CRC check
- properly check pskb_may_pull() return value
- avoid potential race condition while adding new neighbour
- fix potential memory leak by removing all the references
to the orig_node object in case of initialization failure
- fix the TT CRC computation by ensuring that every node uses
the same byte order when hosts with different endianess are
part of the same network
- fix severe memory leak by freeing skb after a successful
TVLV parsing
- avoid potential double free when orig_node initialization
fails
- fix potential kernel paging error caused by the usage of
the old value of skb->data after skb reallocation
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:40:50 -05:00
David S. Miller
9fa9e49829
Merge branch 'msix'
...
Alexander Gordeev says:
====================
net: Use pci_enable_msix_range() instead of pci_enable_msix()
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Cc: e1000-devel@lists.sourceforge.net
Cc: linux-driver@qlogic.com
Cc: linux-net-drivers@solarflare.com
Cc: linux-pci@vger.kernel.org
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: pv-drivers@vmware.com
Cc: wil6210@qca.qualcomm.com
====================
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:34:14 -05:00
Alexander Gordeev
b4b39061da
wil6210: Use pci_enable_msi_range() instead of pci_enable_msi_block()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com >
Cc: "John W. Linville" <linville@tuxdriver.com >
Cc: wil6210@qca.qualcomm.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
c0a1be3842
vmxnet3: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Shreyas Bhatewara <sbhatewara@vmware.com >
Cc: pv-drivers@vmware.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
b60b869d5f
vmxnet3: Fix MSI-X/MSI enablement code
...
This update cleans up the MSI-X/MSI enablement code, fixes
vmxnet3_acquire_msix_vectors() invalid return values and
enables a dead code in case VMXNET3_LINUX_MIN_MSIX_VECT
MSI-X vectors were allocated.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Shreyas Bhatewara <sbhatewara@vmware.com >
Cc: pv-drivers@vmware.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
9e7df17e2e
niu: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Jingoo Han <jg1.han@samsung.com >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
184603d882
sfc: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Shradha Shah <sshah@solarflare.com >
Cc: linux-net-drivers@solarflare.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Shradha Shah <sshah@solarflare.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
50b483a145
qlge: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com >
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com >
Cc: Ron Mercer <ron.mercer@qlogic.com >
Cc: linux-driver@qlogic.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:34 -05:00
Alexander Gordeev
7f8358c908
qlge: Get rid of an redundant assignment
...
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com >
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com >
Cc: Ron Mercer <ron.mercer@qlogic.com >
Cc: linux-driver@qlogic.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
9732ec06ca
qlcnic: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com >
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com >
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com >
Cc: linux-driver@qlogic.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
74a1fa45eb
qlcnic: Cleanup qlcnic_enable_msix() return values
...
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com >
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com >
Cc: Shahed Shaikh <shahed.shaikh@qlogic.com >
Cc: linux-driver@qlogic.com
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
4a6768d3ed
netxen: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Manish Chopra <manish.chopra@qlogic.com >
Cc: Sony Chacko <sony.chacko@qlogic.com >
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
04698ef3a0
forcedeth: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Patrick McHardy <kaber@trash.net >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
d9bd00a1dd
forcedeth: Cleanup MSI-X to MSI to INTx fallback code
...
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Patrick McHardy <kaber@trash.net >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:33 -05:00
Alexander Gordeev
61c9471e4d
forcedeth: Fix invalid errno reporting in nv_request_irq()
...
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Patrick McHardy <kaber@trash.net >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
9644cdcd52
vxge: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jon Mason <jdmason@kudzu.us >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
37a15ed3b9
s2io: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jon Mason <jdmason@kudzu.us >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
0729cc0c5e
myri10ge: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Hyong-Youb Kim <hykim@myri.com >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
f3c9407bc2
mlx5: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Eli Cohen <eli@mellanox.com >
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
66e2f9c1de
mlx4: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Amir Vadai <amirv@mellanox.com >
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Acked-by: Amir Vadai <amirv@mellanox.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:32 -05:00
Alexander Gordeev
5c1e358802
ixgbevf: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: Bruce Allan <bruce.w.allan@intel.com >
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:31 -05:00
Alexander Gordeev
b45e620c52
ixgbe: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: Bruce Allan <bruce.w.allan@intel.com >
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:31 -05:00
Alexander Gordeev
4601e7591f
igbvf: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: Bruce Allan <bruce.w.allan@intel.com >
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:31 -05:00
Alexander Gordeev
479d02dfad
igb: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-02-18 15:33:31 -05:00