* [PATCH net] ipv6: stop sending PTB packets for MTU < 1280
From: Hagen Paul Pfeifer @ 2015-01-15 21:34 UTC (permalink / raw)
To: netdev; +Cc: Hannes Frederic Sowa, Hagen Paul Pfeifer, stable, Fernando Gont
Reduce the attack vector and stop generating IPv6 Fragment Header for
paths with an MTU smaller than the minimum required IPv6 MTU
size (1280 byte) - called atomic fragments.
See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1]
for more information and how this "feature" can be misused.
[1] https://tools.ietf.org/html/draft-ietf-6man-deprecate-atomfrag-generation-00
Cc: stable@vger.kernel.org
Signed-off-by: Fernando Gont <fgont@si6networks.com>
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
net/ipv6/route.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 34dcbb5..d4603fb 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1160,12 +1160,9 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
struct net *net = dev_net(dst->dev);
rt6->rt6i_flags |= RTF_MODIFIED;
- if (mtu < IPV6_MIN_MTU) {
- u32 features = dst_metric(dst, RTAX_FEATURES);
+ if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
- features |= RTAX_FEATURE_ALLFRAG;
- dst_metric_set(dst, RTAX_FEATURES, features);
- }
+
dst_metric_set(dst, RTAX_MTU, mtu);
rt6_update_expires(rt6, net->ipv6.sysctl.ip6_rt_mtu_expires);
}
--
2.1.4
^ permalink raw reply related
* Greetings
From: David Edward Cleasby @ 2015-01-15 21:09 UTC (permalink / raw)
To: netdev
Hello,
I am David Edward Cleasby, Group financial director of Bidvest Bank. I will like to discuss an Inheritance deal with you, which will be of help to both of us, if interested kindly reply to: david.ecleashy@outlook.com for more details.
^ permalink raw reply
* Re: net_test_tools: add ipv6 support for kbench_mod
From: Shaohua Li @ 2015-01-15 21:17 UTC (permalink / raw)
To: David Miller; +Cc: netdev, kafai
In-Reply-To: <20150114.013540.1963709251689177055.davem@davemloft.net>
On Wed, Jan 14, 2015 at 01:35:40AM -0500, David Miller wrote:
> From: Shaohua Li <shli@fb.com>
> Date: Tue, 13 Jan 2015 21:45:48 -0800
>
> > This patch adds ipv6 support for kbench_mod test module
>
> This doesn't even link because ip6_route_input is not an
> exported symbol.
>
> So you either didn't test this, or it depends upon custom
> kernel changes which you didn't mention.
>
> Either way I can't apply this, sorry
Yes, we need export the sysmbol for the test. Can we export the symbol?
or I can delete the route input test, which one do you prefer?
Thanks,
Shaohua
^ permalink raw reply
* [PATCH v2] genetlink: synchronize socket closing and family removal
From: Johannes Berg @ 2015-01-15 20:57 UTC (permalink / raw)
To: netdev; +Cc: Jeff Layton, Sedat Dilek, Johannes Berg
In-Reply-To: <1421319885-31779-3-git-send-email-johannes@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
In addition to the problem Jeff Layton reported, I looked at the code
and reproduced the same warning by subscribing and removing the genl
family with a socket still open. This is a fairly tricky race which
originates in the fact that generic netlink allows the family to go
away while sockets are still open - unlike regular netlink which has
a module refcount for every open socket so in general this cannot be
triggered.
Trying to resolve this issue by the obvious locking isn't possible as
it will result in deadlocks between unregistration and group unbind
notification (which incidentally lockdep doesn't find due to the home
grown locking in the netlink table.)
To really resolve this, introduce a "closing socket" reference counter
(for generic netlink only, as it's the only affected family) in the
core netlink code and use that in generic netlink to wait for all the
sockets that are being closed at the same time as a generic netlink
family is removed.
This fixes the race that when a socket is closed, it will should call
the unbind, but if the family is removed at the same time the unbind
will not find it, leading to the warning. The real problem though is
that in this case the unbind could actually find a new family that is
registered to have a multicast group with the same ID, and call its
mcast_unbind() leading to confusing.
Also remove the warning since it would still trigger, but is now no
longer a problem.
This also moves the code in af_netlink.c to before unreferencing the
module to avoid having the same problem in the normal non-genl case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/linux/genetlink.h | 4 ++++
include/net/genetlink.h | 5 ++++-
net/netlink/af_netlink.c | 24 +++++++++++++++++-------
net/netlink/af_netlink.h | 1 +
net/netlink/genetlink.c | 16 +++++++++-------
5 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
index 55b685719d52..09460d6d6682 100644
--- a/include/linux/genetlink.h
+++ b/include/linux/genetlink.h
@@ -11,6 +11,10 @@ extern void genl_unlock(void);
extern int lockdep_genl_is_held(void);
#endif
+/* for synchronisation between af_netlink and genetlink */
+extern atomic_t genl_sk_destructing_cnt;
+extern wait_queue_head_t genl_sk_destructing_waitq;
+
/**
* rcu_dereference_genl - rcu_dereference with debug checking
* @p: The pointer to read, prior to dereferencing
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 2ea2c55bdc87..6c92415311ca 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -35,7 +35,10 @@ struct genl_info;
* undo operations done by pre_doit, for example release locks
* @mcast_bind: a socket bound to the given multicast group (which
* is given as the offset into the groups array)
- * @mcast_unbind: a socket was unbound from the given multicast group
+ * @mcast_unbind: a socket was unbound from the given multicast group.
+ * Note that unbind() will not be called symmetrically if the
+ * generic netlink family is removed while there are still open
+ * sockets.
* @attrbuf: buffer to store parsed attributes
* @family_list: family list
* @mcgrps: multicast groups used by this family (private)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 01b702d63457..0a91ea36ac55 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -61,6 +61,7 @@
#include <linux/rhashtable.h>
#include <asm/cacheflush.h>
#include <linux/hash.h>
+#include <linux/genetlink.h>
#include <net/net_namespace.h>
#include <net/sock.h>
@@ -1089,6 +1090,8 @@ static void netlink_remove(struct sock *sk)
__sk_del_bind_node(sk);
netlink_update_listeners(sk);
}
+ if (sk->sk_protocol == NETLINK_GENERIC)
+ atomic_inc(&genl_sk_destructing_cnt);
netlink_table_ungrab();
}
@@ -1212,6 +1215,20 @@ static int netlink_release(struct socket *sock)
* will be purged.
*/
+ /* must not acquire netlink_table_lock in any way again before unbind
+ * and notifying genetlink is done as otherwise it might deadlock
+ */
+ if (nlk->netlink_unbind) {
+ int i;
+
+ for (i = 0; i < nlk->ngroups; i++)
+ if (test_bit(i, nlk->groups))
+ nlk->netlink_unbind(sock_net(sk), i + 1);
+ }
+ if (sk->sk_protocol == NETLINK_GENERIC &&
+ atomic_dec_return(&genl_sk_destructing_cnt) == 0)
+ wake_up(&genl_sk_destructing_waitq);
+
sock->sk = NULL;
wake_up_interruptible_all(&nlk->wait);
@@ -1247,13 +1264,6 @@ static int netlink_release(struct socket *sock)
netlink_table_ungrab();
}
- if (nlk->netlink_unbind) {
- int i;
-
- for (i = 0; i < nlk->ngroups; i++)
- if (test_bit(i, nlk->groups))
- nlk->netlink_unbind(sock_net(sk), i + 1);
- }
kfree(nlk->groups);
nlk->groups = NULL;
diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h
index 7518375782f5..89008405d6b4 100644
--- a/net/netlink/af_netlink.h
+++ b/net/netlink/af_netlink.h
@@ -2,6 +2,7 @@
#define _AF_NETLINK_H
#include <linux/rhashtable.h>
+#include <linux/atomic.h>
#include <net/sock.h>
#define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8)
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index c18d3f5624b2..ee57459fc258 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -23,6 +23,9 @@
static DEFINE_MUTEX(genl_mutex); /* serialization of message processing */
static DECLARE_RWSEM(cb_lock);
+atomic_t genl_sk_destructing_cnt = ATOMIC_INIT(0);
+DECLARE_WAIT_QUEUE_HEAD(genl_sk_destructing_waitq);
+
void genl_lock(void)
{
mutex_lock(&genl_mutex);
@@ -435,15 +438,18 @@ int genl_unregister_family(struct genl_family *family)
genl_lock_all();
- genl_unregister_mc_groups(family);
-
list_for_each_entry(rc, genl_family_chain(family->id), family_list) {
if (family->id != rc->id || strcmp(rc->name, family->name))
continue;
+ genl_unregister_mc_groups(family);
+
list_del(&rc->family_list);
family->n_ops = 0;
- genl_unlock_all();
+ up_write(&cb_lock);
+ wait_event(genl_sk_destructing_waitq,
+ atomic_read(&genl_sk_destructing_cnt) == 0);
+ genl_unlock();
kfree(family->attrbuf);
genl_ctrl_event(CTRL_CMD_DELFAMILY, family, NULL, 0);
@@ -1014,7 +1020,6 @@ static int genl_bind(struct net *net, int group)
static void genl_unbind(struct net *net, int group)
{
int i;
- bool found = false;
down_read(&cb_lock);
for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
@@ -1027,14 +1032,11 @@ static void genl_unbind(struct net *net, int group)
if (f->mcast_unbind)
f->mcast_unbind(net, fam_grp);
- found = true;
break;
}
}
}
up_read(&cb_lock);
-
- WARN_ON(!found);
}
static int __net_init genl_pernet_init(struct net *net)
--
2.1.4
^ permalink raw reply related
* Re: [PATCH 3/3] genetlink: synchronize socket closing and family removal
From: Johannes Berg @ 2015-01-15 20:55 UTC (permalink / raw)
To: David Miller; +Cc: netdev, jeff.layton, sedat.dilek
In-Reply-To: <20150115.145007.184934220260873768.davem@davemloft.net>
On Thu, 2015-01-15 at 14:50 -0500, David Miller wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> Date: Thu, 15 Jan 2015 12:04:45 +0100
>
> > + atomic_dec(&genl_sk_destructing_cnt);
> > + printk(KERN_DEBUG "dec destructing\n");
> > + wake_up(&genl_sk_destructing_waitq);
>
> Hmmm, maybe only wakeup if "!atomic_dec_and_test()"?
Yes, good point.
And, umm, how the hell did I manage to leave the printk() in there?
johannes
^ permalink raw reply
* Re: [net-next 10/17] i40e: clean up PTP log messages
From: David Miller @ 2015-01-15 20:38 UTC (permalink / raw)
To: shannon.nelson
Cc: David.Laight, jeffrey.t.kirsher, netdev, nhorman, sassmann,
jogreene, jacob.e.keller
In-Reply-To: <FC41C24E35F18A40888AACA1A36F3E418ADD011A@fmsmsx115.amr.corp.intel.com>
From: "Nelson, Shannon" <shannon.nelson@intel.com>
Date: Thu, 15 Jan 2015 15:01:42 +0000
> The dev_info() messages have the PCI device and function number in the string, so it's really not too hard to track down the resulting netdev port:
> Jan 13 15:46:55 snelson3-cup kernel: [621235.401627] i40e 0000:84:00.1: PHC enabled
>
> Later messages use netdev_info() and have both the device number and the netdev name:
> Jan 13 15:46:56 snelson3-cup kernel: [621236.508868] i40e 0000:04:00.1 p261p2: NIC Link is Up 10 Gbps Full Duplex, Flow Control: None
>
> Note that the driver name appears in both as well.
I think we should consistently provide the netdev name as soon as
register_netdevice() returns.
It is unwise for every driver to have their own private policy on
this.
Please change this back.
^ permalink raw reply
* Re: [PATCH] e100: Don't enable WoL by default on Toshiba devices
From: Ondrej Zary @ 2015-01-15 20:15 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: David Miller, e1000-devel, netdev, linux-kernel
In-Reply-To: <1421335864.2632.29.camel@jtkirshe-mobl>
On Thursday 15 January 2015 16:31:04 Jeff Kirsher wrote:
> On Thu, 2015-01-15 at 16:18 +0100, Ondrej Zary wrote:
> > On Thursday 15 January 2015, Jeff Kirsher wrote:
> > > On Thu, 2015-01-15 at 14:40 +0100, Ondrej Zary wrote:
> > > > On Thursday 13 November 2014, Jeff Kirsher wrote:
> > > > > On Wed, 2014-11-12 at 18:18 -0500, David Miller wrote:
> > > > > > From: Ondrej Zary <linux@rainbow-software.org>
> > > > > > Date: Wed, 12 Nov 2014 23:47:25 +0100
> > > > > >
> > > > > > > Enabling WoL on some Toshiba laptops (such as Portege R100)
> > > >
> > > > causes
> > > >
> > > > > > > battery drain after shutdown (WoL is active even on battery).
> > > >
> > > > These
> > > >
> > > > > > > laptops have the WoL bit set in EEPROM ID, causing e100 driver
> > > >
> > > > to
> > > >
> > > > > > > enable WoL by default.
> > > > > > >
> > > > > > > Check subsystem vendor ID and if it's Toshiba, don't enable WoL
> > > >
> > > > by
> > > >
> > > > > > > default from EEPROM settings.
> > > > > > >
> > > > > > > Fixes
> > > >
> > > > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/110784
> > > >
> > > > > > > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > > > > >
> > > > > > Jeff, are you gonna pick this up?
> > > > >
> > > > > Yes, sorry I did not catch it earlier.
> > > >
> > > > What happened to this patch? I don't see it in net.git or
> > > > net-next.git
> > > > (checked both davem's and jkirsher's)
> > >
> > > Sorry, I thought I had replied with a NAK on this patch after further
> > > review of the changes.
> > >
> > > We don't fix BIOS issues in the driver especially regarding feature
> > > enablement like WoL. We would end up with dozens of these kinds of
> > > fixes if we to allow this.
> > >
> > > You should go back to the OEM and ask for a BIOS update to resolve this
> > > or configure udev so that ethtool disables WoL.
> >
> > This is not a BIOS bug. When the machine is powered off in BIOS (or
> > GRUB), everything is OK.
> >
> > The bug is that e100 driver enables WoL based on some bit in EEPROM that
> > happens to be set on at least some Toshiba laptops and user has no way to
> > change it.
>
> Yes, the EEPROM can be modified/updated through the BIOS update I
> suggested earlier. So again, a BIOS issue.
The machine has already the latest BIOS and it's unlikely that Toshiba will
release a new version for old laptops.
> OR you can configure udev so that ethtool disables WoL if you do not
> want to pursue a EEPROM update through a BIOS update.
I can configure udev but what about other people that install Linux and expect
it to work (not drain battery after shutdown)? Without needing to know what
udev, ethtool or WoL is.
> > Windows driver does not do this. Other Linux ethernet drivers
> > don't do this. When user wants WoL, (s)he enables it in BIOS and OS.
> > Maybe this (mis)feature should be removed from the driver.
--
Ondrej Zary
^ permalink raw reply
* Re: [PATCH for 3.19 2/3] rtlwifi: Fix handling of new style descriptors
From: Larry Finger @ 2015-01-15 20:10 UTC (permalink / raw)
To: Kalle Valo, 谭杭波
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <87y4p4w8wb.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
On 01/15/2015 06:00 AM, Kalle Valo wrote:
> Hi Troy,
>
> please avoid top-posting.
>
> 谭杭波 <troy_tan-kXabqFNEczNtrwSWzY7KCg@public.gmane.org> writes:
>
>> You can find get_available_desc here:
>>
>> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/
>> pci.c
>> index e25faac..a62170e 100644
>> --- a/drivers/net/wireless/rtlwifi/pci.c
>> +++ b/drivers/net/wireless/rtlwifi/pci.c
>> @@ -578,6 +578,13 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int
>> prio)
>> else
>> entry = (u8 *)(&ring->desc[ring->idx]);
>>
>> + if (rtlpriv->cfg->ops->get_available_desc &&
>> + rtlpriv->cfg->ops->get_available_desc(hw, prio) <= 1) {
>> + RT_TRACE(rtlpriv, (COMP_INTR | COMP_SEND), DBG_DMESG,
>> + "no available desc!\n");
>> + return;
>> + }
>
> I don't see rtlpriv->cfg->ops->get_available_desc set here, only being
> called?
Kalle,
Troy and I will try to prepare a patch that only fixes the bugs, and we will
submit the cleanup for -next.
Sorry for the noise,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH net-next] Driver: Vmxnet3: Fix ethtool -S to return correct rx queue stats
From: Shrikrishna Khare @ 2015-01-15 19:54 UTC (permalink / raw)
To: sbhatewara, pv-drivers, netdev, linux-kernel
Cc: Shrikrishna Khare, Gao Zhenyu
Signed-off-by: Gao Zhenyu <gzhenyu@vmware.com>
Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Reviewed-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethtool.c | 2 +-
drivers/net/vmxnet3/vmxnet3_int.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 8a5a90e..4c8a944 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -323,7 +323,7 @@ vmxnet3_get_ethtool_stats(struct net_device *netdev,
vmxnet3_tq_driver_stats[i].offset);
}
- for (j = 0; j < adapter->num_tx_queues; j++) {
+ for (j = 0; j < adapter->num_rx_queues; j++) {
base = (u8 *)&adapter->rqd_start[j].stats;
*buf++ = (u64) j;
for (i = 1; i < ARRAY_SIZE(vmxnet3_rq_dev_stats); i++)
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 6297d9f..406144b 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -69,10 +69,10 @@
/*
* Version numbers
*/
-#define VMXNET3_DRIVER_VERSION_STRING "1.3.2.0-k"
+#define VMXNET3_DRIVER_VERSION_STRING "1.3.3.0-k"
/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
-#define VMXNET3_DRIVER_VERSION_NUM 0x01030200
+#define VMXNET3_DRIVER_VERSION_NUM 0x01030300
#if defined(CONFIG_PCI_MSI)
/* RSS only makes sense if MSI-X is supported. */
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH 3/3] genetlink: synchronize socket closing and family removal
From: David Miller @ 2015-01-15 19:50 UTC (permalink / raw)
To: johannes; +Cc: netdev, jeff.layton, sedat.dilek, johannes.berg
In-Reply-To: <1421319885-31779-3-git-send-email-johannes@sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 15 Jan 2015 12:04:45 +0100
> + atomic_dec(&genl_sk_destructing_cnt);
> + printk(KERN_DEBUG "dec destructing\n");
> + wake_up(&genl_sk_destructing_waitq);
Hmmm, maybe only wakeup if "!atomic_dec_and_test()"?
^ permalink raw reply
* Re: [PATCH] net: sh_eth: Use u32 for 32-bit register data
From: David Miller @ 2015-01-15 19:46 UTC (permalink / raw)
To: geert+renesas
Cc: nobuhiro.iwamatsu.yj, yoshihiro.shimoda.uh, netdev, linux-sh
In-Reply-To: <1421319268-22831-1-git-send-email-geert+renesas@glider.be>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Thu, 15 Jan 2015 11:54:28 +0100
> Replace "unsigned long" by "u32" when handling 32-bit register data.
>
> A.o., this saves 11 * 36 bytes in the static sh_eth_cpu_data structures
> when compiling for 64-bit.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] net: core: Fix race by protecting process_queues at CPU hotplug
From: Eric Dumazet @ 2015-01-15 19:28 UTC (permalink / raw)
To: subashab; +Cc: netdev
In-Reply-To: <4504851fe2f44615e67cde94286a2fdd.squirrel@www.codeaurora.org>
On Thu, 2015-01-15 at 19:03 +0000, subashab@codeaurora.org wrote:
> When a CPU is hotplugged while processing incoming packets,
> dev_cpu_callback() will copy the poll list from the offline
> CPU and raise the softIRQ. In the same context, it will also
> process process_queue of the offline CPU by de-queueing and
> calling netif_rx. Due to this there is a potential for race
> condition between process_backlog() and dev_cpu_callback()
> accessing the same process_queue resource. This patch
> protects this concurrent access by locking.
>
> Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
> ---
> net/core/dev.c | 22 ++++++++++++++++------
> 1 file changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index df0b522..aa8f503 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3640,6 +3640,7 @@ static void flush_backlog(void *arg)
> struct net_device *dev = arg;
> struct softnet_data *sd = &__get_cpu_var(softnet_data);
> struct sk_buff *skb, *tmp;
> + unsigned long flags;
>
> rps_lock(sd);
> skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
> @@ -3651,6 +3652,7 @@ static void flush_backlog(void *arg)
> }
> rps_unlock(sd);
>
> + spin_lock_irqsave(&sd->process_queue.lock, flags);
> skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
> if (skb->dev == dev) {
> __skb_unlink(skb, &sd->process_queue);
> @@ -3658,6 +3660,7 @@ static void flush_backlog(void *arg)
> input_queue_head_incr(sd);
> }
> }
> + spin_unlock_irqrestore(&sd->process_queue.lock, flags);
> }
>
> static int napi_gro_complete(struct sk_buff *skb)
> @@ -4021,7 +4024,7 @@ static int process_backlog(struct napi_struct *napi,
> int quota)
> {
> int work = 0;
> struct softnet_data *sd = container_of(napi, struct softnet_data, backlog);
> -
> + unsigned long flags;
> #ifdef CONFIG_RPS
> /* Check if we have pending ipi, its better to send them now,
> * not waiting net_rx_action() end.
> @@ -4032,18 +4035,19 @@ static int process_backlog(struct napi_struct
> *napi, int quota)
> }
> #endif
> napi->weight = weight_p;
> - local_irq_disable();
> + spin_lock_irqsave(&sd->process_queue.lock, flags);
> while (work < quota) {
> struct sk_buff *skb;
> unsigned int qlen;
>
> while ((skb = __skb_dequeue(&sd->process_queue))) {
> - local_irq_enable();
> + spin_unlock_irqrestore(&sd->process_queue.lock, flags);
> __netif_receive_skb(skb);
> - local_irq_disable();
> + spin_lock_irqsave(&sd->process_queue.lock, flags);
> input_queue_head_incr(sd);
> if (++work >= quota) {
> - local_irq_enable();
> + spin_unlock_irqrestore(&sd->process_queue.lock,
> + flags);
> return work;
> }
This would be a terrible change in term of performance.
There is something wrong here : process_queue is local to the cpu.
A cpu does not have to use a spin lock to protect this queue.
Can you reproduce the bug on x86 ?
^ permalink raw reply
* Re: [PATCH RFC v2 net-next 2/2] ip_tunnel: Remove struct gro_cells
From: Eric Dumazet @ 2015-01-15 19:24 UTC (permalink / raw)
To: Martin Lau; +Cc: netdev, kernel-team
In-Reply-To: <20150115181932.GA3899482@devbig242.prn2.facebook.com>
On Thu, 2015-01-15 at 10:39 -0800, Martin Lau wrote:
> >
> > -static inline void gro_cells_destroy(struct gro_cells *gcells)
> > +static inline void gro_cell_free_percpu(struct gro_cell __percpu *gcells)
> > {
> > int i;
> >
> > - if (!gcells->cells)
> > + if (IS_ERR_OR_NULL(gcells))
> > return;
> >
> > For example, I have no idea why this part is needed.
> For this change:
> - err = gro_cells_init(&tunnel->gro_cells, dev);
> - if (err) {
> + tunnel->gro_cells = gro_cell_alloc_percpu(dev);
> + if (IS_ERR(tunnel->gro_cells)) {
That is bad. See David Miller recent mail about this kind of construct.
Current code is better : Do not store an error code in structure, but
rather use a local variable.
Thanks
^ permalink raw reply
* Re: [PATCH] rtlwifi: rtl8192ee: New firmware from Realtek
From: Kyle McMartin @ 2015-01-15 19:21 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-firmware, linux-wireless, Troy Tan, netdev
In-Reply-To: <1421270679-3029-1-git-send-email-Larry.Finger@lwfinger.net>
On Wed, Jan 14, 2015 at 03:24:39PM -0600, Larry Finger wrote:
> From: Troy Tan <troy_tan@realsil.com.cn>
>
> Recent testing by Realtek found bugs in both the driver and firmware for
> the RTL8192EE chips.
>
> Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> WHENCE | 5 ++++-
> rtlwifi/rtl8192eefw.bin | Bin 32754 -> 31818 bytes
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/WHENCE b/WHENCE
> index df2dffa..c6f650e 100644
> --- a/WHENCE
> +++ b/WHENCE
> @@ -2115,7 +2115,10 @@ Licence: Redistributable. See LICENCE.rtlwifi_firmware.txt for details.
>
> Driver: rtl8192ee - Realtek 802.11n WLAN driver for RTL8192EE
>
> -Info: Taken from Realtek version rtl_92ce_92se_92de_8723ae_88ee_8723be_92ee_linux_mac80211_0017.1224.2013
> +Info: Initial version taken from Realtek version
> + rtl_92ce_92se_92de_8723ae_88ee_8723be_92ee_linux_mac80211_0017.1224.2013
> + Updated Jan. 14, 2015 with file added by Realtek to
> + http://github.com/lwfinger/rtlwifi_new.git.
> File: rtlwifi/rtl8192eefw.bin
>
Looks good, applied. Thanks Larry.
regards, Kyle
^ permalink raw reply
* Re: [PATCH] sh_eth: Fix addition of .trscer_err_mask to wrong SoC data
From: David Miller @ 2015-01-15 19:09 UTC (permalink / raw)
To: geert+renesas
Cc: nobuhiro.iwamatsu.yj, yoshihiro.shimoda.uh, netdev, linux-sh
In-Reply-To: <1421319139-22655-1-git-send-email-geert+renesas@glider.be>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Thu, 15 Jan 2015 11:52:19 +0100
> commit b284fbe3b3ef9cf8 ("sh_eth: Fix access to TRSCER register") wanted
> to add a .trscer_err_mask value to the R-Car Gen2 family-specific data
> structure (r8a779x_data), but it was accidentally added to the
> SH7724-specific data structure (sh7724_data).
>
> Presumably this happened due to a patch conflict with commit
> d407bc0203539031 ("sh-eth: Set fdr_value of R-Car SoCs"), which added
> another field at the same position.
>
> Move the field setting to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Fixes: b284fbe3b3ef9cf8 ("sh_eth: Fix access to TRSCER register")
Oops, applied, thanks Geert.
^ permalink raw reply
* Re: [PATCH_V5] dm9000: Add regulator and reset support to dm9000
From: David Miller @ 2015-01-15 19:08 UTC (permalink / raw)
To: Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8
In-Reply-To: <1421316746-38128-1-git-send-email-Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Date: Thu, 15 Jan 2015 10:12:26 +0000
> In boards, the dm9000 chip's power and reset can be controlled by gpio.
>
> It makes sense to add them to the dm9000 driver and let dt be used to
> enable power and reset the phy.
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net] ip: zero sockaddr returned on error queue
From: Eric Dumazet @ 2015-01-15 19:06 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: netdev, davem
In-Reply-To: <1421345920-13994-1-git-send-email-willemb@google.com>
On Thu, 2015-01-15 at 13:18 -0500, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> The sockaddr is returned in IP(V6)_RECVERR as part of errhdr. That
> structure is defined and allocated on the stack as
>
> struct {
> struct sock_extended_err ee;
> struct sockaddr_in(6) offender;
> } errhdr;
>
> The second part is only initialized for certain SO_EE_ORIGIN values.
> Always initialize it completely.
>
> An MTU exceeded error on a SOCK_RAW/IPPROTO_RAW is one example that
> would return uninitialized bytes.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
>
> ----
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: [PATCH 0/2] Remove T4 FCoE support
From: David Miller @ 2015-01-15 19:04 UTC (permalink / raw)
To: praveenm; +Cc: netdev, linux-scsi, JBottomley, hch, hariprasad, varun
In-Reply-To: <cover.1421328605.git.praveenm@chelsio.com>
From: Praveen Madhavan <praveenm@chelsio.com>
Date: Thu, 15 Jan 2015 19:15:50 +0530
> These patches removes FCoE support for chelsio T4 adapter.
> Please apply on net-next since depends on previous commits.
Why is it being removed? You have to state this in the
commit log messages at a minimum.
^ permalink raw reply
* Re: [PATCH] net: core: Fix race by protecting process_queues at CPU hotplug
From: subashab @ 2015-01-15 19:03 UTC (permalink / raw)
To: Eric Dumazet, netdev
In-Reply-To: <1421305282.11734.38.camel@edumazet-glaptop2.roam.corp.google.com>
When a CPU is hotplugged while processing incoming packets,
dev_cpu_callback() will copy the poll list from the offline
CPU and raise the softIRQ. In the same context, it will also
process process_queue of the offline CPU by de-queueing and
calling netif_rx. Due to this there is a potential for race
condition between process_backlog() and dev_cpu_callback()
accessing the same process_queue resource. This patch
protects this concurrent access by locking.
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
---
net/core/dev.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index df0b522..aa8f503 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3640,6 +3640,7 @@ static void flush_backlog(void *arg)
struct net_device *dev = arg;
struct softnet_data *sd = &__get_cpu_var(softnet_data);
struct sk_buff *skb, *tmp;
+ unsigned long flags;
rps_lock(sd);
skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
@@ -3651,6 +3652,7 @@ static void flush_backlog(void *arg)
}
rps_unlock(sd);
+ spin_lock_irqsave(&sd->process_queue.lock, flags);
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
if (skb->dev == dev) {
__skb_unlink(skb, &sd->process_queue);
@@ -3658,6 +3660,7 @@ static void flush_backlog(void *arg)
input_queue_head_incr(sd);
}
}
+ spin_unlock_irqrestore(&sd->process_queue.lock, flags);
}
static int napi_gro_complete(struct sk_buff *skb)
@@ -4021,7 +4024,7 @@ static int process_backlog(struct napi_struct *napi,
int quota)
{
int work = 0;
struct softnet_data *sd = container_of(napi, struct softnet_data, backlog);
-
+ unsigned long flags;
#ifdef CONFIG_RPS
/* Check if we have pending ipi, its better to send them now,
* not waiting net_rx_action() end.
@@ -4032,18 +4035,19 @@ static int process_backlog(struct napi_struct
*napi, int quota)
}
#endif
napi->weight = weight_p;
- local_irq_disable();
+ spin_lock_irqsave(&sd->process_queue.lock, flags);
while (work < quota) {
struct sk_buff *skb;
unsigned int qlen;
while ((skb = __skb_dequeue(&sd->process_queue))) {
- local_irq_enable();
+ spin_unlock_irqrestore(&sd->process_queue.lock, flags);
__netif_receive_skb(skb);
- local_irq_disable();
+ spin_lock_irqsave(&sd->process_queue.lock, flags);
input_queue_head_incr(sd);
if (++work >= quota) {
- local_irq_enable();
+ spin_unlock_irqrestore(&sd->process_queue.lock,
+ flags);
return work;
}
}
@@ -4054,6 +4058,7 @@ static int process_backlog(struct napi_struct *napi,
int quota)
skb_queue_splice_tail_init(&sd->input_pkt_queue,
&sd->process_queue);
+
if (qlen < quota - work) {
/*
* Inline a custom version of __napi_complete().
@@ -4069,7 +4074,7 @@ static int process_backlog(struct napi_struct *napi,
int quota)
}
rps_unlock(sd);
}
- local_irq_enable();
+ spin_unlock_irqrestore(&sd->process_queue.lock, flags);
return work;
}
@@ -5991,6 +5996,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
struct sk_buff *skb;
unsigned int cpu, oldcpu = (unsigned long)ocpu;
struct softnet_data *sd, *oldsd;
+ unsigned long flags;
if (action != CPU_DEAD && action != CPU_DEAD_FROZEN)
return NOTIFY_OK;
@@ -6024,11 +6030,15 @@ static int dev_cpu_callback(struct notifier_block
*nfb,
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable();
+ spin_lock_irqsave(&oldsd->process_queue.lock, flags);
/* Process offline CPU's input_pkt_queue */
while ((skb = __skb_dequeue(&oldsd->process_queue))) {
+ spin_unlock_irqrestore(&oldsd->process_queue.lock, flags);
netif_rx(skb);
+ spin_lock_irqsave(&oldsd->process_queue.lock, flags);
input_queue_head_incr(oldsd);
}
+ spin_unlock_irqrestore(&oldsd->process_queue.lock, flags);
while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) {
netif_rx(skb);
input_queue_head_incr(oldsd);
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
> On Thu, 2015-01-15 at 03:13 +0000, subashab@codeaurora.org wrote:
>> I am seeing frequent crashes in high throughput conditions in a
>> multiprocessor system with kernel version 3.10 where cores are getting
>> hot
>> plugged. I have pinned the network stack to a particular core using
>> receive packet steering (RPS). At the time of crash, it looks like a
>> contention of the process_queue between dev_cpu_callback and
>> process_backlog.
>
> Your patch is mangled, hard to tell what is going on.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply related
* Re: [PATCH net-next v2] socket: use iov_length()
From: David Miller @ 2015-01-15 18:57 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev
In-Reply-To: <1421314558-4252-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 15 Jan 2015 10:35:58 +0100
> Better to use available helpers.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Applied.
^ permalink raw reply
* Re: [net PATCH 1/1] drivers: net: cpsw: fix cpsw hung with add vlan using vconfig
From: David Miller @ 2015-01-15 18:57 UTC (permalink / raw)
To: mugunthanvnm; +Cc: netdev
In-Reply-To: <1421314168-12009-1-git-send-email-mugunthanvnm@ti.com>
From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Thu, 15 Jan 2015 14:59:28 +0530
> while adding vlan in dual EMAC mode, only specific ports should be
> subscribed for the vlan, else it will lead to switching mode and
> if both ports connected to same switch cpsw will hung as it creates
> a network loop. Fixing this by adding only specific ports in case
> of dual EMAC.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Applied.
^ permalink raw reply
* Re: net: prevent of emerging cross-namespace symlinks patches for 3.14?
From: Alexander Y. Fomichev @ 2015-01-15 18:39 UTC (permalink / raw)
To: Miquel van Smoorenburg; +Cc: netdev, stable, David Miller
In-Reply-To: <54B6E36F.9060703@xs4all.net>
Hi,
no objections of course,
actually it was written and tested with 3.14 in mind.
On Thu, Jan 15, 2015 at 12:45 AM, Miquel van Smoorenburg
<mikevs@xs4all.net> wrote:
> [first sent to lkml, now to netdev and the original patch author]
>
> When running 'lxc' on the latest -stable kernel, 3.14.28, I'm seeing these
> errors:
>
> Jan 14 17:47:16 lxc2 kernel: [ 10.704890] WARNING: CPU: 0 PID: 3209 at
> fs/sys
> fs/dir.c:52 sysfs_warn_dup+0x8c/0xb0()
> Jan 14 17:47:16 lxc2 kernel: [ 10.704892] sysfs: cannot create duplicate
> filename '/devices/virtual/net/eth0.104/upper_eth0'
> Jan 14 17:47:16 lxc2 kernel: [ 10.704954] CPU: 0 PID: 3209 Comm:
> lxc-autostart Not tainted 3.14.28-xsserver #1
>
> I did not see these errors in 3.12. This was fixed in 3.17 by:
>
> net: prevent of emerging cross-namespace symlinks
> https://github.com/torvalds/linux/commit/4c75431ac3520631f1d9e74aa88407e6374dbbc4
>
> net: fix creation adjacent device symlinks
> https://github.com/torvalds/linux/commit/7ce64c79c4decdeb1afe0bf2f6ef834b382871d1
>
> These patches apply cleanly to 3.14.28.
>
> If you agree that this should go into 3.14-stable, please ack.
>
> Thanks,
>
> Mike.
--
Best regards.
Alexander Y. Fomichev <git.user@gmail.com>
^ permalink raw reply
* Re: [PATCH RFC v2 net-next 2/2] ip_tunnel: Remove struct gro_cells
From: Martin Lau @ 2015-01-15 18:39 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, kernel-team
In-Reply-To: <1421276039.11734.25.camel@edumazet-glaptop2.roam.corp.google.com>
On Wed, Jan 14, 2015 at 02:53:59PM -0800, Eric Dumazet wrote:
> On Tue, 2015-01-13 at 15:42 -0800, Martin KaFai Lau wrote:
> > After adding percpu gro_cells, struct gro_cells can be removed.
> >
> > Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> > ---
> > include/net/gro_cells.h | 34 ++++++++++++++++------------------
> > include/net/ip_tunnels.h | 2 +-
> > net/ipv4/ip_tunnel.c | 11 +++++------
> > 3 files changed, 22 insertions(+), 25 deletions(-)
> >
> > diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
> > index 0f712c0..b1aeea1 100644
> > --- a/include/net/gro_cells.h
> > +++ b/include/net/gro_cells.h
> > @@ -10,21 +10,18 @@ struct gro_cell {
> > struct napi_struct napi;
> > };
> >
> > -struct gro_cells {
> > - struct gro_cell __percpu *cells;
> > -};
> > -
>
> This seems a lot of code churn for no runtime difference ?
>
> If we ever want to add an additional 'field', we likely have to revert
> this patch.
It seems cleaning up an one item struct is unnecessary. I
will repost without patch 2/2.
>
> -static inline void gro_cells_destroy(struct gro_cells *gcells)
> +static inline void gro_cell_free_percpu(struct gro_cell __percpu *gcells)
> {
> int i;
>
> - if (!gcells->cells)
> + if (IS_ERR_OR_NULL(gcells))
> return;
>
> For example, I have no idea why this part is needed.
For this change:
- err = gro_cells_init(&tunnel->gro_cells, dev);
- if (err) {
+ tunnel->gro_cells = gro_cell_alloc_percpu(dev);
+ if (IS_ERR(tunnel->gro_cells)) {
Thanks,
--Martin
^ permalink raw reply
* Re: Re: Re: Re: Re: [bisected regression] e1000e: "Detected Hardware Unit Hang"
From: Eric Dumazet @ 2015-01-15 18:24 UTC (permalink / raw)
To: Thomas Jarosch
Cc: 'Linux Netdev List', Eric Dumazet, Jeff Kirsher,
e1000-devel
In-Reply-To: <1951915.1kCMSXLj6g@storm>
On Thu, 2015-01-15 at 18:37 +0100, Thomas Jarosch wrote:
> On Thursday, 15. January 2015 09:20:37 Eric Dumazet wrote:
> > > for the sake of completeness:
> > > 1: hang
> >
> > This is weird : This should have same effect then GRO off (at most one
> > segment per packet)
>
> I thought so, too. OTOH the code path was changed from
> "goto merge" to "return -E2BIG". I didn't look at the code
> what happens at the "merge" label.
If you leave the "goto merge", then GRO still builds big GRO packets,
using a linked list of packets.
Then because drivers do not generally support NETIF_F_FRAGLIST,
core networking code linearizes such GRO packets before reaching
ndo_start_xmit()
Check 8a29111c7ca68d928dfab58636f3f6acf0ac04f7 "net: gro: allow to build
full sized skb" for details about this.
^ permalink raw reply
* Re: [PATCH net-next RFC 1/5] net-timestamp: no-payload option
From: Willem de Bruijn @ 2015-01-15 18:22 UTC (permalink / raw)
To: Richard Cochran
Cc: Network Development, David Miller, Eric Dumazet, Andy Lutomirski
In-Reply-To: <20150111202650.GB4214@localhost.localdomain>
On Sun, Jan 11, 2015 at 3:26 PM, Richard Cochran
<richardcochran@gmail.com> wrote:
> On Fri, Jan 09, 2015 at 12:31:55PM -0500, Willem de Bruijn wrote:
>> diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
>> index a317797..d81ef70 100644
>> --- a/net/ipv4/ip_sockglue.c
>> +++ b/net/ipv4/ip_sockglue.c
>> @@ -440,7 +440,7 @@ static bool ipv4_pktinfo_prepare_errqueue(const struct sock *sk,
>>
>> if ((ee_origin != SO_EE_ORIGIN_TIMESTAMPING) ||
>> (!(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_CMSG)) ||
>> - (!skb->dev))
>> + (!skb->dev) || (!skb->len))
>> return false;
>
> Nit: You have already tested for the condition (!skb->len) ...
Thanks! I'll fix that when I send v1.
I had planned to do that today, but will hold off a bit to avoid merge
conflicts with a fix queued for net (http://patchwork.ozlabs.org/patch/429553/)
I will drop patches 4 and 5 when sending out v1, btw.
>
>>
>> info->ipi_spec_dst.s_addr = ip_hdr(skb)->saddr;
>> @@ -483,7 +483,7 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
>>
>> serr = SKB_EXT_ERR(skb);
>>
>> - if (sin) {
>> + if (sin && skb->len) {
>> sin->sin_family = AF_INET;
>> sin->sin_addr.s_addr = *(__be32 *)(skb_network_header(skb) +
>> serr->addr_offset);
>> @@ -496,8 +496,9 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
>> sin = &errhdr.offender;
>> sin->sin_family = AF_UNSPEC;
>>
>> - if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP ||
>> - ipv4_pktinfo_prepare_errqueue(sk, skb, serr->ee.ee_origin)) {
>> + if (skb->len &&
>> + (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP ||
>> + ipv4_pktinfo_prepare_errqueue(sk, skb, serr->ee.ee_origin))) {
>
> ... here.
>
>> struct inet_sock *inet = inet_sk(sk);
>>
>> sin->sin_family = AF_INET;
>
> Thanks,
> Richard
^ 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