* Re: [PATCH 2/2] X25: Dont let x25_bind use addresses containing characters
From: David Miller @ 2010-02-16 5:55 UTC (permalink / raw)
To: andrew.hendry; +Cc: netdev, linux-kernel
In-Reply-To: <1266148845.4731.45.camel@ibex>
From: Andrew Hendry <andrew.hendry@gmail.com>
Date: Sun, 14 Feb 2010 23:00:45 +1100
> Addresses should be all digits.
> Stops x25_bind using addresses containing characters.
>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] ethtool: reduce stack usage
From: David Miller @ 2010-02-16 5:55 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1266243840.8262.14.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 15 Feb 2010 15:24:00 +0100
> dev_ethtool() is currently using 604 bytes of stack, even with gcc-4.4.2
>
> objdump -d vmlinux | scripts/checkstack.pl
> ...
> 0xc04bbc33 dev_ethtool [vmlinux]: 604
> ...
> Adding noinline attributes to selected functions can reduce stack usage.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH 1/2] X25: Fix x25_create errors for bad protocol and ENOBUFS
From: David Miller @ 2010-02-16 5:55 UTC (permalink / raw)
To: andrew.hendry; +Cc: netdev, linux-kernel
In-Reply-To: <1266148811.4731.43.camel@ibex>
From: Andrew Hendry <andrew.hendry@gmail.com>
Date: Sun, 14 Feb 2010 23:00:11 +1100
> alloc_socket failures should return -ENOBUFS
> a bad protocol should return -EINVAL
>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH]xfrm: Flushing empty SPD generates false events
From: David Miller @ 2010-02-16 5:54 UTC (permalink / raw)
To: hadi; +Cc: herbert, netdev
In-Reply-To: <1265885593.3988.6.camel@bigi>
From: jamal <hadi@cyberus.ca>
Date: Thu, 11 Feb 2010 05:53:13 -0500
> xfrm: Flushing empty SPD generates false events
>
> To see the effect make sure you have an empty SPD.
> On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
> You get prompt back in window1 and you see the flush event on window2.
> With this fix, you still get prompt on window1 but no event on window2.
>
> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Applied to net-next-2.6
^ permalink raw reply
* Re: [PATCH]xfrm: Flushing empty SAD generates false events
From: David Miller @ 2010-02-16 5:54 UTC (permalink / raw)
To: hadi; +Cc: herbert, netdev
In-Reply-To: <1265881887.3988.4.camel@bigi>
From: jamal <hadi@cyberus.ca>
Date: Thu, 11 Feb 2010 04:51:27 -0500
> xfrm: Flushing empty SAD generates false events
>
> To see the effect make sure you have an empty SAD.
> On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
> You get prompt back in window1 and you see the flush event on window2.
> With this fix, you still get prompt on window1 but no event on window2.
>
> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Applied to net-next-2.6
^ permalink raw reply
* Re: [PATCH]IPv6: Delete redundant counter of IPSTATS_MIB_REASMFAILS
From: David Miller @ 2010-02-16 5:54 UTC (permalink / raw)
To: shanwei
Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, eric.dumazet, adobriyan,
opurdila, yanghy, netdev
In-Reply-To: <4B73D81D.1000601@cn.fujitsu.com>
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Thu, 11 Feb 2010 18:12:45 +0800
>
> When no more memory can be allocated, fq_find() will return NULL and
> increase the value of IPSTATS_MIB_REASMFAILS. In this case,
> ipv6_frag_rcv() also increase the value of IPSTATS_MIB_REASMFAILS.
>
> So, the patch deletes redundant counter of IPSTATS_MIB_REASMFAILS in fq_find().
> and deletes the unused parameter of idev.
>
>
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [PATCH v2] net/macvtap: fix reference counting
From: David Miller @ 2010-02-16 5:53 UTC (permalink / raw)
To: sri; +Cc: arnd, kaber, eswierk, netdev
In-Reply-To: <1265922577.28768.6.camel@w-sridhar.beaverton.ibm.com>
From: Sridhar Samudrala <sri@us.ibm.com>
Date: Thu, 11 Feb 2010 13:09:37 -0800
> On Thu, 2010-02-11 at 16:55 +0100, Arnd Bergmann wrote:
>> The RCU usage in the original code was broken because
>> there are cases where we possibly sleep with rcu_read_lock
>> held. As a fix, change the macvtap_file_get_queue to
>> get a reference on the socket and the netdev instead of
>> taking the full rcu_read_lock.
>>
>> Also, change macvtap_file_get_queue failure case to
>> not require a subsequent macvtap_file_put_queue, as
>> pointed out by Ed Swierk.
>
> Looks good.
>
> Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH] [V5] net: emaclite: adding MDIO and phy lib support
From: David Miller @ 2010-02-16 5:53 UTC (permalink / raw)
To: grant.likely
Cc: john.linn, netdev, linuxppc-dev, jgarzik, jwboyer, john.williams,
Sadanand.Mutyala
In-Reply-To: <fa686aa41002111440x699b6b1ck97b14002ee9fe7b1@mail.gmail.com>
From: Grant Likely <grant.likely@secretlab.ca>
Date: Thu, 11 Feb 2010 15:40:24 -0700
> On Thu, Feb 11, 2010 at 3:12 PM, John Linn <john.linn@xilinx.com> wrote:
>> These changes add MDIO and phy lib support to the driver as the
>> IP core now supports the MDIO bus.
>>
>> The MDIO bus and phy are added as a child to the emaclite in the device
>> tree as illustrated below.
>>
>> mdio {
>> #address-cells = <1>;
>> #size-cells = <0>;
>> phy0: phy@7 {
>> compatible = "marvell,88e1111";
>> reg = <7>;
>> } ;
>> }
>>
>> Signed-off-by: Sadanand Mutyala <Sadanand.Mutyala@xilinx.com>
>> Signed-off-by: John Linn <john.linn@xilinx.com>
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 1/2] cxgb3: FIx VLAN over Jumbo frames
From: David Miller @ 2010-02-16 5:53 UTC (permalink / raw)
To: divy; +Cc: netdev, linux-kernel, swise
In-Reply-To: <20100213194429.27297.99280.stgit@speedy5.asicdesigners.com>
From: Divy Le Ray <divy@chelsio.com>
Date: Sat, 13 Feb 2010 11:44:30 -0800
> From: Divy Le Ray <divy@chelsio.com>
>
> The mac is expected to auto-inflate the Maximum Frame size for VLAN
> tagged frames. It however does not work with jumbo frames.
> Work around the bug adding 4 to the Maximum Frame for MTUs
> greater than 1536.
>
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 2/2] cxgb3: fix link flap
From: David Miller @ 2010-02-16 5:53 UTC (permalink / raw)
To: divy; +Cc: netdev, linux-kernel, swise
In-Reply-To: <20100213194435.27297.79287.stgit@speedy5.asicdesigners.com>
From: Divy Le Ray <divy@chelsio.com>
Date: Sat, 13 Feb 2010 11:44:35 -0800
> From: Divy Le Ray <divy@chelsio.com>
>
> The driver is expected to report that the link is up
> when the phy Rx signal is established and the mac
> has not detected a link fault.
> The code is however broken, the driver does not check the link fault
> status when the phy link status changes.
> The link fault status being checked within a short period of time,
> it leads to link up/link down events.
>
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH 3/3] ixgbe: Cleanup incorrect header comments
From: David Miller @ 2010-02-16 5:52 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr
In-Reply-To: <20100212234843.2346.93249.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Feb 2010 15:48:44 -0800
> From: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>
>
> The recent n-tuple patches added some comments to the headers
> of the Flow Director functions that aren't accurate. This
> cleans them up, and is a purely cosmetic patch.
>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH 2/3] ethtool: Move n-tuple capability check into set_flags
From: David Miller @ 2010-02-16 5:52 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr
In-Reply-To: <20100212234823.2346.32285.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Feb 2010 15:48:25 -0800
> From: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>
>
> set_flags should check if the underlying device supports
> n-tuple filter programming before setting the device flags
> on the netdevice.
>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH 1/3] ethtool: Fix filter addition when caching n-tuple filters
From: David Miller @ 2010-02-16 5:52 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr
In-Reply-To: <20100212234715.2346.60380.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Feb 2010 15:48:05 -0800
> From: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>
>
> We can allow a filter to be added successfully to the underlying
> hardware, but still return an error if the cached list memory
> allocation fails. This patch fixes that condition.
>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-2.6 PATCH 2/2] ixgbe: fix WOL register setup for 82599
From: David Miller @ 2010-02-16 5:52 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore
In-Reply-To: <20100211141407.25672.80739.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 11 Feb 2010 06:14:08 -0800
> From: Don Skidmore <donald.c.skidmore@intel.com>
>
> We need to have the WUS register set to all 1's in order for the hardware
> to be capable of ever waking up. Set it here in the ixgbe_probe().
>
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-2.6 PATCH 1/2] ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata
From: David Miller @ 2010-02-16 5:52 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore
In-Reply-To: <20100211141319.25672.3041.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 11 Feb 2010 06:13:49 -0800
> From: Don Skidmore <donald.c.skidmore@intel.com>
>
> The 82598 has an erratum that receipt of pause frames at 1G
> could lead to a Tx Hang. To avoid this this patch disables
> Rx FC while at 1G speed for all 82598 parts.
>
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* [PATCH -next 1/6] bnx2: Check BNX2_FLAG_USING_MSIX flag when setting up MSIX.
From: Michael Chan @ 2010-02-16 5:42 UTC (permalink / raw)
To: davem; +Cc: netdev
Checking the flag is more correct than checking bp->irq_nvecs. By
accident it is not a problem because we always have more than 1
vectors when using MSIX mode.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index c7f5515..48bc578 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4940,7 +4940,7 @@ bnx2_init_chip(struct bnx2 *bp)
BNX2_HC_CONFIG_COLLECT_STATS;
}
- if (bp->irq_nvecs > 1) {
+ if (bp->flags & BNX2_FLAG_USING_MSIX) {
REG_WR(bp, BNX2_HC_MSIX_BIT_VECTOR,
BNX2_HC_MSIX_BIT_VECTOR_VAL);
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH -next 2/6] bnx2: Need to call cnic_setup_cnic_irq_info() after MTU change.
From: Michael Chan @ 2010-02-16 5:42 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1266298932-28129-1-git-send-email-mchan@broadcom.com>
New status blocks are allocated during MTU change so we need to
update this information for the cnic driver.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 48bc578..063f283 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7141,6 +7141,13 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx)
dev_close(bp->dev);
return rc;
}
+#ifdef BCM_CNIC
+ mutex_lock(&bp->cnic_lock);
+ /* Let cnic know about the new status block. */
+ if (bp->cnic_eth_dev.drv_state & CNIC_DRV_STATE_REGD)
+ bnx2_setup_cnic_irq_info(bp);
+ mutex_unlock(&bp->cnic_lock);
+#endif
bnx2_netif_start(bp);
}
return 0;
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH -next 5/6] bnx2: Fix bug when saving statistics.
From: Michael Chan @ 2010-02-16 5:42 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1266298932-28129-4-git-send-email-mchan@broadcom.com>
From: Patrick Rabau <pr2345@gmail.com>
This fixes the problem of dropping the carry when adding 2 32-bit values.
Switch to use array indexing for better readability.
Reported by and fix provided by Patrick Rabau.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 2c75fd7..dda815a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6555,16 +6555,16 @@ bnx2_save_stats(struct bnx2 *bp)
u32 hi;
u64 lo;
- hi = *(temp_stats + i) + *(hw_stats + i);
- lo = *(temp_stats + i + 1) + *(hw_stats + i + 1);
+ hi = temp_stats[i] + hw_stats[i];
+ lo = (u64) temp_stats[i + 1] + (u64) hw_stats[i + 1];
if (lo > 0xffffffff)
hi++;
- *(temp_stats + i) = hi;
- *(temp_stats + i + 1) = lo & 0xffffffff;
+ temp_stats[i] = hi;
+ temp_stats[i + 1] = lo & 0xffffffff;
}
for ( ; i < sizeof(struct statistics_block) / 4; i++)
- *(temp_stats + i) = *(temp_stats + i) + *(hw_stats + i);
+ temp_stats[i] += hw_stats[i];
}
#define GET_64BIT_NET_STATS64(ctr) \
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH -next 4/6] bnx2: Allow user-specified multiple advertisement speed values.
From: Michael Chan @ 2010-02-16 5:42 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1266298932-28129-3-git-send-email-mchan@broadcom.com>
Remove unnecessary code that works around older versions of ethtool
that can pass down invalid advertisement speed values. This old
code prevents the user from specifying multiple advertisement values.
The new code uses simple masking to mask out invalid advertisment bits.
Reported-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 33 ++++++++-------------------------
1 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 54d43d8..2c75fd7 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6751,32 +6751,15 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
if (cmd->autoneg == AUTONEG_ENABLE) {
autoneg |= AUTONEG_SPEED;
- cmd->advertising &= ETHTOOL_ALL_COPPER_SPEED;
-
- /* allow advertising 1 speed */
- if ((cmd->advertising == ADVERTISED_10baseT_Half) ||
- (cmd->advertising == ADVERTISED_10baseT_Full) ||
- (cmd->advertising == ADVERTISED_100baseT_Half) ||
- (cmd->advertising == ADVERTISED_100baseT_Full)) {
-
- if (cmd->port == PORT_FIBRE)
- goto err_out_unlock;
-
- advertising = cmd->advertising;
-
- } else if (cmd->advertising == ADVERTISED_2500baseX_Full) {
- if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) ||
- (cmd->port == PORT_TP))
- goto err_out_unlock;
- } else if (cmd->advertising == ADVERTISED_1000baseT_Full)
- advertising = cmd->advertising;
- else if (cmd->advertising == ADVERTISED_1000baseT_Half)
- goto err_out_unlock;
- else {
- if (cmd->port == PORT_FIBRE)
- advertising = ETHTOOL_ALL_FIBRE_SPEED;
- else
+ advertising = cmd->advertising;
+ if (cmd->port == PORT_TP) {
+ advertising &= ETHTOOL_ALL_COPPER_SPEED;
+ if (!advertising)
advertising = ETHTOOL_ALL_COPPER_SPEED;
+ } else {
+ advertising &= ETHTOOL_ALL_FIBRE_SPEED;
+ if (!advertising)
+ advertising = ETHTOOL_ALL_FIBRE_SPEED;
}
advertising |= ADVERTISED_Autoneg;
}
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH -next 3/6] bnx2: Adjust flow control water marks.
From: Michael Chan @ 2010-02-16 5:42 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1266298932-28129-2-git-send-email-mchan@broadcom.com>
The current water marks are too high and can cause unnecessary flow
control frames.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 2 +-
drivers/net/bnx2.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 063f283..54d43d8 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1277,7 +1277,7 @@ bnx2_init_rx_context(struct bnx2 *bp, u32 cid)
if (lo_water >= bp->rx_ring_size)
lo_water = 0;
- hi_water = bp->rx_ring_size / 4;
+ hi_water = min_t(int, bp->rx_ring_size / 4, lo_water + 16);
if (hi_water <= lo_water)
lo_water = 0;
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index b860fbb..cd4b0e4 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -349,7 +349,7 @@ struct l2_fhdr {
#define BNX2_L2CTX_BD_PRE_READ 0x00000000
#define BNX2_L2CTX_CTX_SIZE 0x00000000
#define BNX2_L2CTX_CTX_TYPE 0x00000000
-#define BNX2_L2CTX_LO_WATER_MARK_DEFAULT 32
+#define BNX2_L2CTX_LO_WATER_MARK_DEFAULT 4
#define BNX2_L2CTX_LO_WATER_MARK_SCALE 4
#define BNX2_L2CTX_LO_WATER_MARK_DIS 0
#define BNX2_L2CTX_HI_WATER_MARK_SHIFT 4
--
1.6.4.GIT
^ permalink raw reply related
* Re: [PATCH] ipcomp: double free at ipcomp_destroy()
From: Herbert Xu @ 2010-02-16 5:29 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev
In-Reply-To: <20100215155049.GA4905@x200>
On Mon, Feb 15, 2010 at 05:50:49PM +0200, Alexey Dobriyan wrote:
>
> Then checks for NULL ->tunnel, and NULL ->data should be removed.
> In fact, I don't quite understand why destruction was done this way,
> so simply cleared ->data pointer.
I had a look and I don't think we can do that (unless I misunderstood
what you meant).
The NULL ipcd check in ipcomp_destroy is to handle the case where
ipcomp_init_state fails before it even gets to allocating ipcd.
While the NULL tunnel check in xfrm_state_delete_tunnel is for the
case where we failed before successfully attaching a tunnel.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [PATCH] ipcomp: double free at ipcomp_destroy()
From: Herbert Xu @ 2010-02-16 5:24 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev
In-Reply-To: <20100215172810.GC4905@x200>
On Mon, Feb 15, 2010 at 07:28:10PM +0200, Alexey Dobriyan wrote:
>
> OK, it survives beating here.
Thanks a lot for testing! I'll do the clean-up you suggested in
another patch. Let's get this fixed first.
ipcomp: Avoid duplicate calls to ipcomp_destroy
When ipcomp_tunnel_attach fails we will call ipcomp_destroy twice.
This may lead to double-frees on certain structures.
As there is no reason to explicitly call ipcomp_destroy, this patch
removes it from ipcomp*.c and lets the standard xfrm_state destruction
take place.
This is based on the discovery and patch by Alexey Dobriyan.
Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 38fbf04..544ce08 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x)
if (x->props.mode == XFRM_MODE_TUNNEL) {
err = ipcomp_tunnel_attach(x);
if (err)
- goto error_tunnel;
+ goto out;
}
err = 0;
out:
return err;
-
-error_tunnel:
- ipcomp_destroy(x);
- goto out;
}
static const struct xfrm_type ipcomp_type = {
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 2f2a5ca..002e6ee 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x)
if (x->props.mode == XFRM_MODE_TUNNEL) {
err = ipcomp6_tunnel_attach(x);
if (err)
- goto error_tunnel;
+ goto out;
}
err = 0;
out:
return err;
-error_tunnel:
- ipcomp_destroy(x);
-
- goto out;
}
static const struct xfrm_type ipcomp6_type =
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related
* Re: [PATCH v2 00/41] CAPI: Major rework, tons of bug fixes
From: David Miller @ 2010-02-16 4:09 UTC (permalink / raw)
To: isdn
Cc: jan.kiszka, linux-kernel, i4ldeveloper, isdn4linux, netdev, alan,
marcel
In-Reply-To: <201002091354.23389.isdn@linux-pingi.de>
From: Karsten Keil <isdn@linux-pingi.de>
Date: Tue, 9 Feb 2010 13:54:23 +0100
> Thank you for that effort, it looks very good for me.
>
> I will acknowlegde them, after a few tests.
It's been more than a week later, will you be able to
ever find time to do this "ACK"?
^ permalink raw reply
* linux-next: manual merge of the trivial tree with the net tree
From: Stephen Rothwell @ 2010-02-16 3:50 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-next, linux-kernel, Joe Perches, David Miller, netdev,
Daniel Mack
Hi Jiri,
Today's linux-next merge of the trivial tree got a conflicts in
drivers/net/qlge/qlge_ethtool.c and drivers/net/qlge/qlge_main.c between
commit ae9540f75d5a69e7604cc5391cc0726b3aa82ff6 ("drivers/net/qlge: Use
netif_printk helpers") from the net tree and commit
3ad2f3fbb961429d2aa627465ae4829758bc7e07 ("tree-wide: Assorted spelling
fixes") from the trivial tree.
I fixed them up (see below) and can carry the fixes as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/qlge/qlge_ethtool.c
index 4f26afe,b8d21ab..0000000
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@@ -404,9 -401,9 +404,9 @@@ static int ql_set_wol(struct net_devic
if (!qdev->wol) {
u32 wol = 0;
status = ql_mb_wol_mode(qdev, wol);
- QPRINTK(qdev, DRV, ERR, "WOL %s (wol code 0x%x) on %s\n",
- (status == 0) ? "cleared successfully" : "clear failed",
- wol, qdev->ndev->name);
+ netif_err(qdev, drv, qdev->ndev, "WOL %s (wol code 0x%x)\n",
- status == 0 ? "cleared sucessfully" : "clear failed",
++ status == 0 ? "cleared successfully" : "clear failed",
+ wol);
}
return 0;
diff --cc drivers/net/qlge/qlge_main.c
index 2c052ca,a35845b..0000000
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@@ -3863,10 -3516,9 +3863,10 @@@ int ql_wol(struct ql_adapter *qdev
if (qdev->wol) {
wol |= MB_WOL_MODE_ON;
status = ql_mb_wol_mode(qdev, wol);
- QPRINTK(qdev, DRV, ERR, "WOL %s (wol code 0x%x) on %s\n",
- (status == 0) ? "Successfully set" : "Failed", wol,
- qdev->ndev->name);
+ netif_err(qdev, drv, qdev->ndev,
+ "WOL %s (wol code 0x%x) on %s\n",
- (status == 0) ? "Sucessfully set" : "Failed",
++ (status == 0) ? "Successfully set" : "Failed",
+ wol, qdev->ndev->name);
}
return status;
^ permalink raw reply
* Re: [PATCH -mm] ssb: open-code dma_alloc_coherent
From: FUJITA Tomonori @ 2010-02-16 2:05 UTC (permalink / raw)
To: Larry.Finger
Cc: fujita.tomonori, linux-kernel, netdev, mb, davem, stefano.brivio,
akpm
In-Reply-To: <4B79E251.3020005@lwfinger.net>
On Mon, 15 Feb 2010 18:09:53 -0600
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 02/15/2010 01:25 AM, FUJITA Tomonori wrote:
> > 2.6.33-rc8:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git pending
> >
> > The ssb patch depends on the latest eight patches in the tree:
> >
> > http://marc.info/?l=linux-kernel&m=126596737604808&w=2
>
> The DMA changes work on i386 architecture with wireless devices in Cardbus (PCI)
> format. Both b43legacy and b43 were tested.
Great, thanks a lot!
I've posted the second version:
http://marc.info/?l=linux-kernel&m=126624677226865&w=2
It's also available via the git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git pending
Can I get your ack on b43 stuff?
Thanks,
^ 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