* Re: [PATCH 6/7] [IPSEC]: Move IP length/checksum setting out of transforms
From: David Miller @ 2007-10-10 22:46 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjP-00024c-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:15 +0800
> [IPSEC]: Move IP length/checksum setting out of transforms
>
> This patch moves the setting of the IP length and checksum fields out of
> the transforms and into the xfrmX_output functions. This would help future
> efforts in merging the transforms themselves.
>
> It also adds an optimisation to ipcomp due to the fact that the transport
> offset is guaranteed to be zero.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
APplied.
^ permalink raw reply
* Re: [PATCH 7/7] [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c
From: David Miller @ 2007-10-10 22:46 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjQ-00024k-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:16 +0800
> [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c
>
> This patch makes the IPv4 x->type->input functions return the next protocol
> instead of setting it directly. This is identical to how we do things in
> IPv6 and will help us merge common code on the input path.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH] do not give access to 1-1024 ports for autobinding
From: David Miller @ 2007-10-10 22:51 UTC (permalink / raw)
To: shemminger; +Cc: den, netdev
In-Reply-To: <20071010084137.1963122e@freepuppy.rosehill>
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 10 Oct 2007 08:41:37 -0700
> On Wed, 10 Oct 2007 18:34:49 +0400
> "Denis V. Lunev" <den@openvz.org> wrote:
>
> > This patch prevents possibility to give 1-1024 port range for autobinding.
> > {1, 1} may only takes some sense for deep embedded people.
> >
> > Signed-off-by: Denis V. Lunev <den@openvz.org>
> >
> > --- ./net/ipv4/sysctl_net_ipv4.c.port2 2007-10-10 17:46:48.000000000 +0400
> > +++ ./net/ipv4/sysctl_net_ipv4.c 2007-10-10 18:08:00.000000000 +0400
> > @@ -25,7 +25,7 @@ extern int sysctl_ip_nonlocal_bind;
> > #ifdef CONFIG_SYSCTL
> > static int zero;
> > static int tcp_retr1_max = 255;
> > -static int ip_local_port_range_min[] = { 1, 1 };
> > +static int ip_local_port_range_min[] = { 1024, 1024 };
> > static int ip_local_port_range_max[] = { 65535, 65535 };
> > #endif
> >
> > -
>
> That only limits the sysctl, which seems completely counter productive.
> Sounds like more of the "stop root from shooting themselves" patches.
Agreed, we shouldn't be changing these values.
^ permalink raw reply
* Re: [PATCH] do not give access to 1-1024 ports for autobinding
From: David Miller @ 2007-10-10 22:52 UTC (permalink / raw)
To: den; +Cc: netdev
In-Reply-To: <20071010143449.GA10796@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Wed, 10 Oct 2007 18:34:49 +0400
> This patch prevents possibility to give 1-1024 port range for autobinding.
> {1, 1} may only takes some sense for deep embedded people.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Administrators can configure their systems however they want,
the numbers are valid port numbers, so we should not prevent
the possibility.
^ permalink raw reply
* Re: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching
From: David Miller @ 2007-10-10 22:53 UTC (permalink / raw)
To: billfink
Cc: hadi, shemminger, andi, jeff, johnpol, herbert, gaagaan,
Robert.Olsson, netdev, rdreier, peter.p.waskiewicz.jr, mcarlson,
jagana, general, mchan, tgraf, randy.dunlap, sri, kaber
In-Reply-To: <20071010120215.7ec19323.billfink@mindspring.com>
From: Bill Fink <billfink@mindspring.com>
Date: Wed, 10 Oct 2007 12:02:15 -0400
> On Tue, 09 Oct 2007, David Miller wrote:
>
> > We have to keep in mind, however, that the sw queue right now is 1000
> > packets. I heavily discourage any driver author to try and use any
> > single TX queue of that size. Which means that just dropping on back
> > pressure might not work so well.
> >
> > Or it might be perfect and signal TCP to backoff, who knows! :-)
>
> I can't remember the details anymore, but for 10-GigE, I have encountered
> cases where I was able to significantly increase TCP performance by
> increasing the txqueuelen to 10000, which is the setting I now use for
> any 10-GigE testing.
For some reason this does not surprise me.
We bumped the ethernet default up to 1000 for gigabit.
^ permalink raw reply
* Re: [PATCH] do not give access to 1-1024 ports for autobinding
From: David Miller @ 2007-10-10 22:55 UTC (permalink / raw)
To: dlunev; +Cc: shemminger, den, netdev
In-Reply-To: <470D04E1.9030505@gmail.com>
From: "Denis V. Lunev" <dlunev@gmail.com>
Date: Wed, 10 Oct 2007 20:59:13 +0400
> They have sense for the case of multiple network namespaces, where root
> in the other namespace can be treated as a user to initial namespace.
This is a silly limitation to impose just for the sake of
namespaces, please don't add it.
^ permalink raw reply
* [PATCH 1/3][BNX2]: Fix remote PHY media detection problems.
From: Michael Chan @ 2007-10-11 0:01 UTC (permalink / raw)
To: davem; +Cc: netdev
[BNX2]: Fix remote PHY media detection problems.
The remote PHY media type and link status can change between
->probe() and ->open(). For correct operation, we need to get the
new status again during ->open().
The ethtool link test and loopback test are also fixed to work with
remote PHY. PHY loopback is simply skipped when remote PHY is
present.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 0e4928c..21493e0 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3776,12 +3776,6 @@ bnx2_init_remote_phy(struct bnx2 *bp)
return;
if (val & BNX2_FW_CAP_REMOTE_PHY_CAPABLE) {
- if (netif_running(bp->dev)) {
- val = BNX2_DRV_ACK_CAP_SIGNATURE |
- BNX2_FW_CAP_REMOTE_PHY_CAPABLE;
- REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_ACK_CAP_MB,
- val);
- }
bp->phy_flags |= REMOTE_PHY_CAP_FLAG;
val = REG_RD_IND(bp, bp->shmem_base + BNX2_LINK_STATUS);
@@ -3789,6 +3783,22 @@ bnx2_init_remote_phy(struct bnx2 *bp)
bp->phy_port = PORT_FIBRE;
else
bp->phy_port = PORT_TP;
+
+ if (netif_running(bp->dev)) {
+ u32 sig;
+
+ if (val & BNX2_LINK_STATUS_LINK_UP) {
+ bp->link_up = 1;
+ netif_carrier_on(bp->dev);
+ } else {
+ bp->link_up = 0;
+ netif_carrier_off(bp->dev);
+ }
+ sig = BNX2_DRV_ACK_CAP_SIGNATURE |
+ BNX2_FW_CAP_REMOTE_PHY_CAPABLE;
+ REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_ACK_CAP_MB,
+ sig);
+ }
}
}
@@ -3797,6 +3807,7 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
{
u32 val;
int i, rc = 0;
+ u8 old_port;
/* Wait for the current PCI transaction to complete before
* issuing a reset. */
@@ -3875,8 +3886,9 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
return rc;
spin_lock_bh(&bp->phy_lock);
+ old_port = bp->phy_port;
bnx2_init_remote_phy(bp);
- if (bp->phy_flags & REMOTE_PHY_CAP_FLAG)
+ if ((bp->phy_flags & REMOTE_PHY_CAP_FLAG) && old_port != bp->phy_port)
bnx2_set_default_remote_link(bp);
spin_unlock_bh(&bp->phy_lock);
@@ -4565,6 +4577,9 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
bnx2_set_mac_loopback(bp);
}
else if (loopback_mode == BNX2_PHY_LOOPBACK) {
+ if (bp->phy_flags & REMOTE_PHY_CAP_FLAG)
+ return 0;
+
bp->loopback = PHY_LOOPBACK;
bnx2_set_phy_loopback(bp);
}
@@ -4733,6 +4748,11 @@ bnx2_test_link(struct bnx2 *bp)
{
u32 bmsr;
+ if (bp->phy_flags & REMOTE_PHY_CAP_FLAG) {
+ if (bp->link_up)
+ return 0;
+ return -ENODEV;
+ }
spin_lock_bh(&bp->phy_lock);
bnx2_enable_bmsr1(bp);
bnx2_read_phy(bp, bp->mii_bmsr1, &bmsr);
^ permalink raw reply related
* [PATCH 2/3][BNX2]: Fix default WoL setting.
From: Michael Chan @ 2007-10-11 0:01 UTC (permalink / raw)
To: davem; +Cc: netdev, mann
[BNX2]: Fix default WoL setting.
Change the default WoL setting to match the NVRAM's setting. It
always defaulted to WoL disabled before and caused a lot of confusion
for users.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 21493e0..574d043 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6569,8 +6569,11 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
if (i != 2)
bp->fw_version[j++] = '.';
}
- if (REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE) &
- BNX2_PORT_FEATURE_ASF_ENABLED) {
+ reg = REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE);
+ if (reg & BNX2_PORT_FEATURE_WOL_ENABLED)
+ bp->wol = 1;
+
+ if (reg & BNX2_PORT_FEATURE_ASF_ENABLED) {
bp->flags |= ASF_ENABLE_FLAG;
for (i = 0; i < 30; i++) {
@@ -6640,11 +6643,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
bp->phy_port = PORT_TP;
if (bp->phy_flags & PHY_SERDES_FLAG) {
bp->phy_port = PORT_FIBRE;
- bp->flags |= NO_WOL_FLAG;
+ reg = REG_RD_IND(bp, bp->shmem_base +
+ BNX2_SHARED_HW_CFG_CONFIG);
+ if (!(reg & BNX2_SHARED_HW_CFG_GIG_LINK_ON_VAUX)) {
+ bp->flags |= NO_WOL_FLAG;
+ bp->wol = 0;
+ }
if (CHIP_NUM(bp) != CHIP_NUM_5706) {
bp->phy_addr = 2;
- reg = REG_RD_IND(bp, bp->shmem_base +
- BNX2_SHARED_HW_CFG_CONFIG);
if (reg & BNX2_SHARED_HW_CFG_PHY_2_5G)
bp->phy_flags |= PHY_2_5G_CAPABLE_FLAG;
}
@@ -6659,8 +6665,10 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
if ((CHIP_ID(bp) == CHIP_ID_5708_A0) ||
(CHIP_ID(bp) == CHIP_ID_5708_B0) ||
- (CHIP_ID(bp) == CHIP_ID_5708_B1))
+ (CHIP_ID(bp) == CHIP_ID_5708_B1)) {
bp->flags |= NO_WOL_FLAG;
+ bp->wol = 0;
+ }
if (CHIP_ID(bp) == CHIP_ID_5706_A0) {
bp->tx_quick_cons_trip_int =
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 56c190f..1dce0d1 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6908,6 +6908,7 @@ struct fw_info {
#define BNX2_SHARED_HW_CFG_LED_MODE_MAC 0
#define BNX2_SHARED_HW_CFG_LED_MODE_GPHY1 0x100
#define BNX2_SHARED_HW_CFG_LED_MODE_GPHY2 0x200
+#define BNX2_SHARED_HW_CFG_GIG_LINK_ON_VAUX 0x8000
#define BNX2_SHARED_HW_CFG_CONFIG2 0x00000040
#define BNX2_SHARED_HW_CFG2_NVM_SIZE_MASK 0x00fff000
^ permalink raw reply related
* [PATCH 3/3][BNX2]: Update version to 1.6.7.
From: Michael Chan @ 2007-10-11 0:02 UTC (permalink / raw)
To: davem; +Cc: netdev
[BNX2]: Update version to 1.6.7.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 574d043..bbfbdaf 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -56,8 +56,8 @@
#define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": "
-#define DRV_MODULE_VERSION "1.6.6"
-#define DRV_MODULE_RELDATE "October 2, 2007"
+#define DRV_MODULE_VERSION "1.6.7"
+#define DRV_MODULE_RELDATE "October 10, 2007"
#define RUN_AT(x) (jiffies + (x))
^ permalink raw reply related
* Re: [ofa-general] Re: [PATCH RFC] RDMA/CMA: Allocate PS_TCP ports from the host TCP port space.
From: David Miller @ 2007-10-10 23:04 UTC (permalink / raw)
To: mshefty; +Cc: netdev, rdreier, linux-kernel, general
In-Reply-To: <470D3D93.2020606@ichips.intel.com>
From: Sean Hefty <mshefty@ichips.intel.com>
Date: Wed, 10 Oct 2007 14:01:07 -0700
> > The hack to use a socket and bind it to claim the port was just for
> > demostrating the idea. The correct solution, IMO, is to enhance the
> > core low level 4-tuple allocation services to be more generic (eg: not
> > be tied to a struct sock). Then the host tcp stack and the host rdma
> > stack can allocate TCP/iWARP ports/4tuples from this common exported
> > service and share the port space. This allocation service could also be
> > used by other deep adapters like iscsi adapters if needed.
>
> Since iWarp runs on top of TCP, the port space is really the same.
> FWIW, I agree that this proposal is the correct solution to support iWarp.
But you can be sure it's not going to happen, sorry.
It would mean that we'd need to export the entire TCP socket table so
then when iWARP connections are created you can search to make sure
there is not an existing full 4-tuple that is the same.
It is not just about local TCP ports.
iWARP needs to live in it's seperate little container and not
contaminate the rest of the networking, this is the deal. Any
suggested such change which breaks that deal will be NACK'd by all of
the core networking developers.
^ permalink raw reply
* Re: [PATCH 1/3][BNX2]: Fix remote PHY media detection problems.
From: David Miller @ 2007-10-10 23:16 UTC (permalink / raw)
To: mchan; +Cc: netdev
In-Reply-To: <1192060892.6534.4.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 10 Oct 2007 17:01:32 -0700
> [BNX2]: Fix remote PHY media detection problems.
>
> The remote PHY media type and link status can change between
> ->probe() and ->open(). For correct operation, we need to get the
> new status again during ->open().
>
> The ethtool link test and loopback test are also fixed to work with
> remote PHY. PHY loopback is simply skipped when remote PHY is
> present.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/3][BNX2]: Fix default WoL setting.
From: David Miller @ 2007-10-10 23:16 UTC (permalink / raw)
To: mchan; +Cc: netdev, mann
In-Reply-To: <1192060919.6534.5.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 10 Oct 2007 17:01:59 -0700
> [BNX2]: Fix default WoL setting.
>
> Change the default WoL setting to match the NVRAM's setting. It
> always defaulted to WoL disabled before and caused a lot of confusion
> for users.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/3][BNX2]: Update version to 1.6.7.
From: David Miller @ 2007-10-10 23:17 UTC (permalink / raw)
To: mchan; +Cc: netdev
In-Reply-To: <1192060930.6534.6.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 10 Oct 2007 17:02:10 -0700
> [BNX2]: Update version to 1.6.7.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: authenc compile warnings in current net-2.6.24
From: David Miller @ 2007-10-10 23:25 UTC (permalink / raw)
To: netdev; +Cc: socketcan, herbert, netdev
In-Reply-To: <20071010195337.GA21597@Chamillionaire.breakpoint.cc>
From: Sebastian Siewior <netdev@ml.breakpoint.cc>
Date: Wed, 10 Oct 2007 21:53:37 +0200
> * Oliver Hartkopp | 2007-10-10 19:53:53 [+0200]:
>
> > CC [M] crypto/authenc.o
> > crypto/authenc.c: In function ?crypto_authenc_hash?:
> > crypto/authenc.c:88: warning: ?cryptlen? may be used uninitialized in this
> > function
> > crypto/authenc.c:87: warning: ?dst? may be used uninitialized in this
> > function
> > crypto/authenc.c: In function ?crypto_authenc_decrypt?:
> > crypto/authenc.c:163: warning: ?cryptlen? may be used uninitialized in this
> > function
> > crypto/authenc.c:163: note: ?cryptlen? was declared here
> > crypto/authenc.c:162: warning: ?src? may be used uninitialized in this
> > function
> > crypto/authenc.c:162: note: ?src? was declared here
> >
> > do you already know these warnings?
>
> Those warnings are looking like a compiler bug to me.
It's just not smart enough to see that cryptlen's initialization
and it's use in the auth_unlock label path are both protected
by 'err' being non-zero.
To be honest I don't know of any compiler which commits enough
flow variable analysis to support doing %100 accurate warnings
in situations like this.
Since the compiler is unlikely to do so, I think we should fix
it somehow because useless warnings just distract.
^ permalink raw reply
* Re: [RFC] more robust inet range checking
From: David Miller @ 2007-10-10 23:31 UTC (permalink / raw)
To: brian.haley; +Cc: shemminger, den, aarapov, netdev
In-Reply-To: <470D26E4.2050708@hp.com>
From: Brian Haley <brian.haley@hp.com>
Date: Wed, 10 Oct 2007 15:24:20 -0400
> Stephen Hemminger wrote:
> > --- a/net/ipv4/udp.c 2007-10-10 08:27:00.000000000 -0700
> > +++ b/net/ipv4/udp.c 2007-10-10 09:44:35.000000000 -0700
> > @@ -147,13 +147,13 @@ int __udp_lib_get_port(struct sock *sk,
> > write_lock_bh(&udp_hash_lock);
> >
> > if (!snum) {
> > - int i;
> > - int low = sysctl_local_port_range[0];
> > - int high = sysctl_local_port_range[1];
> > + int i, range[2];
> > unsigned rover, best, best_size_so_far;
>
> Should these be signed ints? They're the only ones that are unsigned,
> but I don't know why.
They have just been hacked inconsistently over the years,
that's the only reason these types are like that.
> > --- a/net/sctp/protocol.c 2007-10-10 08:27:00.000000000 -0700
> > +++ b/net/sctp/protocol.c 2007-10-10 09:58:21.000000000 -0700
> > @@ -1173,7 +1173,6 @@ SCTP_STATIC __init int sctp_init(void)
> > }
> >
> > spin_lock_init(&sctp_port_alloc_lock);
> > - sctp_port_rover = sysctl_local_port_range[0] - 1;
>
> I think you can remove the port_rover definition in sctp/structs.h and
> also the lock that protects it. Patch below for that which can be
> applied on-top of yours.
>
> -Brian
>
>
> Remove SCTP port_rover and port_alloc_lock as they're no longer required.
>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
I like this range checking change, someone please resubmit with
Brian's nits and this SCTP cleanup integrated on top.
I'll probably submit this to stable since it fixes the potential
divide by zero, so test whatever you post :-)
Thanks!
^ permalink raw reply
* Re: [PATCH] Evict tmp variable from the stack in ip6_evictor
From: David Miller @ 2007-10-10 23:31 UTC (permalink / raw)
To: kaber; +Cc: xemul, netdev
In-Reply-To: <470CEA5F.7050508@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 10 Oct 2007 17:06:07 +0200
> Pavel Emelyanov wrote:
> > Patrick McHardy wrote:
> >> Pavel Emelyanov wrote:
> >>> The list_head *tmp is used to help getting the first entry in
> >>> the ip6_frag_lru_list list. There is a simpler way to do it
> >>
> >> The exact same code exists in ip_fragment.c and nf_conntrack_reasm.c,
> >> please also change it there.
> >
> > Hm, indeed. But I see that the structs frag_queue in reassembly.c, ipq
> > in ip_fragment.c and nf_ct_frag6_queue in nf code looks VERY similar
> > and very much of code (like link/unlink or evict) looks the same too.
> >
> > Maybe it's worth creating something like struct skb_fragment and
> > consolidate all the common stuff into some net/core/lib_frag.c? Or
> > is there some hidden reason for keeping this code splitted?
>
> I'm not sure if its possible between IPv4 and IPv6, but sharing code
> between IPv6 reassembly and netfilter/ipv6 would be nice.
And besides I think it's an independant change to this tmp
variable removal, so let's just do that first.
^ permalink raw reply
* Re: [NET_SCHED]: Show timer resolution instead of clock resolution in /proc/net/psched
From: David Miller @ 2007-10-10 23:33 UTC (permalink / raw)
To: kaber; +Cc: netdev
In-Reply-To: <470CE2F0.20103@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 10 Oct 2007 16:34:24 +0200
> [NET_SCHED]: Show timer resolution instead of clock resolution in /proc/net/psched
>
> The fourth parameter of /proc/net/psched is supposed to show the timer resultion
> and is used by HTB userspace to calculate the necessary burst rate. Currently
> we show the clock resolution, which results in a too low burst rate when the
> two differ.
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied, thanks Patrick.
^ permalink raw reply
* Re: [RFC] more robust inet range checking
From: Stephen Hemminger @ 2007-10-10 23:33 UTC (permalink / raw)
To: David Miller; +Cc: brian.haley, den, aarapov, netdev
In-Reply-To: <20071010.163108.67884821.davem@davemloft.net>
On Wed, 10 Oct 2007 16:31:08 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Brian Haley <brian.haley@hp.com>
> Date: Wed, 10 Oct 2007 15:24:20 -0400
>
> > Stephen Hemminger wrote:
> > > --- a/net/ipv4/udp.c 2007-10-10 08:27:00.000000000 -0700
> > > +++ b/net/ipv4/udp.c 2007-10-10 09:44:35.000000000 -0700
> > > @@ -147,13 +147,13 @@ int __udp_lib_get_port(struct sock *sk,
> > > write_lock_bh(&udp_hash_lock);
> > >
> > > if (!snum) {
> > > - int i;
> > > - int low = sysctl_local_port_range[0];
> > > - int high = sysctl_local_port_range[1];
> > > + int i, range[2];
> > > unsigned rover, best, best_size_so_far;
> >
> > Should these be signed ints? They're the only ones that are unsigned,
> > but I don't know why.
>
> They have just been hacked inconsistently over the years,
> that's the only reason these types are like that.
>
> > > --- a/net/sctp/protocol.c 2007-10-10 08:27:00.000000000 -0700
> > > +++ b/net/sctp/protocol.c 2007-10-10 09:58:21.000000000 -0700
> > > @@ -1173,7 +1173,6 @@ SCTP_STATIC __init int sctp_init(void)
> > > }
> > >
> > > spin_lock_init(&sctp_port_alloc_lock);
> > > - sctp_port_rover = sysctl_local_port_range[0] - 1;
> >
> > I think you can remove the port_rover definition in sctp/structs.h and
> > also the lock that protects it. Patch below for that which can be
> > applied on-top of yours.
> >
> > -Brian
> >
> >
> > Remove SCTP port_rover and port_alloc_lock as they're no longer required.
> >
> > Signed-off-by: Brian Haley <brian.haley@hp.com>
>
> I like this range checking change, someone please resubmit with
> Brian's nits and this SCTP cleanup integrated on top.
>
> I'll probably submit this to stable since it fixes the potential
> divide by zero, so test whatever you post :-)
>
> Thanks!
I split them into two patches: 1 is the SCTP stuff, 2 is the range stuff.
Retesting tonight.
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply
* Re: [RFC] more robust inet range checking
From: David Miller @ 2007-10-10 23:34 UTC (permalink / raw)
To: shemminger; +Cc: brian.haley, den, aarapov, netdev
In-Reply-To: <20071010163347.0299dda5@freepuppy.rosehill>
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 10 Oct 2007 16:33:47 -0700
> I split them into two patches: 1 is the SCTP stuff, 2 is the range stuff.
> Retesting tonight.
Thank you.
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493
From: David Miller @ 2007-10-10 23:42 UTC (permalink / raw)
To: dlstevens; +Cc: brian.haley, netdev, netdev-owner, yoshfuji
In-Reply-To: <OFDBC968FC.CAF6E192-ON88257370.0075A79A-88257370.0077B875@us.ibm.com>
From: David Stevens <dlstevens@us.ibm.com>
Date: Wed, 10 Oct 2007 14:48:38 -0700
> But anyway, I made the comment; I think some form of it
> should go in. :-) If you like the original better, that's
> ok with me, too.
Brian, please submit a new patch or resubmit the original
one, the choice is your's :-)
^ permalink raw reply
* [PATCH 1/2] SCTP: port randomization
From: Stephen Hemminger @ 2007-10-11 0:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20071011000020.907277335@linux-foundation.org>
[-- Attachment #1: sctp-port-random.patch --]
[-- Type: text/plain, Size: 2731 bytes --]
Add port randomization rather than a simple fixed rover
for use with SCTP. This makes it act similar to TCP, UDP, DCCP
when allocating ports.
No longer need port_alloc_lock as well (suggestion by Brian Haley).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
include/net/sctp/structs.h | 2 --
net/sctp/protocol.c | 3 ---
net/sctp/socket.c | 21 +++++----------------
3 files changed, 5 insertions(+), 21 deletions(-)
--- a/include/net/sctp/structs.h 2007-10-10 08:26:57.000000000 -0700
+++ b/include/net/sctp/structs.h 2007-10-10 14:57:28.000000000 -0700
@@ -197,8 +197,6 @@ extern struct sctp_globals {
/* This is the sctp port control hash. */
int port_hashsize;
- int port_rover;
- spinlock_t port_alloc_lock; /* Protects port_rover. */
struct sctp_bind_hashbucket *port_hashtable;
/* This is the global local address list.
--- a/net/sctp/protocol.c 2007-10-10 14:51:03.000000000 -0700
+++ b/net/sctp/protocol.c 2007-10-10 14:53:13.000000000 -0700
@@ -1172,9 +1172,6 @@ SCTP_STATIC __init int sctp_init(void)
sctp_port_hashtable[i].chain = NULL;
}
- spin_lock_init(&sctp_port_alloc_lock);
- sctp_port_rover = sysctl_local_port_range[0] - 1;
-
printk(KERN_INFO "SCTP: Hash tables configured "
"(established %d bind %d)\n",
sctp_assoc_hashsize, sctp_port_hashsize);
--- a/net/sctp/socket.c 2007-10-10 14:51:03.000000000 -0700
+++ b/net/sctp/socket.c 2007-10-10 14:55:22.000000000 -0700
@@ -5314,22 +5314,13 @@ static long sctp_get_port_local(struct s
sctp_local_bh_disable();
if (snum == 0) {
- /* Search for an available port.
- *
- * 'sctp_port_rover' was the last port assigned, so
- * we start to search from 'sctp_port_rover +
- * 1'. What we do is first check if port 'rover' is
- * already in the hash table; if not, we use that; if
- * it is, we try next.
- */
- int low = sysctl_local_port_range[0];
- int high = sysctl_local_port_range[1];
- int remaining = (high - low) + 1;
- int rover;
+ /* Search for an available port. */
+ unsigned int low = sysctl_local_port_range[0];
+ unsigned int high = sysctl_local_port_range[1];
+ unsigned int remaining = (high - low) + 1;
+ unsigned int rover = net_random() % remaining + low;
int index;
- sctp_spin_lock(&sctp_port_alloc_lock);
- rover = sctp_port_rover;
do {
rover++;
if ((rover < low) || (rover > high))
@@ -5344,8 +5335,6 @@ static long sctp_get_port_local(struct s
next:
sctp_spin_unlock(&head->lock);
} while (--remaining > 0);
- sctp_port_rover = rover;
- sctp_spin_unlock(&sctp_port_alloc_lock);
/* Exhausted local port range during search? */
ret = 1;
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply
* [PATCH 2/2] ip: local port range robustness
From: Stephen Hemminger @ 2007-10-11 0:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20071011000020.907277335@linux-foundation.org>
[-- Attachment #1: port-validate.patch --]
[-- Type: text/plain, Size: 12614 bytes --]
Expansion of original idea from Denis V. Lunev <den@openvz.org>
Add robustness and locking to the local_port_range sysctl.
1. Enforce that low < high when setting.
2. Use seqlock to ensure atomic update.
The locking might seem like overkill, but there are
cases where sysadmin might want to change value in the
middle of a DoS attack.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
drivers/infiniband/core/cma.c | 22 ++++++-----
include/net/ip.h | 3 +
net/ipv4/inet_connection_sock.c | 22 +++++++++--
net/ipv4/inet_hashtables.c | 13 +++---
net/ipv4/sysctl_net_ipv4.c | 75 +++++++++++++++++++++++++++++++++++++---
net/ipv4/tcp_ipv4.c | 1
net/ipv4/udp.c | 6 +--
net/ipv6/inet6_hashtables.c | 12 +++---
net/sctp/socket.c | 11 +++--
security/selinux/hooks.c | 39 +++++++++++---------
10 files changed, 146 insertions(+), 58 deletions(-)
--- a/include/net/ip.h 2007-10-10 15:27:44.000000000 -0700
+++ b/include/net/ip.h 2007-10-10 15:27:48.000000000 -0700
@@ -171,7 +171,8 @@ extern unsigned long snmp_fold_field(voi
extern int snmp_mib_init(void *ptr[2], size_t mibsize, size_t mibalign);
extern void snmp_mib_free(void *ptr[2]);
-extern int sysctl_local_port_range[2];
+extern void inet_get_local_port_range(int *low, int *high);
+
extern int sysctl_ip_default_ttl;
extern int sysctl_ip_nonlocal_bind;
--- a/net/ipv4/inet_connection_sock.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv4/inet_connection_sock.c 2007-10-10 15:27:48.000000000 -0700
@@ -33,6 +33,19 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg);
* This array holds the first and last local port number.
*/
int sysctl_local_port_range[2] = { 32768, 61000 };
+DEFINE_SEQLOCK(sysctl_port_range_lock);
+
+void inet_get_local_port_range(int *low, int *high)
+{
+ unsigned seq;
+ do {
+ seq = read_seqbegin(&sysctl_port_range_lock);
+
+ *low = sysctl_local_port_range[0];
+ *high = sysctl_local_port_range[1];
+ } while (read_seqretry(&sysctl_port_range_lock, seq));
+}
+EXPORT_SYMBOL(inet_get_local_port_range);
int inet_csk_bind_conflict(const struct sock *sk,
const struct inet_bind_bucket *tb)
@@ -77,10 +90,11 @@ int inet_csk_get_port(struct inet_hashin
local_bh_disable();
if (!snum) {
- int low = sysctl_local_port_range[0];
- int high = sysctl_local_port_range[1];
- int remaining = (high - low) + 1;
- int rover = net_random() % (high - low) + low;
+ int remaining, rover, low, high;
+
+ inet_get_local_port_range(&low, &high);
+ remaining = high - low;
+ rover = net_random() % remaining + low;
do {
head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)];
--- a/net/ipv4/inet_hashtables.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv4/inet_hashtables.c 2007-10-10 15:27:48.000000000 -0700
@@ -279,19 +279,18 @@ int inet_hash_connect(struct inet_timewa
int ret;
if (!snum) {
- int low = sysctl_local_port_range[0];
- int high = sysctl_local_port_range[1];
- int range = high - low;
- int i;
- int port;
+ int i, remaining, low, high, port;
static u32 hint;
u32 offset = hint + inet_sk_port_offset(sk);
struct hlist_node *node;
struct inet_timewait_sock *tw = NULL;
+ inet_get_local_port_range(&low, &high);
+ remaining = high - low;
+
local_bh_disable();
- for (i = 1; i <= range; i++) {
- port = low + (i + offset) % range;
+ for (i = 1; i <= remaining; i++) {
+ port = low + (i + offset) % remaining;
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];
spin_lock(&head->lock);
--- a/net/ipv4/sysctl_net_ipv4.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv4/sysctl_net_ipv4.c 2007-10-10 16:53:16.000000000 -0700
@@ -12,6 +12,7 @@
#include <linux/sysctl.h>
#include <linux/igmp.h>
#include <linux/inetdevice.h>
+#include <linux/seqlock.h>
#include <net/snmp.h>
#include <net/icmp.h>
#include <net/ip.h>
@@ -89,6 +90,74 @@ static int ipv4_sysctl_forward_strategy(
return 1;
}
+extern seqlock_t sysctl_port_range_lock;
+extern int sysctl_local_port_range[2];
+
+/* Update system visible IP port range */
+static void set_local_port_range(int range[2])
+{
+ write_seqlock(&sysctl_port_range_lock);
+ sysctl_local_port_range[0] = range[0];
+ sysctl_local_port_range[1] = range[1];
+ write_sequnlock(&sysctl_port_range_lock);
+}
+
+/* Validate changes from /proc interface. */
+static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp,
+ void __user *buffer,
+ size_t *lenp, loff_t *ppos)
+{
+ int ret;
+ int range[2] = { sysctl_local_port_range[0],
+ sysctl_local_port_range[1] };
+ ctl_table tmp = {
+ .data = &range,
+ .maxlen = sizeof(range),
+ .mode = table->mode,
+ .extra1 = &ip_local_port_range_min,
+ .extra2 = &ip_local_port_range_max,
+ };
+
+ ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos);
+
+ if (write && ret == 0) {
+ if (range[1] <= range[0])
+ ret = -EINVAL;
+ else
+ set_local_port_range(range);
+ }
+
+ return ret;
+}
+
+/* Validate changes from sysctl interface. */
+static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name,
+ int nlen, void __user *oldval,
+ size_t __user *oldlenp,
+ void __user *newval, size_t newlen)
+{
+ int ret;
+ int range[2] = { sysctl_local_port_range[0],
+ sysctl_local_port_range[1] };
+ ctl_table tmp = {
+ .data = &range,
+ .maxlen = sizeof(range),
+ .mode = table->mode,
+ .extra1 = &ip_local_port_range_min,
+ .extra2 = &ip_local_port_range_max,
+ };
+
+ ret = sysctl_intvec(&tmp, name, nlen, oldval, oldlenp, newval, newlen);
+ if (ret == 0 && newval && newlen) {
+ if (range[1] <= range[0])
+ ret = -EINVAL;
+ else
+ set_local_port_range(range);
+ }
+ return ret;
+}
+
+
static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -427,10 +496,8 @@ ctl_table ipv4_table[] = {
.data = &sysctl_local_port_range,
.maxlen = sizeof(sysctl_local_port_range),
.mode = 0644,
- .proc_handler = &proc_dointvec_minmax,
- .strategy = &sysctl_intvec,
- .extra1 = ip_local_port_range_min,
- .extra2 = ip_local_port_range_max
+ .proc_handler = &ipv4_local_port_range,
+ .strategy = &ipv4_sysctl_local_port_range,
},
{
.ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL,
--- a/net/ipv4/tcp_ipv4.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv4/tcp_ipv4.c 2007-10-10 15:27:48.000000000 -0700
@@ -2470,6 +2470,5 @@ EXPORT_SYMBOL(tcp_v4_syn_recv_sock);
EXPORT_SYMBOL(tcp_proc_register);
EXPORT_SYMBOL(tcp_proc_unregister);
#endif
-EXPORT_SYMBOL(sysctl_local_port_range);
EXPORT_SYMBOL(sysctl_tcp_low_latency);
--- a/net/ipv4/udp.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv4/udp.c 2007-10-10 16:56:16.000000000 -0700
@@ -147,11 +147,11 @@ int __udp_lib_get_port(struct sock *sk,
write_lock_bh(&udp_hash_lock);
if (!snum) {
- int i;
- int low = sysctl_local_port_range[0];
- int high = sysctl_local_port_range[1];
+ int i, low, high;
unsigned rover, best, best_size_so_far;
+ inet_get_local_port_range(&low, &high);
+
best_size_so_far = UINT_MAX;
best = rover = net_random() % (high - low) + low;
--- a/net/ipv6/inet6_hashtables.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/ipv6/inet6_hashtables.c 2007-10-10 15:27:48.000000000 -0700
@@ -254,18 +254,18 @@ int inet6_hash_connect(struct inet_timew
int ret;
if (snum == 0) {
- const int low = sysctl_local_port_range[0];
- const int high = sysctl_local_port_range[1];
- const int range = high - low;
- int i, port;
+ int i, port, low, high, remaining;
static u32 hint;
const u32 offset = hint + inet6_sk_port_offset(sk);
struct hlist_node *node;
struct inet_timewait_sock *tw = NULL;
+ inet_get_local_port_range(&low, &high);
+ remaining = high - low;
+
local_bh_disable();
- for (i = 1; i <= range; i++) {
- port = low + (i + offset) % range;
+ for (i = 1; i <= remaining; i++) {
+ port = low + (i + offset) % remaining;
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];
spin_lock(&head->lock);
--- a/security/selinux/hooks.c 2007-10-10 15:27:44.000000000 -0700
+++ b/security/selinux/hooks.c 2007-10-10 15:27:48.000000000 -0700
@@ -47,7 +47,7 @@
#include <linux/netfilter_ipv6.h>
#include <linux/tty.h>
#include <net/icmp.h>
-#include <net/ip.h> /* for sysctl_local_port_range[] */
+#include <net/ip.h> /* for local_port_range[] */
#include <net/tcp.h> /* struct or_callable used in sock_rcv_skb */
#include <asm/uaccess.h>
#include <asm/ioctls.h>
@@ -3232,8 +3232,6 @@ static int selinux_socket_post_create(st
/* Range of port numbers used to automatically bind.
Need to determine whether we should perform a name_bind
permission check between the socket and the port number. */
-#define ip_local_port_range_0 sysctl_local_port_range[0]
-#define ip_local_port_range_1 sysctl_local_port_range[1]
static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, int addrlen)
{
@@ -3276,20 +3274,27 @@ static int selinux_socket_bind(struct so
addrp = (char *)&addr6->sin6_addr.s6_addr;
}
- if (snum&&(snum < max(PROT_SOCK,ip_local_port_range_0) ||
- snum > ip_local_port_range_1)) {
- err = security_port_sid(sk->sk_family, sk->sk_type,
- sk->sk_protocol, snum, &sid);
- if (err)
- goto out;
- AVC_AUDIT_DATA_INIT(&ad,NET);
- ad.u.net.sport = htons(snum);
- ad.u.net.family = family;
- err = avc_has_perm(isec->sid, sid,
- isec->sclass,
- SOCKET__NAME_BIND, &ad);
- if (err)
- goto out;
+ if (snum) {
+ int low, high;
+
+ inet_get_local_port_range(&low, &high);
+
+ if (snum < max(PROT_SOCK, low) || snum > high) {
+ err = security_port_sid(sk->sk_family,
+ sk->sk_type,
+ sk->sk_protocol, snum,
+ &sid);
+ if (err)
+ goto out;
+ AVC_AUDIT_DATA_INIT(&ad,NET);
+ ad.u.net.sport = htons(snum);
+ ad.u.net.family = family;
+ err = avc_has_perm(isec->sid, sid,
+ isec->sclass,
+ SOCKET__NAME_BIND, &ad);
+ if (err)
+ goto out;
+ }
}
switch(isec->sclass) {
--- a/drivers/infiniband/core/cma.c 2007-10-10 15:27:44.000000000 -0700
+++ b/drivers/infiniband/core/cma.c 2007-10-10 15:27:48.000000000 -0700
@@ -1866,13 +1866,14 @@ err1:
static int cma_alloc_any_port(struct idr *ps, struct rdma_id_private *id_priv)
{
struct rdma_bind_list *bind_list;
- int port, ret;
+ int port, ret, low, high;
bind_list = kzalloc(sizeof *bind_list, GFP_KERNEL);
if (!bind_list)
return -ENOMEM;
retry:
+ /* FIXME: add proper port randomization per like inet_csk_get_port */
do {
ret = idr_get_new_above(ps, bind_list, next_port, &port);
} while ((ret == -EAGAIN) && idr_pre_get(ps, GFP_KERNEL));
@@ -1880,18 +1881,19 @@ retry:
if (ret)
goto err1;
- if (port > sysctl_local_port_range[1]) {
- if (next_port != sysctl_local_port_range[0]) {
+ inet_get_local_port_range(&low, &high);
+ if (port > high) {
+ if (next_port != low) {
idr_remove(ps, port);
- next_port = sysctl_local_port_range[0];
+ next_port = low;
goto retry;
}
ret = -EADDRNOTAVAIL;
goto err2;
}
- if (port == sysctl_local_port_range[1])
- next_port = sysctl_local_port_range[0];
+ if (port == high)
+ next_port = low;
else
next_port = port + 1;
@@ -2769,12 +2771,12 @@ static void cma_remove_one(struct ib_dev
static int cma_init(void)
{
- int ret;
+ int ret, low, high;
get_random_bytes(&next_port, sizeof next_port);
- next_port = ((unsigned int) next_port %
- (sysctl_local_port_range[1] - sysctl_local_port_range[0])) +
- sysctl_local_port_range[0];
+ inet_get_local_port_range(&low, &high);
+ next_port = ((unsigned int) next_port % (high - low)) + low;
+
cma_wq = create_singlethread_workqueue("rdma_cm");
if (!cma_wq)
return -ENOMEM;
--- a/net/sctp/socket.c 2007-10-10 15:27:44.000000000 -0700
+++ b/net/sctp/socket.c 2007-10-10 15:27:48.000000000 -0700
@@ -5315,11 +5315,12 @@ static long sctp_get_port_local(struct s
if (snum == 0) {
/* Search for an available port. */
- unsigned int low = sysctl_local_port_range[0];
- unsigned int high = sysctl_local_port_range[1];
- unsigned int remaining = (high - low) + 1;
- unsigned int rover = net_random() % remaining + low;
- int index;
+ int low, high, remaining, index;
+ unsigned int rover;
+
+ inet_get_local_port_range(&low, &high);
+ remaining = (high - low) + 1;
+ rover = net_random() % remaining + low;
do {
rover++;
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-10-11 0:33 UTC (permalink / raw)
To: davem; +Cc: dlstevens, brian.haley, netdev, yoshfuji
In-Reply-To: <20071010.164256.59470114.davem@davemloft.net>
In article <20071010.164256.59470114.davem@davemloft.net> (at Wed, 10 Oct 2007 16:42:56 -0700 (PDT)), David Miller <davem@davemloft.net> says:
> From: David Stevens <dlstevens@us.ibm.com>
> Date: Wed, 10 Oct 2007 14:48:38 -0700
>
> > But anyway, I made the comment; I think some form of it
> > should go in. :-) If you like the original better, that's
> > ok with me, too.
>
> Brian, please submit a new patch or resubmit the original
> one, the choice is your's :-)
I agree, too. :-)
--yoshfuji
^ permalink raw reply
* Re: e100 problems in .23rc8 ?
From: Dave Jones @ 2007-10-11 0:36 UTC (permalink / raw)
To: Herbert Xu; +Cc: Kok, Auke, netdev, esandeen, dmack
In-Reply-To: <E1IanKN-0003ju-00@gondolin.me.apana.org.au>
On Thu, Sep 27, 2007 at 02:58:27PM +0800, Herbert Xu wrote:
> Kok, Auke <auke-jan.h.kok@intel.com> wrote:
> > Dave Jones wrote:
> >> Last night, I hit this bug during boot up..
> >> http://www.codemonkey.org.uk/junk/e100-2.jpg
> >>
> >> This morning, I got a mail from a Fedora user of the same
> >> .23-rc8 based kernel that has seen a different trace
> >> also implicating e100..
> >>
> >> http://www.codemonkey.org.uk/junk/e100.jpg
> >>
> >> It may be that the two problems are unrelated, and it's
> >> just coincidence that both reports happen to be on an e100,
> >> but the timing is odd. Have there been other reports
> >> of similar problems recently ?
> >
> > there hasn't been a change to e100 in two months now - perhaps something slipped
> > into the stack that broke it? If this reproduces, could you bisect?
So I looked into this some more, after it reared its head again.
The problem with bisecting it is that it doesn't happen on every
boot, so it's difficult to determine the good/bad state.
I've never managed to reproduce it on 2.6.22 however.
> Well this looks exactly like the e1000 race that we fixed around
> the time of the last kernel release. That fix never made it into
> e100 so it's no surprise that we get a similar crash here.
We're starting to see more reports of this from Fedora users
now that 2.6.23 is final. Once we push that as an update
for Fedora 7 users, it's likely we'll see even more.
(likewise for the soon-to-be released F8, based on 2.6.23)
The e1000 changes you reference above, is this the changeset you mean?
commit 416b5d10afdc797c21c457ade3714e8f2f75edd9
Author: Auke Kok <auke-jan.h.kok@intel.com>
Date: Fri Jun 1 10:22:39 2007 -0700
e1000: disable polling before registering netdevice
> The problem is that if a spurious interrupt comes in between
> request_irq and netif_poll_enable then you'll get a crash at
> the next netif_rx_complete.
>
> It'd be good if this were reproducible as it would allow us
> to identify the source of the spurious interrupt, which may
> well be caused by an unrelated bug somewhere else.
>
> In any case, e100 should be prepared to deal with spurious
> interrupts as e1000 has been fixed to do.
Adding some of the other reporters of this bug to Cc,
in case they've found this more reproducable than myself
(maybe they'll have more luck bisecting).
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply
* net-2.6.24 --> net-2.6
From: David Miller @ 2007-10-11 0:43 UTC (permalink / raw)
To: netdev; +Cc: akpm
In preparation for a merge with Linus I've moved the net-2.6.24
over to net-2.6 and did one last rebase with linux-2.6.23
Please do not reference the net-2.6.24 tree any longer, for reference
it sits in my directory as bak-net-2.6.24.git
Just FYI.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox