* [PATCH 1/3] net: cpsw: Add a minimal cpsw-common module for shared code
From: Tony Lindgren @ 2015-01-28 19:33 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-omap, Brian Hutchinson, Felipe Balbi
In-Reply-To: <1422473586-18100-1-git-send-email-tony@atomide.com>
Looks like davinci_emac and cpsw can share some code although the
device registers have a different layout.
At least the code for getting the MAC address using syscon can
be shared by passing the register offset. Let's start with that
and set up a minimal shared cpsw-shared.c.
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/net/ethernet/ti/Makefile | 3 ++
drivers/net/ethernet/ti/cpsw-common.c | 53 +++++++++++++++++++++++++++++++++++
drivers/net/ethernet/ti/cpsw.c | 35 ++---------------------
drivers/net/ethernet/ti/cpsw.h | 2 ++
4 files changed, 60 insertions(+), 33 deletions(-)
create mode 100644 drivers/net/ethernet/ti/cpsw-common.c
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile
index 465d03d..7fa47f6 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -2,6 +2,9 @@
# Makefile for the TI network device drivers.
#
+obj-$(CONFIG_TI_CPSW) += cpsw-common.o
+obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o
+
obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_CPMAC) += cpmac.o
obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
diff --git a/drivers/net/ethernet/ti/cpsw-common.c b/drivers/net/ethernet/ti/cpsw-common.c
new file mode 100644
index 0000000..763ada1
--- /dev/null
+++ b/drivers/net/ethernet/ti/cpsw-common.c
@@ -0,0 +1,53 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+#include <linux/mfd/syscon.h>
+
+#define AM33XX_CTRL_MAC_LO_REG(offset, id) ((offset) + 0x8 * (id))
+#define AM33XX_CTRL_MAC_HI_REG(offset, id) ((offset) + 0x8 * (id) + 0x4)
+
+int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave,
+ u8 *mac_addr)
+{
+ u32 macid_lo;
+ u32 macid_hi;
+ struct regmap *syscon;
+
+ syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon");
+ if (IS_ERR(syscon)) {
+ if (PTR_ERR(syscon) == -ENODEV)
+ return 0;
+ return PTR_ERR(syscon);
+ }
+
+ regmap_read(syscon, AM33XX_CTRL_MAC_LO_REG(offset, slave),
+ &macid_lo);
+ regmap_read(syscon, AM33XX_CTRL_MAC_HI_REG(offset, slave),
+ &macid_hi);
+
+ mac_addr[5] = (macid_lo >> 8) & 0xff;
+ mac_addr[4] = macid_lo & 0xff;
+ mac_addr[3] = (macid_hi >> 24) & 0xff;
+ mac_addr[2] = (macid_hi >> 16) & 0xff;
+ mac_addr[1] = (macid_hi >> 8) & 0xff;
+ mac_addr[0] = macid_hi & 0xff;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(cpsw_am33xx_cm_get_macid);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 2b9d404..7d8dd0d 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -33,8 +33,6 @@
#include <linux/of_net.h>
#include <linux/of_device.h>
#include <linux/if_vlan.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
#include <linux/pinctrl/consumer.h>
@@ -1936,36 +1934,6 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv,
slave->port_vlan = data->dual_emac_res_vlan;
}
-#define AM33XX_CTRL_MAC_LO_REG(id) (0x630 + 0x8 * id)
-#define AM33XX_CTRL_MAC_HI_REG(id) (0x630 + 0x8 * id + 0x4)
-
-static int cpsw_am33xx_cm_get_macid(struct device *dev, int slave,
- u8 *mac_addr)
-{
- u32 macid_lo;
- u32 macid_hi;
- struct regmap *syscon;
-
- syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon");
- if (IS_ERR(syscon)) {
- if (PTR_ERR(syscon) == -ENODEV)
- return 0;
- return PTR_ERR(syscon);
- }
-
- regmap_read(syscon, AM33XX_CTRL_MAC_LO_REG(slave), &macid_lo);
- regmap_read(syscon, AM33XX_CTRL_MAC_HI_REG(slave), &macid_hi);
-
- mac_addr[5] = (macid_lo >> 8) & 0xff;
- mac_addr[4] = macid_lo & 0xff;
- mac_addr[3] = (macid_hi >> 24) & 0xff;
- mac_addr[2] = (macid_hi >> 16) & 0xff;
- mac_addr[1] = (macid_hi >> 8) & 0xff;
- mac_addr[0] = macid_hi & 0xff;
-
- return 0;
-}
-
static int cpsw_probe_dt(struct cpsw_platform_data *data,
struct platform_device *pdev)
{
@@ -2090,7 +2058,8 @@ no_phy_slave:
memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
} else {
if (of_machine_is_compatible("ti,am33xx")) {
- ret = cpsw_am33xx_cm_get_macid(&pdev->dev, i,
+ ret = cpsw_am33xx_cm_get_macid(&pdev->dev,
+ 0x630, i,
slave_data->mac_addr);
if (ret)
return ret;
diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h
index 1b71067..ca90efa 100644
--- a/drivers/net/ethernet/ti/cpsw.h
+++ b/drivers/net/ethernet/ti/cpsw.h
@@ -41,5 +41,7 @@ struct cpsw_platform_data {
};
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
+int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave,
+ u8 *mac_addr);
#endif /* __CPSW_H__ */
--
2.1.4
^ permalink raw reply related
* [PATCH v2 iproute2-next 4/4] bridge/fdb: display link netns id
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
When this attribute is set, it means that the i/o part of the related netdevice
is in another netns.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: new in the series
bridge/fdb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bridge/fdb.c b/bridge/fdb.c
index c01a5020de63..6941edd90f90 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -131,12 +131,16 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (ifindex) {
char ifname[IF_NAMESIZE];
- if (if_indextoname(ifindex, ifname))
+ if (!tb[NDA_LINK_NETNSID] &&
+ if_indextoname(ifindex, ifname))
fprintf(fp, "via %s ", ifname);
else
fprintf(fp, "via ifindex %u ", ifindex);
}
}
+ if (tb[NDA_LINK_NETNSID])
+ fprintf(fp, "link-netnsid %d ",
+ rta_getattr_u32(tb[NDA_LINK_NETNSID]));
if (show_stats && tb[NDA_CACHEINFO]) {
struct nda_cacheinfo *ci = RTA_DATA(tb[NDA_CACHEINFO]);
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 2/4] ipnetns: allow to get and set netns ids
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
The kernel now provides ids for peer netns. This patch implements a new command
'set' to assign an id.
When netns are listed, if an id is assigned, it is now displayed.
Example:
$ ip netns add foo
$ ip netns set foo 1
$ ip netns
foo (id: 1)
init_net
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: no change
include/libnetlink.h | 8 ++++
ip/ipnetns.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++-
man/man8/ip-netns.8 | 14 +++++++
3 files changed, 134 insertions(+), 1 deletion(-)
diff --git a/include/libnetlink.h b/include/libnetlink.h
index d081e54210ea..898275b824d4 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -158,6 +158,14 @@ extern int rtnl_from_file(FILE *, rtnl_filter_t handler,
#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
#endif
+#ifndef NETNS_RTA
+#define NETNS_RTA(r) \
+ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))))
+#endif
+#ifndef NETNS_PAYLOAD
+#define NETNS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtgenmsg))
+#endif
+
/* User defined nlmsg_type which is used mostly for logging netlink
* messages from dump file */
#define NLMSG_TSTAMP 15
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 123318eb6adf..8c86673db581 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -15,6 +15,8 @@
#include <unistd.h>
#include <ctype.h>
+#include <linux/net_namespace.h>
+
#include "utils.h"
#include "ip_common.h"
#include "namespace.h"
@@ -23,6 +25,7 @@ static int usage(void)
{
fprintf(stderr, "Usage: ip netns list\n");
fprintf(stderr, " ip netns add NAME\n");
+ fprintf(stderr, " ip netns set NAME NETNSID\n");
fprintf(stderr, " ip netns delete NAME\n");
fprintf(stderr, " ip netns identify [PID]\n");
fprintf(stderr, " ip netns pids NAME\n");
@@ -31,10 +34,56 @@ static int usage(void)
exit(-1);
}
+static int get_netnsid_from_name(const char *name)
+{
+ struct {
+ struct nlmsghdr n;
+ struct rtgenmsg g;
+ char buf[1024];
+ } req, answer;
+ struct rtattr *tb[NETNSA_MAX + 1];
+ struct rtgenmsg *rthdr;
+ int len, fd;
+
+ memset(&req, 0, sizeof(req));
+ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
+ req.n.nlmsg_flags = NLM_F_REQUEST;
+ req.n.nlmsg_type = RTM_GETNSID;
+ req.g.rtgen_family = AF_UNSPEC;
+
+ fd = netns_get_fd(name);
+ if (fd < 0)
+ return fd;
+
+ addattr32(&req.n, 1024, NETNSA_FD, fd);
+ if (rtnl_talk(&rth, &req.n, 0, 0, &answer.n) < 0) {
+ close(fd);
+ return -2;
+ }
+ close(fd);
+
+ /* Validate message and parse attributes */
+ if (answer.n.nlmsg_type == NLMSG_ERROR)
+ return -1;
+
+ rthdr = NLMSG_DATA(&answer.n);
+ len = answer.n.nlmsg_len - NLMSG_SPACE(sizeof(*rthdr));
+ if (len < 0)
+ return -1;
+
+ parse_rtattr(tb, NETNSA_MAX, NETNS_RTA(rthdr), len);
+
+ if (tb[NETNSA_NSID])
+ return rta_getattr_u32(tb[NETNSA_NSID]);
+
+ return -1;
+}
+
static int netns_list(int argc, char **argv)
{
struct dirent *entry;
DIR *dir;
+ int id;
dir = opendir(NETNS_RUN_DIR);
if (!dir)
@@ -45,7 +94,11 @@ static int netns_list(int argc, char **argv)
continue;
if (strcmp(entry->d_name, "..") == 0)
continue;
- printf("%s\n", entry->d_name);
+ printf("%s", entry->d_name);
+ id = get_netnsid_from_name(entry->d_name);
+ if (id >= 0)
+ printf(" (id: %d)", id);
+ printf("\n");
}
closedir(dir);
return 0;
@@ -355,6 +408,61 @@ out_delete:
return -1;
}
+static int set_netnsid_from_name(const char *name, int nsid)
+{
+ struct {
+ struct nlmsghdr n;
+ struct rtgenmsg g;
+ char buf[1024];
+ } req;
+ int fd, err = 0;
+
+ memset(&req, 0, sizeof(req));
+ req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
+ req.n.nlmsg_flags = NLM_F_REQUEST;
+ req.n.nlmsg_type = RTM_NEWNSID;
+ req.g.rtgen_family = AF_UNSPEC;
+
+ fd = netns_get_fd(name);
+ if (fd < 0)
+ return fd;
+
+ addattr32(&req.n, 1024, NETNSA_FD, fd);
+ addattr32(&req.n, 1024, NETNSA_NSID, nsid);
+ if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
+ err = -2;
+
+ close(fd);
+ return err;
+}
+
+static int netns_set(int argc, char **argv)
+{
+ char netns_path[MAXPATHLEN];
+ const char *name;
+ int netns, nsid;
+
+ if (argc < 1) {
+ fprintf(stderr, "No netns name specified\n");
+ return -1;
+ }
+ if (argc < 2) {
+ fprintf(stderr, "No nsid specified\n");
+ return -1;
+ }
+ name = argv[0];
+ nsid = atoi(argv[1]);
+
+ snprintf(netns_path, sizeof(netns_path), "%s/%s", NETNS_RUN_DIR, name);
+ netns = open(netns_path, O_RDONLY | O_CLOEXEC);
+ if (netns < 0) {
+ fprintf(stderr, "Cannot open network namespace \"%s\": %s\n",
+ name, strerror(errno));
+ return -1;
+ }
+
+ return set_netnsid_from_name(name, nsid);
+}
static int netns_monitor(int argc, char **argv)
{
@@ -410,6 +518,9 @@ int do_netns(int argc, char **argv)
if (matches(*argv, "add") == 0)
return netns_add(argc-1, argv+1);
+ if (matches(*argv, "set") == 0)
+ return netns_set(argc-1, argv+1);
+
if (matches(*argv, "delete") == 0)
return netns_delete(argc-1, argv+1);
diff --git a/man/man8/ip-netns.8 b/man/man8/ip-netns.8
index 74343ed6b640..95fc5e6b8a45 100644
--- a/man/man8/ip-netns.8
+++ b/man/man8/ip-netns.8
@@ -20,6 +20,10 @@ ip-netns \- process network namespace management
.I NETNSNAME
.ti -8
+.BR "ip netns" " { " set " } "
+.I NETNSNAME NETNSID
+
+.ti -8
.BR "ip netns identify"
.RI "[ " PID " ]"
@@ -85,6 +89,16 @@ persists until it has no more users. ip netns delete may fail if
the mount point is in use in another mount namespace.
.TP
+.B ip netns set NAME NETNSID - assign an id to a peer network namespace
+.sp
+This command assigns a id to a peer network namespace. This id is valid
+only in the current network namespace.
+This id will be used by the kernel in some netlink messages. If no id is
+assigned when the kernel needs it, it will be automatically assigned by
+the kernel.
+Once it is assigned, it's not possible to change it.
+
+.TP
.B ip netns identify [PID] - Report network namespaces names for process
.sp
This command walks through /var/run/netns and finds all the network
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 1/4] include: update headers
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <54C8E3EB.8050904@6wind.com>
Copy from sanitized headers.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: took last headers from net-next
include/linux/if_link.h | 4 ++++
include/linux/neighbour.h | 1 +
include/linux/net_namespace.h | 23 +++++++++++++++++++++++
include/linux/rtnetlink.h | 5 +++++
4 files changed, 33 insertions(+)
create mode 100644 include/linux/net_namespace.h
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 167ec34bab73..ac64724c9425 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -146,6 +146,7 @@ enum {
IFLA_PHYS_PORT_ID,
IFLA_CARRIER_CHANGES,
IFLA_PHYS_SWITCH_ID,
+ IFLA_LINK_NETNSID,
__IFLA_MAX
};
@@ -368,6 +369,9 @@ enum {
IFLA_VXLAN_UDP_CSUM,
IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
+ IFLA_VXLAN_REMCSUM_TX,
+ IFLA_VXLAN_REMCSUM_RX,
+ IFLA_VXLAN_GBP,
__IFLA_VXLAN_MAX
};
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
index f3d77f9f1e0b..3873a35509aa 100644
--- a/include/linux/neighbour.h
+++ b/include/linux/neighbour.h
@@ -25,6 +25,7 @@ enum {
NDA_VNI,
NDA_IFINDEX,
NDA_MASTER,
+ NDA_LINK_NETNSID,
__NDA_MAX
};
diff --git a/include/linux/net_namespace.h b/include/linux/net_namespace.h
new file mode 100644
index 000000000000..9a92b7e14a19
--- /dev/null
+++ b/include/linux/net_namespace.h
@@ -0,0 +1,23 @@
+/* Copyright (c) 2015 6WIND S.A.
+ * Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ */
+#ifndef _LINUX_NET_NAMESPACE_H_
+#define _LINUX_NET_NAMESPACE_H_
+
+/* Attributes of RTM_NEWNSID/RTM_GETNSID messages */
+enum {
+ NETNSA_NONE,
+#define NETNSA_NSID_NOT_ASSIGNED -1
+ NETNSA_NSID,
+ NETNSA_PID,
+ NETNSA_FD,
+ __NETNSA_MAX,
+};
+
+#define NETNSA_MAX (__NETNSA_MAX - 1)
+
+#endif /* _LINUX_NET_NAMESPACE_H_ */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 9111053f2250..3eb78105399b 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -132,6 +132,11 @@ enum {
RTM_GETMDB = 86,
#define RTM_GETMDB RTM_GETMDB
+ RTM_NEWNSID = 88,
+#define RTM_NEWNSID RTM_NEWNSID
+ RTM_GETNSID = 90,
+#define RTM_GETNSID RTM_GETNSID
+
__RTM_MAX,
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
};
--
2.2.2
^ permalink raw reply related
* [PATCH v2 iproute2-next 3/4] iplink: add support of IFLA_LINK_NETNSID attribute
From: Nicolas Dichtel @ 2015-01-28 14:15 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
In-Reply-To: <1422454550-32222-1-git-send-email-nicolas.dichtel@6wind.com>
This new attribute is now advertised by the kernel for x-netns interfaces.
It's also possible to set it when an interface is created (and thus creating a
x-netns interface with one single message).
Example:
$ ip netns add foo
$ ip netns add bar
$ ip -n foo netns set bar 15
$ ip -n foo link add ipip1 link-netnsid 15 type ipip remote 10.16.0.121 local 10.16.0.249
$ ip -n foo link ls ipip1
3: ipip1@NONE: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
link/ipip 10.16.0.249 peer 10.16.0.121 link-netnsid 15
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
v2: don't try to convert IFLA_LINK to the devname when IFLA_LINK_NETNSID is set
ip/ipaddress.c | 20 +++++++++++++++++---
ip/iplink.c | 10 ++++++++++
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index d5e863dd1f12..8bc28b8a12c8 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -28,6 +28,7 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/sockios.h>
+#include <linux/net_namespace.h>
#include "rt_names.h"
#include "utils.h"
@@ -614,9 +615,13 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (iflink == 0)
fprintf(fp, "@NONE: ");
else {
- fprintf(fp, "@%s: ", ll_idx_n2a(iflink, b1));
- m_flag = ll_index_to_flags(iflink);
- m_flag = !(m_flag & IFF_UP);
+ if (tb[IFLA_LINK_NETNSID])
+ fprintf(fp, "@if%d: ", iflink);
+ else {
+ fprintf(fp, "@%s: ", ll_idx_n2a(iflink, b1));
+ m_flag = ll_index_to_flags(iflink);
+ m_flag = !(m_flag & IFF_UP);
+ }
}
} else {
fprintf(fp, ": ");
@@ -678,6 +683,15 @@ int print_linkinfo(const struct sockaddr_nl *who,
}
}
+ if (tb[IFLA_LINK_NETNSID]) {
+ int id = *(int*)RTA_DATA(tb[IFLA_LINK_NETNSID]);
+
+ if (id >= 0)
+ fprintf(fp, " link-netnsid %d", id);
+ else
+ fprintf(fp, " link-netnsid unknown");
+ }
+
if (tb[IFLA_PROMISCUITY] && show_details)
fprintf(fp, " promiscuity %u ",
*(int*)RTA_DATA(tb[IFLA_PROMISCUITY]));
diff --git a/ip/iplink.c b/ip/iplink.c
index c93d1dc3d5f6..5893ee401cf9 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -72,6 +72,7 @@ void iplink_usage(void)
fprintf(stderr, " [ mtu MTU ]\n");
fprintf(stderr, " [ netns PID ]\n");
fprintf(stderr, " [ netns NAME ]\n");
+ fprintf(stderr, " [ link-netnsid ID ]\n");
fprintf(stderr, " [ alias NAME ]\n");
fprintf(stderr, " [ vf NUM [ mac LLADDR ]\n");
fprintf(stderr, " [ vlan VLANID [ qos VLAN-QOS ] ]\n");
@@ -386,6 +387,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
int numtxqueues = -1;
int numrxqueues = -1;
int dev_index = 0;
+ int link_netnsid = -1;
*group = -1;
ret = argc;
@@ -588,6 +590,14 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
addattr8(&req->n, sizeof(*req), IFLA_INET6_ADDR_GEN_MODE, mode);
addattr_nest_end(&req->n, afs6);
addattr_nest_end(&req->n, afs);
+ } else if (matches(*argv, "link-netnsid") == 0) {
+ NEXT_ARG();
+ if (link_netnsid != -1)
+ duparg("link-netnsid", *argv);
+ if (get_integer(&link_netnsid, *argv, 0))
+ invarg("Invalid \"link-netnsid\" value\n", *argv);
+ addattr32(&req->n, sizeof(*req), IFLA_LINK_NETNSID,
+ link_netnsid);
} else {
if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
--
2.2.2
^ permalink raw reply related
* Re: A problem about ICMP packet-too-big message handler
From: Yang Yingliang @ 2015-01-28 10:07 UTC (permalink / raw)
To: Hannes Frederic Sowa; +Cc: netdev, David S. Miller
In-Reply-To: <1422434574.4678.21.camel@redhat.com>
On 2015/1/28 16:42, Hannes Frederic Sowa wrote:
> On Di, 2015-01-27 at 20:58 +0800, Yang Yingliang wrote:
>> Hi,
>>
>> My kernel is 3.10 LTS.
>>
>> I got a problem here about handling ICMP packet-too-big message.
>>
>> Before sending a packet-too-big packet :
>>
>> # ip -6 route list table local
>> local ::1 dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80::1 dev lo metric 0 //It does not have expire value
>
> Did you just add a local route or do you also have a corresponding IPv6
> address bound to loopback?
I just set a IPv6 linklocal address and the route was added automatic.
I do not add any other route by hand.
Regards,
Yang
^ permalink raw reply
* [PATCH 2/2] string_helpers: Change semantics of string_escape_mem
From: Rasmus Villemoes @ 2015-01-28 13:25 UTC (permalink / raw)
To: Andy Shevchenko, Andrew Morton, Trond Myklebust, J. Bruce Fields,
David S. Miller
Cc: Rasmus Villemoes, linux-kernel, linux-nfs, netdev
In-Reply-To: <1422451543-12401-1-git-send-email-linux@rasmusvillemoes.dk>
The current semantics of string_escape_mem are inadequate for one of
its two current users, vsnprintf(). If that is to honour its contract,
it must know how much space would be needed for the entire escaped
buffer, and string_escape_mem provides no way of obtaining that (short
of allocating a large enough buffer (~4 times input string) to let it
play with, and that's definitely a big no-no inside vsnprintf).
So change the semantics for string_escape_mem to be more
snprintf-like: Return the size of the output that would be generated
if the destination buffer was big enough, but of course still only
write to the part of dst it is allowed to, and don't do
'\0'-termination. It is then up to the caller to detect whether output
was truncated and to append a '\0' if desired.
This also fixes a bug in the escaped_string() helper function, which
used to unconditionally pass a length of "end-buf" to
string_escape_mem(); since the latter doesn't check osz for being
insanely large, it would happily write to dst. For example,
kasprintf(GFP_KERNEL, "something and then %pE", ...); is an easy way
to trigger an oops.
The patch is somewhat larger than I'd like, but I couldn't find a way
of splitting it into smaller pieces. Implementation-wise, I changed
the various escape_* helpers to return true if they handled the
character, updating dst appropriately, false otherwise. Maybe there's
a more elegant way, but this seems to work.
In test-string_helpers.c, I removed the now meaningless -ENOMEM test,
and replaced it with testing for getting the expected return value
even if the buffer is too small. Also ensure that nothing is written
when osz==0.
In net/sunrpc/cache.c, I think qword_add still has the same
semantics. Someone should definitely double-check this.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
include/linux/string_helpers.h | 10 +--
lib/string_helpers.c | 195 ++++++++++++++++-------------------------
lib/test-string_helpers.c | 37 ++++----
lib/vsprintf.c | 2 +-
net/sunrpc/cache.c | 8 +-
5 files changed, 101 insertions(+), 151 deletions(-)
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 6eb567ac56bc..7a082aa183a8 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -47,22 +47,22 @@ static inline int string_unescape_any_inplace(char *buf)
#define ESCAPE_ANY_NP (ESCAPE_ANY | ESCAPE_NP)
#define ESCAPE_HEX 0x20
-int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
+size_t string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
unsigned int flags, const char *esc);
-static inline int string_escape_mem_any_np(const char *src, size_t isz,
- char **dst, size_t osz, const char *esc)
+static inline size_t string_escape_mem_any_np(const char *src, size_t isz,
+ char *dst, size_t osz, const char *esc)
{
return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, esc);
}
-static inline int string_escape_str(const char *src, char **dst, size_t sz,
+static inline size_t string_escape_str(const char *src, char *dst, size_t sz,
unsigned int flags, const char *esc)
{
return string_escape_mem(src, strlen(src), dst, sz, flags, esc);
}
-static inline int string_escape_str_any_np(const char *src, char **dst,
+static inline size_t string_escape_str_any_np(const char *src, char *dst,
size_t sz, const char *esc)
{
return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, esc);
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 58b78ba57439..288bacca74aa 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -243,28 +243,20 @@ int string_unescape(char *src, char *dst, size_t size, unsigned int flags)
}
EXPORT_SYMBOL(string_unescape);
-static int escape_passthrough(unsigned char c, char **dst, size_t *osz)
+static bool escape_passthrough(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 1)
- return -ENOMEM;
-
- *out++ = c;
-
- *dst = out;
- *osz -= 1;
-
- return 1;
+ if (out < end)
+ *out = c;
+ *dst = out + 1;
+ return true;
}
-static int escape_space(unsigned char c, char **dst, size_t *osz)
+static bool escape_space(unsigned char c, char **dst, char *end)
{
- char *out = *dst;
unsigned char to;
-
- if (*osz < 2)
- return -ENOMEM;
+ char *out = *dst;
switch (c) {
case '\n':
@@ -283,25 +275,22 @@ static int escape_space(unsigned char c, char **dst, size_t *osz)
to = 'f';
break;
default:
- return 0;
+ return false;
}
- *out++ = '\\';
- *out++ = to;
-
- *dst = out;
- *osz -= 2;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = to;
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_special(unsigned char c, char **dst, size_t *osz)
+static bool escape_special(unsigned char c, char **dst, char *end)
{
- char *out = *dst;
unsigned char to;
-
- if (*osz < 2)
- return -ENOMEM;
+ char *out = *dst;
switch (c) {
case '\\':
@@ -314,71 +303,66 @@ static int escape_special(unsigned char c, char **dst, size_t *osz)
to = 'e';
break;
default:
- return 0;
+ return false;
}
- *out++ = '\\';
- *out++ = to;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = to;
- *dst = out;
- *osz -= 2;
-
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_null(unsigned char c, char **dst, size_t *osz)
+static bool escape_null(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 2)
- return -ENOMEM;
-
if (c)
- return 0;
-
- *out++ = '\\';
- *out++ = '0';
+ return false;
- *dst = out;
- *osz -= 2;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = '0';
- return 1;
+ *dst = out + 2;
+ return true;
}
-static int escape_octal(unsigned char c, char **dst, size_t *osz)
+static bool escape_octal(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 4)
- return -ENOMEM;
-
- *out++ = '\\';
- *out++ = ((c >> 6) & 0x07) + '0';
- *out++ = ((c >> 3) & 0x07) + '0';
- *out++ = ((c >> 0) & 0x07) + '0';
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = ((c >> 6) & 0x07) + '0';
+ if (out + 2 < end)
+ out[2] = ((c >> 3) & 0x07) + '0';
+ if (out + 3 < end)
+ out[3] = ((c >> 0) & 0x07) + '0';
- *dst = out;
- *osz -= 4;
-
- return 1;
+ *dst = out + 4;
+ return true;
}
-static int escape_hex(unsigned char c, char **dst, size_t *osz)
+static bool escape_hex(unsigned char c, char **dst, char *end)
{
char *out = *dst;
- if (*osz < 4)
- return -ENOMEM;
+ if (out + 0 < end)
+ out[0] = '\\';
+ if (out + 1 < end)
+ out[1] = 'x';
+ if (out + 2 < end)
+ out[2] = hex_asc_hi(c);
+ if (out + 3 < end)
+ out[3] = hex_asc_lo(c);
- *out++ = '\\';
- *out++ = 'x';
- *out++ = hex_asc_hi(c);
- *out++ = hex_asc_lo(c);
-
- *dst = out;
- *osz -= 4;
-
- return 1;
+ *dst = out + 4;
+ return true;
}
/**
@@ -430,19 +414,17 @@ static int escape_hex(unsigned char c, char **dst, size_t *osz)
* it if needs.
*
* Return:
- * The amount of the characters processed to the destination buffer, or
- * %-ENOMEM if the size of buffer is not enough to put an escaped character is
- * returned.
- *
- * Even in the case of error @dst pointer will be updated to point to the byte
- * after the last processed character.
+ * The total size of the escaped output that would be generated for
+ * the given input and flags. To check whether the output was
+ * truncated, compare the return value to osz. There is room left in
+ * dst for a '\0' terminator if and only if ret < osz.
*/
-int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
- unsigned int flags, const char *esc)
+size_t string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
+ unsigned int flags, const char *esc)
{
- char *out = *dst, *p = out;
+ char *p = dst;
+ char *end = dst + osz;
bool is_dict = esc && *esc;
- int ret = 0;
while (isz--) {
unsigned char c = *src++;
@@ -462,55 +444,26 @@ int string_escape_mem(const char *src, size_t isz, char **dst, size_t osz,
(is_dict && !strchr(esc, c))) {
/* do nothing */
} else {
- if (flags & ESCAPE_SPACE) {
- ret = escape_space(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
-
- if (flags & ESCAPE_SPECIAL) {
- ret = escape_special(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
-
- if (flags & ESCAPE_NULL) {
- ret = escape_null(c, &p, &osz);
- if (ret < 0)
- break;
- if (ret > 0)
- continue;
- }
+ if (flags & ESCAPE_SPACE && escape_space(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_SPECIAL && escape_special(c, &p, end))
+ continue;
+
+ if (flags & ESCAPE_NULL && escape_null(c, &p, end))
+ continue;
/* ESCAPE_OCTAL and ESCAPE_HEX always go last */
- if (flags & ESCAPE_OCTAL) {
- ret = escape_octal(c, &p, &osz);
- if (ret < 0)
- break;
+ if (flags & ESCAPE_OCTAL && escape_octal(c, &p, end))
continue;
- }
- if (flags & ESCAPE_HEX) {
- ret = escape_hex(c, &p, &osz);
- if (ret < 0)
- break;
+
+ if (flags & ESCAPE_HEX && escape_hex(c, &p, end))
continue;
- }
}
- ret = escape_passthrough(c, &p, &osz);
- if (ret < 0)
- break;
+ escape_passthrough(c, &p, end);
}
- *dst = p;
-
- if (ret < 0)
- return ret;
-
- return p - out;
+ return p - dst;
}
EXPORT_SYMBOL(string_escape_mem);
diff --git a/lib/test-string_helpers.c b/lib/test-string_helpers.c
index ab0d30e1e18f..5f95114a2f86 100644
--- a/lib/test-string_helpers.c
+++ b/lib/test-string_helpers.c
@@ -264,12 +264,12 @@ static __init void test_string_escape(const char *name,
const struct test_string_2 *s2,
unsigned int flags, const char *esc)
{
- int q_real = 512;
- char *out_test = kmalloc(q_real, GFP_KERNEL);
- char *out_real = kmalloc(q_real, GFP_KERNEL);
+ size_t out_size = 512;
+ char *out_test = kmalloc(out_size, GFP_KERNEL);
+ char *out_real = kmalloc(out_size, GFP_KERNEL);
char *in = kmalloc(256, GFP_KERNEL);
- char *buf = out_real;
- int p = 0, q_test = 0;
+ size_t p = 0, q_test = 0;
+ size_t q_real;
if (!out_test || !out_real || !in)
goto out;
@@ -301,29 +301,26 @@ static __init void test_string_escape(const char *name,
q_test += len;
}
- q_real = string_escape_mem(in, p, &buf, q_real, flags, esc);
+ q_real = string_escape_mem(in, p, out_real, out_size, flags, esc);
test_string_check_buf(name, flags, in, p, out_real, q_real, out_test,
q_test);
+
+ memset(out_real, 'Z', out_size);
+ q_real = string_escape_mem(in, p, out_real, 0, flags, esc);
+ if (q_real != q_test)
+ pr_warn("Test '%s' failed: flags = %u, osz = 0, expected %zu, got %zu\n",
+ name, flags, q_test, q_real);
+ if (memchr_inv(out_real, 'Z', out_size))
+ pr_warn("Test '%s' failed: osz = 0 but string_escape_mem wrote to the buffer\n",
+ name);
+
out:
kfree(in);
kfree(out_real);
kfree(out_test);
}
-static __init void test_string_escape_nomem(void)
-{
- char *in = "\eb \\C\007\"\x90\r]";
- char out[64], *buf = out;
- int rc = -ENOMEM, ret;
-
- ret = string_escape_str_any_np(in, &buf, strlen(in), NULL);
- if (ret == rc)
- return;
-
- pr_err("Test 'escape nomem' failed: got %d instead of %d\n", ret, rc);
-}
-
static int __init test_string_helpers_init(void)
{
unsigned int i;
@@ -342,8 +339,6 @@ static int __init test_string_helpers_init(void)
for (i = 0; i < (ESCAPE_ANY_NP | ESCAPE_HEX) + 1; i++)
test_string_escape("escape 1", escape1, i, TEST_STRING_2_DICT_1);
- test_string_escape_nomem();
-
return -EINVAL;
}
module_init(test_string_helpers_init);
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 0d57be58448f..a3e474f9957f 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1165,7 +1165,7 @@ char *escaped_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
len = spec.field_width < 0 ? 1 : spec.field_width;
/* Ignore the error. We print as many characters as we can */
- string_escape_mem(addr, len, &buf, end - buf, flags, NULL);
+ buf += string_escape_mem(addr, len, buf, buf < end ? end - buf : 0, flags, NULL);
return buf;
}
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 33fb105d4352..22c4418057f4 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1068,12 +1068,14 @@ void qword_add(char **bpp, int *lp, char *str)
{
char *bp = *bpp;
int len = *lp;
- int ret;
+ int ret, written;
if (len < 0) return;
- ret = string_escape_str(str, &bp, len, ESCAPE_OCTAL, "\\ \n\t");
- if (ret < 0 || ret == len)
+ ret = string_escape_str(str, bp, len, ESCAPE_OCTAL, "\\ \n\t");
+ written = min(ret, len);
+ bp += written;
+ if (ret >= len)
len = -1;
else {
len -= ret;
--
2.1.3
^ permalink raw reply related
* Re: [RFC PATCH] net: ipv6: Make address flushing on ifdown optional
From: Hannes Frederic Sowa @ 2015-01-28 8:25 UTC (permalink / raw)
To: David Ahern; +Cc: Andy Gospodarek, Stephen Hemminger, netdev
In-Reply-To: <54C855D6.7050500@gmail.com>
On Di, 2015-01-27 at 20:21 -0700, David Ahern wrote:
> On 01/27/2015 08:28 AM, Hannes Frederic Sowa wrote:
> >> From the discussion a second patch is needed to make sure DAD is done
> >> on a link up if there is an address configured.
> >
> > Thank you!
> >
> > Let's see if the DAD patch isn't complex, maybe it is a candidate for
> > stable?
>
> Actually, DAD is done on a link up; you can see the notifications go out
> when the link is brought up:
Oh, cool, sorry I did not check and misunderstood you in the other mail.
> 18:46:28.519907 IP6 :: > ff02::1:ff00:10: ICMP6, neighbor solicitation,
> who has 2001:1::10, length 24
> 18:46:28.607650 IP6 :: > ff02::1:ff03:402: ICMP6, neighbor solicitation,
> who has fe80::1:2ff:fe03:402, length 24
>
> So current top of tree works fine wrt DAD on addresses added when a link
> is down and then the link is brought up.
>
> But, my previous patch does not re-send notifications on the up in a
> down-up cycle. I believe it is because the IFA_F_TENTATIVE flag is not
> set for the global address configured. I will address that in the
> revised patch.
Sounds good, I don't see any more problems with this patch then.
Thanks!
^ permalink raw reply
* Re: [PATCH net-next 06/10] net/mlx4_core: Fix struct mlx4_vhcr_cmd to make implicit padding explicit
From: Jack Morgenstein @ 2015-01-28 15:16 UTC (permalink / raw)
To: David Miller; +Cc: David.Laight, amirv, netdev, ogerlitz, yevgenyp
In-Reply-To: <20150127.111334.501141232585900738.davem@davemloft.net>
>>On Tue, 27 Jan 2015 11:13:34 -0800 (PST)
>>David Miller <davem@davemloft.net> wrote:
>> Indeed, I'm really sick of seeing these packed structures being
>> created all over the place.
>>
>> They are to be used in absolutely extreme cases where no other
>> solution is possible.
>The V2 of this patch does not have "packed".
I meant the **V1** version of the patch, does not have "packed".
-Jack
^ permalink raw reply
* NetDev 0.1 Schedule delay update
From: Jamal Hadi Salim @ 2015-01-28 13:24 UTC (permalink / raw)
To: netdev, linux-wireless, lwn, netdev01, lartc, netfilter,
netfilter-devel
Cc: info, speakers, attendees
Fellow netheads,
On behalf of rgb and the tech committee:
Schedule update
----------------
We apologize, the schedule will not be ready until Thursday.
The content is so good we are having a hard time coming up
with a schedule which is not going to conflict with anybody's interest.
We have finalized all the technical content. Every accepted proposal is
now listed at:
https://www.netdev01.org/sessions
To help you plan your trip it should be understood that we are planning
to have the first two days to be tutorial, workshop and BOF days. The
next two days to be talks. There are some non-technical BOFs which
are still in the pipeline - watch the RSS feed or twitter.
New talks since last time:
--------------------------
John Fastabend - Flow API: An abstraction for hardware flow tables
https://www.netdev01.org/news/50
New Tutorials since last time:
------------------------------
1) Cong Wang, Jamal Hadi Salim - Linux Traffic Control (TC) tutorial
https://www.netdev01.org/news/48
2) Jon Maloy - Introduction to basics of TIPC
https://www.netdev01.org/news/49
And as rgb already posted,Hotel update:
The hotel has agreed, on a best effort basis to extend the
netdev01 rate of $159.00 or $179.00 (depending on the type of room
required). Please dont procastinate and book now. We are competing
against a few tourist activities for hotel rooms going on around the
area at the same time (example:
http://www.ottawafestivals.ca/events/winterlude-2/).
Do your reservations at:
https://www.starwoodmeeting.com/StarGroupsWeb/res?id=1412035802&key=1AC9C1F8
If you dont succeed getting the reservation, send us email at
info at netdev01.org; we will try to bat for you but we cant guarantee
results.
conference registration at:
https://onlineregistrations.ca/netdev01/
Sponsors:
=========
NetDev 0.1 would like to gratefully acknowledge all our sponsors:
https://netdev01.org/sponsors
CENGN http://www.cengn.ca/
Google https://www.google.ca
Qualcomm https://www.qualcomm.com/
Verizon http://www.verizon.com/
Cumulus Networks http://cumulusnetworks.com/
Mojatatu Networks http://mojatatu.com/
Important Dates:
==========================
December 2, 2014 Call for Papers opens
December 10, 2014 Registration opens
January 23, 2015 Hotel discount rates deadline
January 24, 2015 Call for sessions deadline
February 12, 2015 On-line registration closes
February 14-17, 2015 Conference days
-------------------------------------------------------------------------------
THE Technical Conference on Linux Networking, February 14-17, 2015,
Ottawa, Canada
https://netdev01.org/
Contact: info@xxxxxxxxxxxxx
Main site: https://www.netdev01.org/
Announcement: https://www.netdev01.org/announce
CFP: https://www.netdev01.org/cfp
Travel/hotel/weather/clothing: https://www.netdev01.org/travel
RSS feed: https://netdev01.org/atom
Follow us on Twitter: @netdev01 https://twitter.com/netdev01
cheers,
jamal
^ permalink raw reply
* Re: [PATCH net 1/2] caif: remove wrong dev_net_set() call
From: Nicolas Dichtel @ 2015-01-28 15:07 UTC (permalink / raw)
To: netdev; +Cc: davem, arvid.brodin, alex.aring, linux-wpan, Dmitry Tarnyagin
In-Reply-To: <1422307694-10079-2-git-send-email-nicolas.dichtel@6wind.com>
Removing bouncing email addresses (dmitry.tarnyagin@lockless.no and
sjur.brandeland@stericsson.com)
CC: Dmitry Tarnyagin <abi.dmitryt@gmail.com>
Dmitry, please also have a look to
http://permalink.gmane.org/gmane.linux.network/347942
Thank you,
Nicolas
Le 26/01/2015 22:28, Nicolas Dichtel a écrit :
> src_net points to the netns where the netlink message has been received. This
> netns may be different from the netns where the interface is created (because
> the user may add IFLA_NET_NS_[PID|FD]). In this case, src_net is the link netns.
>
> It seems wrong to override the netns in the newlink() handler because if it
> was not already src_net, it means that the user explicitly asks to create the
> netdevice in another netns.
>
> CC: Sjur Brændeland <sjur.brandeland@stericsson.com>
> CC: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
> Fixes: 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control")
> Fixes: c41254006377 ("caif-hsi: Add rtnl support")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> drivers/net/caif/caif_hsi.c | 1 -
> net/caif/chnl_net.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
> index 5e40a8b68cbe..b3b922adc0e4 100644
> --- a/drivers/net/caif/caif_hsi.c
> +++ b/drivers/net/caif/caif_hsi.c
> @@ -1415,7 +1415,6 @@ static int caif_hsi_newlink(struct net *src_net, struct net_device *dev,
>
> cfhsi = netdev_priv(dev);
> cfhsi_netlink_parms(data, cfhsi);
> - dev_net_set(cfhsi->ndev, src_net);
>
> get_ops = symbol_get(cfhsi_get_ops);
> if (!get_ops) {
> diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
> index 4589ff67bfa9..67a4a36febd1 100644
> --- a/net/caif/chnl_net.c
> +++ b/net/caif/chnl_net.c
> @@ -470,7 +470,6 @@ static int ipcaif_newlink(struct net *src_net, struct net_device *dev,
> ASSERT_RTNL();
> caifdev = netdev_priv(dev);
> caif_netlink_parms(data, &caifdev->conn_req);
> - dev_net_set(caifdev->netdev, src_net);
>
> ret = register_netdevice(dev);
> if (ret)
>
^ permalink raw reply
* [kernel] [iwlwifi] problem with Centrino Advanced-N 6200
From: kichawa23 @ 2015-01-28 14:19 UTC (permalink / raw)
To: linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 532 bytes --]
My kernel:
Linux x61s 3.18.2-2-ARCH #1 SMP PREEMPT Fri Jan 9 07:23:08 CET 2015 i686 GNU/Linux
Linux x61s 3.18.4-1-ARCH #1 SMP PREEMPT Tue Jan 27 21:01:00 CET 2015 i686 GNU/Linux
My network controller:
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
My connection randomly disconnects. [iwlwifi.log]
[Symptom was the same about a year ago.]
I cannot turn off and turn on the wlan0 interface [ifconfig wlan0 up]
More details: https://bugzilla.kernel.org/show_bug.cgi?id=92231
Thank in advance
[-- Attachment #2: ifconfig_wlan0_up --]
[-- Type: text/plain, Size: 3038 bytes --]
[ 1091.345765] [<c106c253>] kthread+0xb3/0xd0
[ 1091.345771] [<c1479f41>] ret_from_kernel_thread+0x21/0x30
[ 1091.345774] [<c106c1a0>] ? kthread_create_on_node+0x130/0x130
[ 1091.345778] ---[ end trace 0c7129685113d084 ]---
[ 1091.346187] cfg80211: Calling CRDA to update world regulatory domain
[ 1091.347266] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1092.152886] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1092.953799] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1110.559529] thinkpad_acpi: EC reports that Thermal Table has changed
[ 1110.647118] EXT4-fs (sda5): re-mounted. Opts: data=ordered,commit=600
[ 1111.251256] EXT4-fs (sda1): re-mounted. Opts: (null)
[ 1111.276142] EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600
[ 1111.357783] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.158623] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1112.959585] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1113.760724] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1114.561713] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1115.362895] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.164144] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1116.965222] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1117.766201] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1118.567244] e1000e 0000:00:19.0 eth0: Error reading PHY register
[ 1196.936806] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1197.006316] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1202.642017] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1202.642029] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1202.642037] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1204.435533] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1206.246198] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1208.092369] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1209.903953] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1211.668061] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1220.413655] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1220.483357] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1226.118549] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1226.118558] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1226.118567] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1227.911330] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1229.721430] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1231.566820] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1233.377219] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1235.140838] iwlwifi 0000:02:00.0: Unable to initialize device.
[-- Attachment #3: tained --]
[-- Type: text/plain, Size: 5 bytes --]
4096
[-- Attachment #4: lsmod_modinfo --]
[-- Type: text/plain, Size: 7633 bytes --]
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/fuse/fuse.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bnep/bnep.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/bluetooth/btusb.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/bluetooth/bluetooth.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/coretemp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/thermal/intel_powerclamp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/kvm/kvm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/joydev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mousedev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-hdmi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/thinkpad_acpi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32-pclmul.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/crc32c-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-conexant.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec-generic.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/arc4.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aesni-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/nvram.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_wdt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/watchdog/iTCO_vendor_support.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-intel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-controller.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/pci/hda/snd-hda-codec.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-hwdep.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/arch/x86/crypto/aes-i586.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-pcm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/xts.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/leds/led-class.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/mac80211/mac80211.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/busses/i2c-i801.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hwmon/hwmon.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd-timer.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/core/snd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/sound/soundcore.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/lrw.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/mouse/psmouse.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm_tis.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/gf128mul.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/wireless/cfg80211.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/intel_ips.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/ablk_helper.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/thermal.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-agp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/mfd/lpc_ich.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio_raw.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/crypto/cryptd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ptp/ptp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/tpm/tpm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/pps/pps_core.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/platform/x86/wmi.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/rfkill/rfkill.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/ac.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/pci/hotplug/shpchp.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei-me.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/misc/mei/mei.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/battery.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/evdev.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/macintosh/mac_hid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/net/sched/sch_fq_codel.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/cpufreq_powersave.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/cpufreq/acpi-cpufreq.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/processor.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/extramodules/vboxnetflt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/extramodules/vboxdrv.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/ext4/ext4.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/lib/crc16.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/mbcache.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/fs/jbd2/jbd2.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/sd_mod.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid-generic.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/usbhid/usbhid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/hid/hid.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/keyboard/atkbd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/libps2.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/ahci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libahci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/ata/libata.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-pci.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/host/ehci-hcd.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/core/usbcore.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/usb/common/usb-common.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/i8042.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/input/serio/serio.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/i915/i915.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/button.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/intel-gtt.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/algos/i2c-algo-bit.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/acpi/video.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm_kms_helper.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/gpu/drm/drm.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/char/agp/agpgart.ko.gz
filename: /lib/modules/3.18.4-1-ARCH/kernel/drivers/i2c/i2c-core.ko.gz
[-- Attachment #5: iwlwifi.log --]
[-- Type: text/plain, Size: 41189 bytes --]
[ 2.240667] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[ 2.241652] ata1.00: configured for UDMA/100
[ 2.242013] scsi 0:0:0:0: Direct-Access ATA WDC WD1600BEKT-6 1A03 PQ: 0 ANSI: 5
[ 2.314986] hub 1-1:1.0: USB hub found
[ 2.315167] hub 1-1:1.0: 6 ports detected
[ 2.328133] hub 2-1:1.0: USB hub found
[ 2.328242] hub 2-1:1.0: 8 ports detected
[ 2.560325] ata2: SATA link down (SStatus 0 SControl 300)
[ 2.580464] usb 1-1.1: new full-speed USB device number 3 using ehci-pci
[ 2.593803] Switched to clocksource tsc
[ 2.667065] hub 1-1.1:1.0: USB hub found
[ 2.667195] hub 1-1.1:1.0: 3 ports detected
[ 2.733763] usb 1-1.3: new full-speed USB device number 4 using ehci-pci
[ 2.880123] ata5: SATA link down (SStatus 0 SControl 300)
[ 2.933614] usb 1-1.1.1: new full-speed USB device number 5 using ehci-pci
[ 3.021913] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.023672] usbcore: registered new interface driver usbhid
[ 3.023677] usbhid: USB HID core driver
[ 3.024340] input: HID 0a5c:4502 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/0003:0A5C:4502.0001/input/input6
[ 3.024425] hid-generic 0003:0A5C:4502.0001: input,hidraw0: USB HID v1.11 Keyboard [HID 0a5c:4502] on usb-0000:00:1a.0-1.1.1/input0
[ 3.086962] usb 1-1.1.2: new full-speed USB device number 6 using ehci-pci
[ 3.176844] input: HID 0a5c:4503 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:0A5C:4503.0002/input/input7
[ 3.176968] hid-generic 0003:0A5C:4503.0002: input,hidraw1: USB HID v1.11 Mouse [HID 0a5c:4503] on usb-0000:00:1a.0-1.1.2/input0
[ 3.199924] ata6: SATA link down (SStatus 0 SControl 300)
[ 3.204317] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[ 3.204418] sd 0:0:0:0: [sda] Write Protect is off
[ 3.204426] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.204471] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.243409] usb 1-1.1.3: new full-speed USB device number 7 using ehci-pci
[ 3.256658] sda: sda1 sda2 sda3 < sda5 sda6 >
[ 3.257293] sd 0:0:0:0: [sda] Attached SCSI disk
[ 3.708516] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[ 4.773097] random: nonblocking pool is initialized
[ 4.788760] systemd[1]: RTC configured in localtime, applying delta of 60 minutes to system time.
[ 6.009083] systemd[1]: [/usr/lib/systemd/system/mpd.service:17] Unknown lvalue 'ControlGroup' in section 'Service'
[ 6.009110] systemd[1]: [/usr/lib/systemd/system/mpd.service:20] Unknown lvalue 'ControlGroupAttribute' in section 'Service'
[ 6.466663] thinkpad_ec: thinkpad_ec 0.41 loaded.
[ 6.469279] tp_smapi 0.41 loading...
[ 6.469487] tp_smapi successfully loaded (smapi_port=0xb2).
[ 6.566841] vboxdrv: Found 4 processor cores.
[ 6.567257] vboxdrv: fAsync=0 offMin=0x3ea offMax=0x2588
[ 6.567395] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
[ 6.567397] vboxdrv: Successfully loaded version 4.3.20_OSE (interface 0x001a0008).
[ 6.568897] EXT4-fs (sda5): re-mounted. Opts: (null)
[ 9.856787] ACPI: Battery Slot [BAT0] (battery present)
[ 9.909078] agpgart: Erk, registering with no pci_dev!
[ 9.909083] agpgart-intel: probe of 0000:00:00.0 failed with error -22
[ 9.923847] tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
[ 9.927300] pps_core: LinuxPPS API ver. 1 registered
[ 9.927302] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 9.941411] PTP clock support registered
[ 9.972841] tpm_tis 00:05: TPM is disabled/deactivated (0x6)
[ 10.045646] ACPI Warning: SystemIO range 0x00001028-0x0000102f conflicts with OpRegion 0x00001000-0x0000107f (\_SB_.PCI0.LPC_.PMIO) (20140926/utaddress-258)
[ 10.045652] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045656] ACPI Warning: SystemIO range 0x000011c0-0x000011cf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045659] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045660] ACPI Warning: SystemIO range 0x000011b0-0x000011bf conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045662] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045663] ACPI Warning: SystemIO range 0x00001180-0x000011af conflicts with OpRegion 0x00001180-0x000011ff (\_SB_.PCI0.LPC_.LPIO) (20140926/utaddress-258)
[ 10.045666] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 10.045667] lpc_ich: Resource conflict(s) found affecting gpio_ich
[ 10.058335] thermal LNXTHERM:00: registered as thermal_zone0
[ 10.058339] ACPI: Thermal Zone [THM0] (60 C)
[ 10.068941] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 10.081236] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt
[ 10.122734] intel ips 0000:00:1f.6: CPU TDP doesn't match expected value (found 25, expected 29)
[ 10.123420] wmi: Mapper loaded
[ 10.126066] intel ips 0000:00:1f.6: IPS driver initialized, MCP temp limit 90
[ 10.134364] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 10.134367] e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
[ 10.134526] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 10.134548] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 10.310987] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) f0:de:f1:08:57:de
[ 10.310995] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[ 10.311040] e1000e 0000:00:19.0 eth0: MAC: 9, PHY: 10, PBA No: C5C0FF-0FF
[ 10.311193] mei_me 0000:00:16.0: irq 27 for MSI/MSI-X
[ 10.315956] ACPI: AC Adapter [AC] (on-line)
[ 10.420470] cfg80211: Calling CRDA to update world regulatory domain
[ 10.504483] Intel(R) Wireless WiFi driver for Linux, in-tree:
[ 10.504486] Copyright(c) 2003- 2014 Intel Corporation
[ 10.504652] iwlwifi 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 10.504801] iwlwifi 0000:02:00.0: irq 28 for MSI/MSI-X
[ 10.589711] Non-volatile memory driver v1.3
[ 10.667220] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-6.ucode failed with error -2
[ 10.667255] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-6000-5.ucode failed with error -2
[ 10.679529] iwlwifi 0000:02:00.0: loaded firmware version 9.221.4.1 build 25532 op_mode iwldvm
[ 10.819241] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[ 10.819245] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 10.819246] thinkpad_acpi: ThinkPad BIOS 6QET46WW (1.16 ), EC 6QHT28WW-1.09
[ 10.819248] thinkpad_acpi: Lenovo ThinkPad X201, model 3680BR4
[ 10.819694] thinkpad_acpi: detected a 16-level brightness capable ThinkPad
[ 10.819868] thinkpad_acpi: radio switch found; radios are enabled
[ 10.820047] thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
[ 10.820059] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[ 10.820060] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[ 10.823954] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[ 10.824030] thinkpad_acpi: Console audio control enabled, mode: override (read/write)
[ 10.825218] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input9
[ 10.848234] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 10.848238] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[ 10.848240] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[ 10.848242] iwlwifi 0000:02:00.0: Detected Intel(R) Centrino(R) Advanced-N 6200 AGN, REV=0x74
[ 10.848392] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 10.889301] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[ 10.907788] iTCO_vendor_support: vendor-support=0
[ 10.913764] snd_hda_intel 0000:00:1b.0: irq 29 for MSI/MSI-X
[ 10.993037] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[ 10.993085] iTCO_wdt: Found a QM57 TCO device (Version=2, TCOBASE=0x1060)
[ 10.993158] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[ 11.048503] sound hdaudioC0D0: CX20585: BIOS auto-probing.
[ 11.049003] sound hdaudioC0D0: autoconfig: line_outs=1 (0x1f/0x0/0x0/0x0/0x0) type:speaker
[ 11.049006] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 11.049007] sound hdaudioC0D0: hp_outs=2 (0x1c/0x19/0x0/0x0/0x0)
[ 11.049009] sound hdaudioC0D0: mono: mono_out=0x0
[ 11.049010] sound hdaudioC0D0: inputs:
[ 11.049012] sound hdaudioC0D0: Internal Mic=0x23
[ 11.049014] sound hdaudioC0D0: Mic=0x1b
[ 11.049015] sound hdaudioC0D0: Dock Mic=0x1a
[ 11.050092] sound hdaudioC0D0: Enable sync_write for stable communication
[ 11.247477] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd047b3/0xb40000/0xa0000, board id: 71, fw id: 615624
[ 11.247490] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[ 11.300794] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input8
[ 11.325149] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/hdaudioC0D0/input10
[ 11.325557] input: HDA Intel MID Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 11.325647] input: HDA Intel MID Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 11.325734] input: HDA Intel MID Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[ 11.325815] input: HDA Intel MID Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[ 11.325899] input: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[ 11.430883] mousedev: PS/2 mouse device common for all mice
[ 11.718985] kvm: disabled by bios
[ 11.735951] kvm: disabled by bios
[ 12.032924] systemd-journald[144]: Received request to flush runtime journal from PID 1
[ 13.513457] Adding 249000k swap on /dev/sda2. Priority:-1 extents:1 across:249000k FS
[ 14.084971] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 14.254685] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[ 14.919322] Bluetooth: Core ver 2.19
[ 14.919341] NET: Registered protocol family 31
[ 14.919342] Bluetooth: HCI device and connection manager initialized
[ 14.919350] Bluetooth: HCI socket layer initialized
[ 14.919353] Bluetooth: L2CAP socket layer initialized
[ 14.919359] Bluetooth: SCO socket layer initialized
[ 14.976084] usbcore: registered new interface driver btusb
[ 15.236769] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[ 15.285941] psmouse serio2: hgpk: ID: 10 00 64
[ 16.923655] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
[ 17.188937] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input11
[ 19.248504] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 19.248508] Bluetooth: BNEP filters: protocol multicast
[ 19.248514] Bluetooth: BNEP socket layer initialized
[ 22.488952] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 22.589181] e1000e 0000:00:19.0: irq 26 for MSI/MSI-X
[ 22.589351] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 24.021487] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 24.028356] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 24.238338] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 24.245153] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 24.320319] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 26.332454] wlan0: authenticate with 00:25:9c:3d:11:92
[ 26.333774] wlan0: send auth to 00:25:9c:3d:11:92 (try 1/3)
[ 26.339122] wlan0: authenticated
[ 26.339351] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[ 26.339360] wlan0: waiting for beacon from 00:25:9c:3d:11:92
[ 26.413651] wlan0: associate with 00:25:9c:3d:11:92 (try 1/3)
[ 26.417375] wlan0: RX AssocResp from 00:25:9c:3d:11:92 (capab=0x411 status=0 aid=2)
[ 26.427487] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 26.427671] wlan0: associated
[ 54.181665] cfg80211: Calling CRDA to update world regulatory domain
[ 90.496163] cfg80211: Calling CRDA to update world regulatory domain
[ 124.726421] fuse init (API version 7.23)
[ 163.182366] cfg80211: Calling CRDA to update world regulatory domain
[ 549.484387] perf interrupt took too long (2523 > 2495), lowering kernel.perf_event_max_sample_rate to 50100
[ 1207.499667] perf interrupt took too long (4991 > 4960), lowering kernel.perf_event_max_sample_rate to 25200
[ 1536.295554] iwlwifi 0000:02:00.0: Error sending REPLY_TXFIFO_FLUSH: time out after 2000ms.
[ 1536.295561] iwlwifi 0000:02:00.0: Current CMD queue read_ptr 222 write_ptr 226
[ 1536.312697] ------------[ cut here ]------------
[ 1536.312716] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/pcie/trans.c:1269 iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]()
[ 1536.312718] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
[ 1536.312720] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.312771] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.312783] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G O 3.18.2-2-ARCH #1
[ 1536.312785] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.312801] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.312803] 00000000 9454c866 00000000 ce1b1cbc c1474f33 ce1b1d00 ce1b1cf0 c10527f2
[ 1536.312808] f84405d0 ce1b1d20 000009e2 f84405a4 000004f5 f8430f34 000004f5 f8430f34
[ 1536.312812] f843ba80 ce1b1d58 f43aa000 ce1b1d0c c105284e 00000009 ce1b1d00 f84405d0
[ 1536.312816] Call Trace:
[ 1536.312825] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.312832] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.312837] [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312840] [<f8430f34>] ? iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312843] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1536.312847] [<f8430f34>] iwl_trans_pcie_grab_nic_access+0x294/0x2a0 [iwlwifi]
[ 1536.312852] [<f842447c>] iwl_write_prph+0x2c/0x60 [iwlwifi]
[ 1536.312856] [<f84244d6>] iwl_force_nmi+0x26/0x50 [iwlwifi]
[ 1536.312860] [<f842fcc0>] iwl_trans_pcie_send_hcmd+0x5a0/0x620 [iwlwifi]
[ 1536.312865] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.312872] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.312876] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.312880] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.312884] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.312894] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.312904] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.312913] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.312924] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.312934] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.312939] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.312942] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.312945] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.312948] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.312951] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.312954] [<c106c173>] kthread+0xb3/0xd0
[ 1536.312958] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.312960] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.312963] ---[ end trace a5b5252fd3fa22c1 ]---
[ 1536.312993] iwlwifi 0000:02:00.0: Loaded firmware version: 9.221.4.1 build 25532
[ 1536.330191] iwlwifi 0000:02:00.0: Start IWL Error Log Dump:
[ 1536.330198] iwlwifi 0000:02:00.0: Status: 0x0000004C, count: -197484544
[ 1536.330201] iwlwifi 0000:02:00.0: 0xCE1B1CBC | ADVANCED_SYSASSERT
[ 1536.330202] iwlwifi 0000:02:00.0: 0xC10564D3 | uPc
[ 1536.330204] iwlwifi 0000:02:00.0: 0xCE1B1CC8 | branchlink1
[ 1536.330206] iwlwifi 0000:02:00.0: 0xC147AD98 | branchlink2
[ 1536.330208] iwlwifi 0000:02:00.0: 0x9454C866 | interruptlink1
[ 1536.330210] iwlwifi 0000:02:00.0: 0xF5303B20 | interruptlink2
[ 1536.330212] iwlwifi 0000:02:00.0: 0xC1538797 | data1
[ 1536.330213] iwlwifi 0000:02:00.0: 0xCE1B1E08 | data2
[ 1536.330216] iwlwifi 0000:02:00.0: 0xCE1B1CE0 | line
[ 1536.330217] iwlwifi 0000:02:00.0: 0xC131754F | beacon time
[ 1536.330219] iwlwifi 0000:02:00.0: 0xCE1B1CF4 | tsf low
[ 1536.330221] iwlwifi 0000:02:00.0: 0xCE1B1D10 | tsf hi
[ 1536.330223] iwlwifi 0000:02:00.0: 0xC13175AA | time gp1
[ 1536.330224] iwlwifi 0000:02:00.0: 0x00000003 | time gp2
[ 1536.330226] iwlwifi 0000:02:00.0: 0xF533E064 | time gp3
[ 1536.330228] iwlwifi 0000:02:00.0: 0xC156A6F8 | uCode version
[ 1536.330230] iwlwifi 0000:02:00.0: 0xF843E569 | hw version
[ 1536.330231] iwlwifi 0000:02:00.0: 0xF5303B20 | board version
[ 1536.330233] iwlwifi 0000:02:00.0: 0xF2C49084 | hcmd
[ 1536.330235] iwlwifi 0000:02:00.0: 0xCE1B1D40 | isr0
[ 1536.330237] iwlwifi 0000:02:00.0: 0xCE1B1D28 | isr1
[ 1536.330239] iwlwifi 0000:02:00.0: 0xC1317768 | isr2
[ 1536.330241] iwlwifi 0000:02:00.0: 0xCE1B1D38 | isr3
[ 1536.330242] iwlwifi 0000:02:00.0: 0xF843E2DA | isr4
[ 1536.330244] iwlwifi 0000:02:00.0: 0xCE1B1D18 | isr_pref
[ 1536.330246] iwlwifi 0000:02:00.0: 0x9454C866 | wait_event
[ 1536.330248] iwlwifi 0000:02:00.0: 0xCE1B1D54 | l2p_control
[ 1536.330250] iwlwifi 0000:02:00.0: 0xF8426340 | l2p_duration
[ 1536.330252] iwlwifi 0000:02:00.0: 0xF533E064 | l2p_mhvalid
[ 1536.330253] iwlwifi 0000:02:00.0: 0xF843E2DA | l2p_addr_match
[ 1536.330255] iwlwifi 0000:02:00.0: 0xCE1B1D40 | lmpm_pmg_sel
[ 1536.330256] iwlwifi 0000:02:00.0: 0xCE1B1D6C | timestamp
[ 1536.330258] iwlwifi 0000:02:00.0: 0xF895A0B1 | flow_handler
[ 1536.347419] ------------[ cut here ]------------
[ 1536.347434] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]()
[ 1536.347436] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.347476] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.347486] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.347487] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.347499] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.347501] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.347504] c15468cc 00000000 000009e2 f895c488 0000037b f893c867 0000037b f893c867
[ 1536.347507] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.347510] Call Trace:
[ 1536.347520] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.347526] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.347530] [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347533] [<f893c867>] ? iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347536] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.347539] [<f893c867>] iwl_dump_nic_event_log+0x397/0x3b0 [iwldvm]
[ 1536.347544] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.347548] [<f8426340>] ? __iwl_err+0xd0/0xe0 [iwlwifi]
[ 1536.347551] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.347555] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.347560] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.347565] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.347569] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.347573] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.347576] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.347584] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.347592] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.347600] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.347607] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.347615] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.347619] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.347621] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.347623] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.347625] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.347627] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.347629] [<c106c173>] kthread+0xb3/0xd0
[ 1536.347632] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.347634] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.347635] ---[ end trace a5b5252fd3fa22c2 ]---
[ 1536.364779] ------------[ cut here ]------------
[ 1536.364797] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]()
[ 1536.364798] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.364838] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.364848] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.364850] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.364862] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.364864] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.364867] c15468cc 00000000 000009e2 f895c488 0000037b f893c827 0000037b f893c827
[ 1536.364870] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.364874] Call Trace:
[ 1536.364882] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.364887] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.364891] [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364894] [<f893c827>] ? iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364897] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.364900] [<f893c827>] iwl_dump_nic_event_log+0x357/0x3b0 [iwldvm]
[ 1536.364904] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.364908] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.364912] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.364917] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.364922] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.364926] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.364929] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.364933] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.364941] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.364949] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.364956] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.364964] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.364972] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.364975] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.364977] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.364979] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.364981] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.364983] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.364985] [<c106c173>] kthread+0xb3/0xd0
[ 1536.364988] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.364989] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.364991] ---[ end trace a5b5252fd3fa22c3 ]---
[ 1536.382167] ------------[ cut here ]------------
[ 1536.382186] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]()
[ 1536.382187] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.382227] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.382237] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.382239] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.382251] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.382253] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.382256] c15468cc 00000000 000009e2 f895c488 0000037b f893c847 0000037b f893c847
[ 1536.382259] 00800914 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.382263] Call Trace:
[ 1536.382271] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.382277] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.382281] [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382284] [<f893c847>] ? iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382286] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.382289] [<f893c847>] iwl_dump_nic_event_log+0x377/0x3b0 [iwldvm]
[ 1536.382294] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.382298] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.382303] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.382307] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.382312] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.382316] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.382319] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.382323] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.382331] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.382339] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.382346] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.382354] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.382362] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.382365] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.382367] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.382369] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.382371] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.382373] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.382375] [<c106c173>] kthread+0xb3/0xd0
[ 1536.382378] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.382380] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.382382] ---[ end trace a5b5252fd3fa22c4 ]---
[ 1536.399578] ------------[ cut here ]------------
[ 1536.399596] WARNING: CPU: 0 PID: 2530 at drivers/net/wireless/iwlwifi/dvm/../iwl-trans.h:891 iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]()
[ 1536.399598] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1536.399638] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1536.399648] CPU: 0 PID: 2530 Comm: kworker/u8:1 Tainted: G W O 3.18.2-2-ARCH #1
[ 1536.399649] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1536.399662] Workqueue: phy0 ieee80211_beacon_connection_loss_work [mac80211]
[ 1536.399664] 00000000 9454c866 00000000 ce1b1cc0 c1474f33 00000000 ce1b1cf4 c10527f2
[ 1536.399667] c15468cc 00000000 000009e2 f895c488 0000037b f893c80c 0000037b f893c80c
[ 1536.399670] a5a5a5a5 f2c49084 f843ba80 ce1b1d04 c10528e2 00000009 00000000 ce1b1d54
[ 1536.399673] Call Trace:
[ 1536.399681] [<c1474f33>] dump_stack+0x48/0x69
[ 1536.399686] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1536.399690] [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399693] [<f893c80c>] ? iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399695] [<c10528e2>] warn_slowpath_null+0x22/0x30
[ 1536.399698] [<f893c80c>] iwl_dump_nic_event_log+0x33c/0x3b0 [iwldvm]
[ 1536.399703] [<c1317768>] ? dev_err+0x38/0x50
[ 1536.399707] [<f893c8ce>] iwl_nic_error+0x4e/0x60 [iwldvm]
[ 1536.399712] [<f842fcdc>] iwl_trans_pcie_send_hcmd+0x5bc/0x620 [iwlwifi]
[ 1536.399716] [<c108ad20>] ? __wake_up_sync+0x20/0x20
[ 1536.399721] [<f89486b1>] iwl_dvm_send_cmd+0x51/0x150 [iwldvm]
[ 1536.399725] [<f8948863>] iwlagn_txfifo_flush+0xb3/0xe0 [iwldvm]
[ 1536.399729] [<f89420d7>] iwlagn_mac_flush+0xc7/0x200 [iwldvm]
[ 1536.399732] [<f8942010>] ? iwlagn_mac_conf_tx+0x1a0/0x1a0 [iwldvm]
[ 1536.399741] [<f91d007a>] ieee80211_flush_queues+0x8a/0x1a0 [mac80211]
[ 1536.399749] [<f91e6b3a>] ieee80211_mgd_probe_ap_send+0x9a/0x150 [mac80211]
[ 1536.399756] [<f91e6706>] ? ieee80211_recalc_ps.part.19+0xb6/0x1f0 [mac80211]
[ 1536.399764] [<f91e6cda>] ieee80211_mgd_probe_ap.part.20+0xea/0x120 [mac80211]
[ 1536.399771] [<f91e72d7>] ieee80211_beacon_connection_loss_work+0x57/0x90 [mac80211]
[ 1536.399775] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1536.399777] [<c1067a63>] process_one_work+0x113/0x380
[ 1536.399780] [<c147007b>] ? netlbl_cipsov4_remove+0x2b/0xc0
[ 1536.399782] [<c1067f59>] worker_thread+0x39/0x440
[ 1536.399784] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1536.399786] [<c106c173>] kthread+0xb3/0xd0
[ 1536.399789] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1536.399791] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1536.399792] ---[ end trace a5b5252fd3fa22c5 ]---
[ 1536.399797] iwlwifi 0000:02:00.0: Log capacity -1515870811 is bogus, limit to 512 entries
[ 1536.399800] iwlwifi 0000:02:00.0: Log write index -1515870811 is bogus, limit to 512
[ 1536.399802] iwlwifi 0000:02:00.0: Start IWL Event Log Dump: display last 20 entries
[ 1536.416951] iwlwifi 0000:02:00.0: flush request fail
[ 1538.194457] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1539.990896] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1541.827348] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1543.625376] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1545.380698] ieee80211 phy0: Hardware restart was requested
[ 1545.380786] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 1e
[ 1545.380791] iwlwifi 0000:02:00.0: flush request fail
[ 1545.397083] iwlwifi 0000:02:00.0: Fw not loaded - dropping CMD: 20
[ 1545.397095] wlan0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-5)
[ 1545.397218] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[ 1545.466236] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[ 1551.100485] iwlwifi 0000:02:00.0: Failed to load firmware chunk!
[ 1551.100495] iwlwifi 0000:02:00.0: Could not load the [0] uCode section
[ 1551.100504] iwlwifi 0000:02:00.0: Failed to start RT ucode: -110
[ 1552.878783] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 0 [0x5a5a5a5a]
[ 1554.675102] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 2 [0x5a5a5a5a]
[ 1556.505200] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 5 [0x5a5a5a5a]
[ 1558.301091] iwlwifi 0000:02:00.0: Failing on timeout while stopping DMA channel 7 [0x5a5a5a5a]
[ 1558.301103] sched: RT throttling activated
[ 1560.060161] iwlwifi 0000:02:00.0: Unable to initialize device.
[ 1560.060170] ------------[ cut here ]------------
[ 1560.060197] WARNING: CPU: 2 PID: 149 at net/mac80211/util.c:1686 ieee80211_reconfig+0x12f2/0x16a0 [mac80211]()
[ 1560.060200] Hardware became unavailable during restart.
[ 1560.060202] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1560.060273] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060288] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G W O 3.18.2-2-ARCH #1
[ 1560.060291] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060303] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060305] 00000000 24cb9ba5 00000000 f4bf1e40 c1474f33 f4bf1e84 f4bf1e74 c10527f2
[ 1560.060312] f920951c f4bf1ea4 00000095 f920b4e9 00000696 f91d2512 00000696 f91d2512
[ 1560.060318] f2c48fe4 ffffff92 f4ad1900 f4bf1e90 c105284e 00000009 f4bf1e84 f920951c
[ 1560.060325] Call Trace:
[ 1560.060337] [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060345] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060362] [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060378] [<f91d2512>] ? ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060383] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060399] [<f91d2512>] ieee80211_reconfig+0x12f2/0x16a0 [mac80211]
[ 1560.060404] [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060415] [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060421] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060425] [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060429] [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060433] [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060437] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060441] [<c106c173>] kthread+0xb3/0xd0
[ 1560.060447] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060450] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060454] ---[ end trace a5b5252fd3fa22c6 ]---
[ 1560.060533] ------------[ cut here ]------------
[ 1560.060551] WARNING: CPU: 2 PID: 149 at net/mac80211/driver-ops.h:12 ieee80211_do_stop+0x872/0x890 [mac80211]()
[ 1560.060553] wlan0: Failed check-sdata-in-driver check, flags: 0x4
[ 1560.060555] Modules linked in: fuse bnep btusb bluetooth coretemp intel_powerclamp joydev mousedev kvm snd_hda_codec_hdmi crc32_pclmul crc32c_intel snd_hda_codec_conexant snd_hda_codec_generic aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support aes_i586 snd_hda_controller arc4 iwldvm thinkpad_acpi xts snd_hda_codec mac80211 lrw nvram iwlwifi snd_hwdep snd_pcm cfg80211 gf128mul snd_timer ablk_helper led_class snd hwmon ac rfkill psmouse cryptd soundcore mei_me mei serio_raw e1000e wmi intel_ips i2c_i801 shpchp thermal lpc_ich ptp pps_core tpm_tis intel_agp tpm battery evdev mac_hid sch_fq_codel cpufreq_powersave acpi_cpufreq processor vboxnetflt(O) vboxdrv(O) tp_smapi(O) thinkpad_ec(O) ext4 crc16 mbcache jbd2 sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata scsi_mod ehci
_pci ehci_hcd
[ 1560.060615] usbcore usb_common i8042 serio i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm agpgart i2c_core
[ 1560.060627] CPU: 2 PID: 149 Comm: kworker/2:2 Tainted: G W O 3.18.2-2-ARCH #1
[ 1560.060630] Hardware name: LENOVO 3680BR4/3680BR4, BIOS 6QET46WW (1.16 ) 06/07/2010
[ 1560.060640] Workqueue: events ieee80211_restart_work [mac80211]
[ 1560.060642] 00000000 24cb9ba5 00000000 f4bf1d54 c1474f33 f4bf1d98 f4bf1d88 c10527f2
[ 1560.060648] f9208e60 f4bf1db8 00000095 f920b267 0000000c f91b8e82 0000000c f91b8e82
[ 1560.060655] f2c48cd8 00000000 f40dbcf8 f4bf1da4 c105284e 00000009 f4bf1d98 f9208e60
[ 1560.060661] Call Trace:
[ 1560.060667] [<c1474f33>] dump_stack+0x48/0x69
[ 1560.060672] [<c10527f2>] warn_slowpath_common+0x82/0xa0
[ 1560.060687] [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060701] [<f91b8e82>] ? ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060705] [<c105284e>] warn_slowpath_fmt+0x3e/0x60
[ 1560.060720] [<f91b8e82>] ieee80211_do_stop+0x872/0x890 [mac80211]
[ 1560.060727] [<c13b8699>] ? dev_deactivate_many+0x1a9/0x1f0
[ 1560.060741] [<f91b8eb7>] ieee80211_stop+0x17/0x20 [mac80211]
[ 1560.060748] [<c1395059>] __dev_close_many+0x79/0xe0
[ 1560.060752] [<c139512d>] dev_close_many+0x6d/0xf0
[ 1560.060757] [<c1398c90>] dev_close.part.77+0x30/0x50
[ 1560.060761] [<c1398cc6>] dev_close+0x16/0x20
[ 1560.060772] [<f85627b5>] cfg80211_shutdown_all_interfaces+0x45/0xb0 [cfg80211]
[ 1560.060776] [<c105284e>] ? warn_slowpath_fmt+0x3e/0x60
[ 1560.060793] [<f91d14ec>] ieee80211_reconfig+0x2cc/0x16a0 [mac80211]
[ 1560.060798] [<c1477bd4>] ? __mutex_lock_slowpath+0x34/0x120
[ 1560.060809] [<f91a42ed>] ieee80211_restart_work+0x3d/0x80 [mac80211]
[ 1560.060813] [<c1067580>] ? pwq_dec_nr_in_flight+0x40/0x90
[ 1560.060817] [<c1067a63>] process_one_work+0x113/0x380
[ 1560.060821] [<c14767d6>] ? preempt_schedule+0x36/0x50
[ 1560.060825] [<c1067f59>] worker_thread+0x39/0x440
[ 1560.060829] [<c1067f20>] ? init_pwq.part.30+0x10/0x10
[ 1560.060832] [<c106c173>] kthread+0xb3/0xd0
[ 1560.060837] [<c1479bc1>] ret_from_kernel_thread+0x21/0x30
[ 1560.060840] [<c106c0c0>] ? kthread_create_on_node+0x130/0x130
[ 1560.060843] ---[ end trace a5b5252fd3fa22c7 ]---
[ 1560.061547] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1560.062625] cfg80211: Calling CRDA to update world regulatory domain
^ permalink raw reply
* Re: [PATCH bluetooth-next v2] ieee802154: fix netns settings
From: Alexander Aring @ 2015-01-28 20:36 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev, davem, linux-wpan, marcel
In-Reply-To: <1422457112-4377-1-git-send-email-nicolas.dichtel@6wind.com>
On Wed, Jan 28, 2015 at 03:58:32PM +0100, Nicolas Dichtel wrote:
> 6LoWPAN currently doesn't supports x-netns and works only in init_net.
>
> With this patch, we ensure that:
> - the wpan interface cannot be moved to another netns;
> - the 6lowpan interface cannot be moved to another netns;
> - the wpan interface is in the same netns than the 6lowpan interface;
> - the 6lowpan interface is in init_net.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Marcel, can you please queue this for bluetooth-next?
Thanks.
- Alex
^ permalink raw reply
* Re: [PATCH] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
From: roopa @ 2015-01-28 13:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev, stephen, rami.rosen
In-Reply-To: <20150127.230511.1131199235284204820.davem@davemloft.net>
On 1/27/15, 11:05 PM, David Miller wrote:
> From: roopa@cumulusnetworks.com
> Date: Tue, 27 Jan 2015 21:46:24 -0800
>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081
>>
>> This patch avoids calling rtnl_notify if the device ndo_bridge_getlink
>> handler does not return any bytes in the skb.
>>
>> Alternately, the skb->len check can be moved inside rtnl_notify.
>>
>> For the bridge vlan case described in 92081, there is also a fix needed
>> in bridge driver to generate a proper notification. Will fix that in
>> subsequent patch.
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> This doesn't apply to the 'net' tree, is there something I missed?
sorry, that's me. This should be net-next. Resubmitting with net-next in
the PATCH line.
thanks.
^ permalink raw reply
* Re: [PATCH net] net: ipv6: allow explicitly choosing optimistic addresses
From: Erik Kline @ 2015-01-28 12:03 UTC (permalink / raw)
To: Hannes Frederic Sowa; +Cc: netdev, David Miller
In-Reply-To: <1422189993.2148036.218504993.339586EE@webmail.messagingengine.com>
On Sun, Jan 25, 2015 at 9:46 PM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> Hi,
>
> On Wed, Jan 21, 2015, at 08:02, Erik Kline wrote:
>> if (ipv6_addr_equal(&ifp->addr, addr) &&
>> - !(ifp->flags&IFA_F_TENTATIVE) &&
>> + (!(ifp->flags&IFA_F_TENTATIVE) ||
>> + ifp->flags&IFA_F_OPTIMISTIC) &&
>> + !(ifp->flags&banned_flags) &&
>> (dev == NULL || ifp->idev->dev == dev ||
>
> Can the wrapper take the IFA_F_TENTATIVE and IFA_F_OPTIMISTIC into the
> banned_flags argument, so this condition becomes easier to read? The new
> caller could also specify them verbatim. I think it would improve
> readability.
So I did a bit of fiddling (and some fiddling of bits) and I've got a
working version with your suggestion.
Note that because we use 2 flags to represent optimistic state we
still have a bit of complication in order to check whether or not
optimistic is explicitly banned or not (as opposed to accidentally
banned by virtue of its pairing with tentative).
Thanks,
-Erik
^ permalink raw reply
* [PATCH] net: remove sock_iocb
From: Christoph Hellwig @ 2015-01-28 17:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
The sock_iocb structure is allocate on stack for each read/write-like
operation on sockets, and contains various fields of which only the
embedded msghdr and sometimes a pointer to the scm_cookie is ever used.
Get rid of the sock_iocb and put a msghdr directly on the stack and pass
the scm_cookie explicitly to netlink_mmap_sendmsg.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/net/sock.h | 23 ---------------
net/netlink/af_netlink.c | 28 +++++++------------
net/socket.c | 45 +++--------------------------
net/unix/af_unix.c | 73 +++++++++++++++++++-----------------------------
4 files changed, 43 insertions(+), 126 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index 2210fec..1534149 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1374,29 +1374,6 @@ void sk_prot_clear_portaddr_nulls(struct sock *sk, int size);
#define SOCK_BINDADDR_LOCK 4
#define SOCK_BINDPORT_LOCK 8
-/* sock_iocb: used to kick off async processing of socket ios */
-struct sock_iocb {
- struct list_head list;
-
- int flags;
- int size;
- struct socket *sock;
- struct sock *sk;
- struct scm_cookie *scm;
- struct msghdr *msg, async_msg;
- struct kiocb *kiocb;
-};
-
-static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb)
-{
- return (struct sock_iocb *)iocb->private;
-}
-
-static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
-{
- return si->kiocb;
-}
-
struct socket_alloc {
struct socket socket;
struct inode vfs_inode;
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 02fdde2..efae751 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -708,7 +708,7 @@ static void netlink_ring_setup_skb(struct sk_buff *skb, struct sock *sk,
static int netlink_mmap_sendmsg(struct sock *sk, struct msghdr *msg,
u32 dst_portid, u32 dst_group,
- struct sock_iocb *siocb)
+ struct scm_cookie *scm)
{
struct netlink_sock *nlk = nlk_sk(sk);
struct netlink_ring *ring;
@@ -754,7 +754,7 @@ static int netlink_mmap_sendmsg(struct sock *sk, struct msghdr *msg,
NETLINK_CB(skb).portid = nlk->portid;
NETLINK_CB(skb).dst_group = dst_group;
- NETLINK_CB(skb).creds = siocb->scm->creds;
+ NETLINK_CB(skb).creds = scm->creds;
err = security_netlink_send(sk, skb);
if (err) {
@@ -833,7 +833,7 @@ static void netlink_ring_set_copied(struct sock *sk, struct sk_buff *skb)
#define netlink_tx_is_mmaped(sk) false
#define netlink_mmap sock_no_mmap
#define netlink_poll datagram_poll
-#define netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group, siocb) 0
+#define netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group, scm) 0
#endif /* CONFIG_NETLINK_MMAP */
static void netlink_skb_destructor(struct sk_buff *skb)
@@ -2259,7 +2259,6 @@ static void netlink_cmsg_recv_pktinfo(struct msghdr *msg, struct sk_buff *skb)
static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
- struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_nl *, addr, msg->msg_name);
@@ -2273,10 +2272,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (msg->msg_flags&MSG_OOB)
return -EOPNOTSUPP;
- if (NULL == siocb->scm)
- siocb->scm = &scm;
-
- err = scm_send(sock, msg, siocb->scm, true);
+ err = scm_send(sock, msg, &scm, true);
if (err < 0)
return err;
@@ -2305,7 +2301,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (netlink_tx_is_mmaped(sk) &&
msg->msg_iter.iov->iov_base == NULL) {
err = netlink_mmap_sendmsg(sk, msg, dst_portid, dst_group,
- siocb);
+ &scm);
goto out;
}
@@ -2319,7 +2315,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
NETLINK_CB(skb).portid = nlk->portid;
NETLINK_CB(skb).dst_group = dst_group;
- NETLINK_CB(skb).creds = siocb->scm->creds;
+ NETLINK_CB(skb).creds = scm.creds;
NETLINK_CB(skb).flags = netlink_skb_flags;
err = -EFAULT;
@@ -2341,7 +2337,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
err = netlink_unicast(sk, skb, dst_portid, msg->msg_flags&MSG_DONTWAIT);
out:
- scm_destroy(siocb->scm);
+ scm_destroy(&scm);
return err;
}
@@ -2349,7 +2345,6 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len,
int flags)
{
- struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct scm_cookie scm;
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
@@ -2412,11 +2407,8 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
if (nlk->flags & NETLINK_RECV_PKTINFO)
netlink_cmsg_recv_pktinfo(msg, skb);
- if (NULL == siocb->scm) {
- memset(&scm, 0, sizeof(scm));
- siocb->scm = &scm;
- }
- siocb->scm->creds = *NETLINK_CREDS(skb);
+ memset(&scm, 0, sizeof(scm));
+ scm.creds = *NETLINK_CREDS(skb);
if (flags & MSG_TRUNC)
copied = data_skb->len;
@@ -2431,7 +2423,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
}
}
- scm_recv(sock, msg, siocb->scm, flags);
+ scm_recv(sock, msg, &scm, flags);
out:
netlink_rcv_wake(sk);
return err ? : copied;
diff --git a/net/socket.c b/net/socket.c
index 418795c..748a8f5 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -613,13 +613,6 @@ EXPORT_SYMBOL(__sock_tx_timestamp);
static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size)
{
- struct sock_iocb *si = kiocb_to_siocb(iocb);
-
- si->sock = sock;
- si->scm = NULL;
- si->msg = msg;
- si->size = size;
-
return sock->ops->sendmsg(iocb, sock, msg, size);
}
@@ -635,11 +628,9 @@ static int do_sock_sendmsg(struct socket *sock, struct msghdr *msg,
size_t size, bool nosec)
{
struct kiocb iocb;
- struct sock_iocb siocb;
int ret;
init_sync_kiocb(&iocb, NULL);
- iocb.private = &siocb;
ret = nosec ? __sock_sendmsg_nosec(&iocb, sock, msg, size) :
__sock_sendmsg(&iocb, sock, msg, size);
if (-EIOCBQUEUED == ret)
@@ -756,14 +747,6 @@ EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops);
static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size, int flags)
{
- struct sock_iocb *si = kiocb_to_siocb(iocb);
-
- si->sock = sock;
- si->scm = NULL;
- si->msg = msg;
- si->size = size;
- si->flags = flags;
-
return sock->ops->recvmsg(iocb, sock, msg, size, flags);
}
@@ -779,11 +762,9 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
size_t size, int flags)
{
struct kiocb iocb;
- struct sock_iocb siocb;
int ret;
init_sync_kiocb(&iocb, NULL);
- iocb.private = &siocb;
ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&iocb);
@@ -795,11 +776,9 @@ static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
size_t size, int flags)
{
struct kiocb iocb;
- struct sock_iocb siocb;
int ret;
init_sync_kiocb(&iocb, NULL);
- iocb.private = &siocb;
ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags);
if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&iocb);
@@ -866,14 +845,6 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
return sock->ops->splice_read(sock, ppos, pipe, len, flags);
}
-static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb,
- struct sock_iocb *siocb)
-{
- siocb->kiocb = iocb;
- iocb->private = siocb;
- return siocb;
-}
-
static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb,
struct file *file, const struct iovec *iov,
unsigned long nr_segs)
@@ -898,7 +869,7 @@ static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb,
static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
- struct sock_iocb siocb, *x;
+ struct msghdr msg;
if (pos != 0)
return -ESPIPE;
@@ -906,11 +877,7 @@ static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */
return 0;
-
- x = alloc_sock_iocb(iocb, &siocb);
- if (!x)
- return -ENOMEM;
- return do_sock_read(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs);
+ return do_sock_read(&msg, iocb, iocb->ki_filp, iov, nr_segs);
}
static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb,
@@ -939,16 +906,12 @@ static ssize_t do_sock_write(struct msghdr *msg, struct kiocb *iocb,
static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
- struct sock_iocb siocb, *x;
+ struct msghdr msg;
if (pos != 0)
return -ESPIPE;
- x = alloc_sock_iocb(iocb, &siocb);
- if (!x)
- return -ENOMEM;
-
- return do_sock_write(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs);
+ return do_sock_write(&msg, iocb, iocb->ki_filp, iov, nr_segs);
}
/*
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 8e1b102..526b6ed 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1445,7 +1445,6 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
- struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk;
struct net *net = sock_net(sk);
struct unix_sock *u = unix_sk(sk);
@@ -1456,14 +1455,12 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
unsigned int hash;
struct sk_buff *skb;
long timeo;
- struct scm_cookie tmp_scm;
+ struct scm_cookie scm;
int max_level;
int data_len = 0;
- if (NULL == siocb->scm)
- siocb->scm = &tmp_scm;
wait_for_unix_gc();
- err = scm_send(sock, msg, siocb->scm, false);
+ err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
@@ -1507,11 +1504,11 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (skb == NULL)
goto out;
- err = unix_scm_to_skb(siocb->scm, skb, true);
+ err = unix_scm_to_skb(&scm, skb, true);
if (err < 0)
goto out_free;
max_level = err + 1;
- unix_get_secdata(siocb->scm, skb);
+ unix_get_secdata(&scm, skb);
skb_put(skb, len - data_len);
skb->data_len = data_len;
@@ -1606,7 +1603,7 @@ restart:
unix_state_unlock(other);
other->sk_data_ready(other);
sock_put(other);
- scm_destroy(siocb->scm);
+ scm_destroy(&scm);
return len;
out_unlock:
@@ -1616,7 +1613,7 @@ out_free:
out:
if (other)
sock_put(other);
- scm_destroy(siocb->scm);
+ scm_destroy(&scm);
return err;
}
@@ -1628,21 +1625,18 @@ out:
static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
- struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk;
struct sock *other = NULL;
int err, size;
struct sk_buff *skb;
int sent = 0;
- struct scm_cookie tmp_scm;
+ struct scm_cookie scm;
bool fds_sent = false;
int max_level;
int data_len;
- if (NULL == siocb->scm)
- siocb->scm = &tmp_scm;
wait_for_unix_gc();
- err = scm_send(sock, msg, siocb->scm, false);
+ err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
@@ -1683,7 +1677,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
goto out_err;
/* Only send the fds in the first buffer */
- err = unix_scm_to_skb(siocb->scm, skb, !fds_sent);
+ err = unix_scm_to_skb(&scm, skb, !fds_sent);
if (err < 0) {
kfree_skb(skb);
goto out_err;
@@ -1715,8 +1709,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
sent += size;
}
- scm_destroy(siocb->scm);
- siocb->scm = NULL;
+ scm_destroy(&scm);
return sent;
@@ -1728,8 +1721,7 @@ pipe_err:
send_sig(SIGPIPE, current, 0);
err = -EPIPE;
out_err:
- scm_destroy(siocb->scm);
- siocb->scm = NULL;
+ scm_destroy(&scm);
return sent ? : err;
}
@@ -1778,8 +1770,7 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size,
int flags)
{
- struct sock_iocb *siocb = kiocb_to_siocb(iocb);
- struct scm_cookie tmp_scm;
+ struct scm_cookie scm;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
int noblock = flags & MSG_DONTWAIT;
@@ -1831,16 +1822,14 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
if (sock_flag(sk, SOCK_RCVTSTAMP))
__sock_recv_timestamp(msg, sk, skb);
- if (!siocb->scm) {
- siocb->scm = &tmp_scm;
- memset(&tmp_scm, 0, sizeof(tmp_scm));
- }
- scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
- unix_set_secdata(siocb->scm, skb);
+ memset(&scm, 0, sizeof(scm));
+
+ scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
+ unix_set_secdata(&scm, skb);
if (!(flags & MSG_PEEK)) {
if (UNIXCB(skb).fp)
- unix_detach_fds(siocb->scm, skb);
+ unix_detach_fds(&scm, skb);
sk_peek_offset_bwd(sk, skb->len);
} else {
@@ -1860,11 +1849,11 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
sk_peek_offset_fwd(sk, size);
if (UNIXCB(skb).fp)
- siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+ scm.fp = scm_fp_dup(UNIXCB(skb).fp);
}
err = (flags & MSG_TRUNC) ? skb->len - skip : size;
- scm_recv(sock, msg, siocb->scm, flags);
+ scm_recv(sock, msg, &scm, flags);
out_free:
skb_free_datagram(sk, skb);
@@ -1915,8 +1904,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size,
int flags)
{
- struct sock_iocb *siocb = kiocb_to_siocb(iocb);
- struct scm_cookie tmp_scm;
+ struct scm_cookie scm;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, msg->msg_name);
@@ -1943,10 +1931,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
* while sleeps in memcpy_tomsg
*/
- if (!siocb->scm) {
- siocb->scm = &tmp_scm;
- memset(&tmp_scm, 0, sizeof(tmp_scm));
- }
+ memset(&scm, 0, sizeof(scm));
err = mutex_lock_interruptible(&u->readlock);
if (unlikely(err)) {
@@ -2012,13 +1997,13 @@ again:
if (check_creds) {
/* Never glue messages from different writers */
- if ((UNIXCB(skb).pid != siocb->scm->pid) ||
- !uid_eq(UNIXCB(skb).uid, siocb->scm->creds.uid) ||
- !gid_eq(UNIXCB(skb).gid, siocb->scm->creds.gid))
+ if ((UNIXCB(skb).pid != scm.pid) ||
+ !uid_eq(UNIXCB(skb).uid, scm.creds.uid) ||
+ !gid_eq(UNIXCB(skb).gid, scm.creds.gid))
break;
} else if (test_bit(SOCK_PASSCRED, &sock->flags)) {
/* Copy credentials */
- scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
+ scm_set_cred(&scm, UNIXCB(skb).pid, UNIXCB(skb).uid, UNIXCB(skb).gid);
check_creds = 1;
}
@@ -2045,7 +2030,7 @@ again:
sk_peek_offset_bwd(sk, chunk);
if (UNIXCB(skb).fp)
- unix_detach_fds(siocb->scm, skb);
+ unix_detach_fds(&scm, skb);
if (unix_skb_len(skb))
break;
@@ -2053,13 +2038,13 @@ again:
skb_unlink(skb, &sk->sk_receive_queue);
consume_skb(skb);
- if (siocb->scm->fp)
+ if (scm.fp)
break;
} else {
/* It is questionable, see note in unix_dgram_recvmsg.
*/
if (UNIXCB(skb).fp)
- siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+ scm.fp = scm_fp_dup(UNIXCB(skb).fp);
sk_peek_offset_fwd(sk, chunk);
@@ -2068,7 +2053,7 @@ again:
} while (size);
mutex_unlock(&u->readlock);
- scm_recv(sock, msg, siocb->scm, flags);
+ scm_recv(sock, msg, &scm, flags);
out:
return copied ? : err;
}
--
1.9.1
^ permalink raw reply related
* [PATCH RFC 2/2] ipv6: Extend the route lookups to low priority metrics.
From: Steffen Klassert @ 2015-01-28 12:12 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <20150128121026.GM13046@secunet.com>
We search only for routes with highest prioriy metric in
find_rr_leaf(). However if one of these routes is marked
as invalid, we may fail to find a route even if there is
a appropriate route with lower priority. Then we loose
connectivity until the garbage collector deletes the
invalid route. This typically happens if a host route
expires afer a pmtu event. Fix this by searching also
for routes with a lower priority metric.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv6/route.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 3e864e7..ce354c9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -654,15 +654,33 @@ static struct rt6_info *find_rr_leaf(struct fib6_node *fn,
u32 metric, int oif, int strict,
bool *do_rr)
{
- struct rt6_info *rt, *match;
+ struct rt6_info *rt, *match, *cont;
int mpri = -1;
match = NULL;
- for (rt = rr_head; rt && rt->rt6i_metric == metric;
- rt = rt->dst.rt6_next)
+ cont = NULL;
+ for (rt = rr_head; rt; rt = rt->dst.rt6_next) {
+ if (rt->rt6i_metric != metric) {
+ cont = rt;
+ break;
+ }
+
+ match = find_match(rt, oif, strict, &mpri, match, do_rr);
+ }
+
+ for (rt = fn->leaf; rt && rt != rr_head; rt = rt->dst.rt6_next) {
+ if (rt->rt6i_metric != metric) {
+ cont = rt;
+ break;
+ }
+
match = find_match(rt, oif, strict, &mpri, match, do_rr);
- for (rt = fn->leaf; rt && rt != rr_head && rt->rt6i_metric == metric;
- rt = rt->dst.rt6_next)
+ }
+
+ if (match || !cont)
+ return match;
+
+ for (rt = cont; rt; rt = rt->dst.rt6_next)
match = find_match(rt, oif, strict, &mpri, match, do_rr);
return match;
--
1.9.1
^ permalink raw reply related
* [PATCH RFC 1/2] ipv6: Fix after pmtu events dissapearing host routes
From: Steffen Klassert @ 2015-01-28 12:11 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <20150128121026.GM13046@secunet.com>
We currently don't clone host routes before we use them.
If a pmtu event is received on such a route, it gets
an expires value. As soon as the expiration time is
elapsed, the route is deleted. As a result, the host
is not reachable any more.
We fix this by cloning host routes if they are gatewayed,
i.e. if pmtu events can happen.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c910831..3e864e7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -961,7 +961,7 @@ redo_rt6_select:
if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
- else if (!(rt->dst.flags & DST_HOST))
+ else if (!(rt->dst.flags & DST_HOST) || (rt->rt6i_flags & RTF_GATEWAY))
nrt = rt6_alloc_clone(rt, &fl6->daddr);
else
goto out2;
--
1.9.1
^ permalink raw reply related
* Re: A problem about ICMP packet-too-big message handler
From: Steffen Klassert @ 2015-01-28 12:10 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, David S. Miller
In-Reply-To: <54C78B8D.1070104@huawei.com>
On Tue, Jan 27, 2015 at 08:58:53PM +0800, Yang Yingliang wrote:
> Hi,
>
> My kernel is 3.10 LTS.
>
> I got a problem here about handling ICMP packet-too-big message.
>
> Before sending a packet-too-big packet :
>
> # ip -6 route list table local
> local ::1 dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80::1 dev lo metric 0 //It does not have expire value
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:2 dev lo metric 0
> local fe80::5054:ff:fe12:3456 dev lo metric 0
>
>
> After sending a packet-too-big packet
>
> ip -6 route list table local
> local ::1 dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80:: dev lo metric 0
> local fe80::1 dev lo metric 0 expires _597_ //It has expire value
Is this route still present after the expiration time is elapsed?
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:0 dev lo metric 0
> local fe80::200:ff:fe00:2 dev lo metric 0
> local fe80::5054:ff:fe12:3456 dev lo metric 0
>
> When time is up, I can't ping fe80::1 .
> Is it ok or a bug ?
This looks pretty similar to a bug I discovered recently.
In my case, a ipv6 host route dissapeared 10 minutes after
a PMTU event. As a result, this host was not reachable
anymore.
This happens because we don't clone host routes before
we use them. If a PMTU event happens, the original route
is marked with an expire value. After the expiration time
is elapsed, the original route is deleted and we loose
conectivity to the host.
I'm currently testing patches to fix this. With these
patches the ipv6 host routes are cloned if they are
gateway routes, i.e. if PMTU events can happen.
I fear it will not fix your case because PMTU events are
not expected to happen at local fe80 routes. But you could
change patch 1 to unconditionally clone the routes, if
you want to check if this is your problem.
I'll sent the fixes marked as RFC in reply to this mail.
^ permalink raw reply
* [PATCH net-next] net: gianfar: remove the unneeded check of disabled device
From: Kevin Hao @ 2015-01-28 12:06 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Claudiu Manoil
Since commit cd1e65044d44 ("of/device: Don't register disabled
devices"), the disabled device will not be registered at all. So we
don't need to do the check again in the platform device driver.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
drivers/net/ethernet/freescale/gianfar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 93ff846e96f1..43df78882e48 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -764,7 +764,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
u32 *tx_queues, *rx_queues;
unsigned short mode, poll_mode;
- if (!np || !of_device_is_available(np))
+ if (!np)
return -ENODEV;
if (of_device_is_compatible(np, "fsl,etsec2")) {
--
1.9.3
^ permalink raw reply related
* [RFC] net: tcp: null pointer crash in __inet_put_port
From: Harout Hedeshian @ 2015-01-28 15:56 UTC (permalink / raw)
To: netdev; +Cc: Harout Hedeshian
Hello,
We are observing a crash in __inet_put_port() wherein icsk_bind_hash
is null (stack trace below).
net/ipv4/inet_hashtables.c:
tb = inet_csk(sk)->icsk_bind_hash;
__sk_del_bind_node(sk);
tb->num_owners--; <-- tb is unconditionally dereferenced here
>From the RAM dumps: [D:0xFFFFFFC0222FB6F8] icsk_bind_hash = 0x0 = ,
The caller of inet_put_port() in this case is tcp_set_state() which
already does a null check on this particular field before calling
inet_put_port().
net/ipv4/tcp.c:
if (inet_csk(sk)->icsk_bind_hash &&
!(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
inet_put_port(sk);
It seems that inet_put_port() does some locking by disabling bottom
halves, but this locking is happening after the null check.
Additionally, I see tcp_v4_destroy_sock() also calling inet_put_port()
after doing a similar null check. However, I am unsure if it would
ever be called on the same socket.
Does the proposed solution of locking the bottom halves from
tcp_set_state() make any sense here? Or use some other locking mechanism
directly on the socket?
[66356.767342] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[66356.767366] pgd = ffffffc0409cb000
[66356.767377] [00000010] *pgd=00000000409c9003, *pmd=0000000000000000
[66356.767397] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[66356.767409] Modules linked in: ecryptfs(O) texfat(PO) mcKernelApi mcDrvModule moc_crypto_api_tmpl(O) moc_crypto(PO) moc_platform_mod(O)
[66356.767453] CPU: 0 PID: 3735 Comm: GCMReader Tainted: P W O 3.10.49-g0d75018 #1
[66356.767467] task: ffffffc03a790ac0 ti: ffffffc02b1d0000 task.ti: ffffffc02b1d0000
[66356.767486] PC is at inet_put_port+0x7c/0xb4
[66356.767498] LR is at inet_put_port+0x64/0xb4
[66356.767509] pc : [<ffffffc000ba3890>] lr : [<ffffffc000ba3878>] pstate: 80000145
[66356.767520] sp : ffffffc02b1d3d00
[66356.767530] x29: ffffffc02b1d3d00 x28: ffffffc02b1d0000
[66356.767544] x27: ffffffc0016cf000 x26: 0000000000000039
[66356.767557] x25: ffffffc055644030 x24: ffffffc026280f10
[66356.767570] x23: ffffffc055644030 x22: ffffffc0222fb398
[66356.767583] x21: ffffffc001b2f4c0 x20: ffffffc0222fb300
[66356.767597] x19: ffffffc0b50b7780 x18: 0000007f8399b000
[66356.767610] x17: 0000007f869e00f8 x16: ffffffc0002fb850
[66356.767624] x15: 0000007f83a4c000 x14: 0000000000000000
[66356.767637] x13: 0000000000430000 x12: 0000000000550000
[66356.767651] x11: 0000000000430000 x10: 0000000000000000
[66356.767663] x9 : b36a52a36930d612 x8 : 0008e12c614dea00
[66356.767676] x7 : 0000000000000018 x6 : 0000000034155555
[66356.767689] x5 : 0000000000000000 x4 : 0000000000000000
[66356.767702] x3 : 0000000000000200 x2 : ffffffc002c17de8
[66356.767715] x1 : 0000000000000000 x0 : 0000000000000000
[66356.767727]
[66356.767739] Process GCMReader (pid: 3735, stack limit = 0xffffffc02b1d0058)
[66356.767749] Call trace:
[66356.767762] [<ffffffc000ba3890>] inet_put_port+0x7c/0xb4
[66356.767777] [<ffffffc000ba6940>] tcp_set_state+0xbc/0x108
[66356.767790] [<ffffffc000baa78c>] tcp_close+0x374/0x420
[66356.767807] [<ffffffc000bca210>] inet_release+0x84/0x98
[66356.767821] [<ffffffc000bfd0d8>] inet6_release+0x34/0x44
[66356.767838] [<ffffffc000b22b38>] sock_release+0x34/0xac
[66356.767852] [<ffffffc000b22bbc>] sock_close+0xc/0x1c
[66356.767868] [<ffffffc0002fd718>] __fput+0x108/0x208
[66356.767882] [<ffffffc0002fd8c0>] ____fput+0x8/0x14
[66356.767898] [<ffffffc00023b8d4>] task_work_run+0xb0/0xe4
[66356.767914] [<ffffffc0002072ec>] do_notify_resume+0x44/0x54
[66356.767929] Code: f941fe81 f9000040 b4000040 f9000402 (b9401020)
[66356.767942] ---[ end trace 421040d8ca7bbe73 ]---
---
net/ipv4/tcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 3075723..f3b5714 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1910,9 +1910,11 @@ void tcp_set_state(struct sock *sk, int state)
TCP_INC_STATS(sock_net(sk), TCP_MIB_ESTABRESETS);
sk->sk_prot->unhash(sk);
+ local_bh_disable();
if (inet_csk(sk)->icsk_bind_hash &&
!(sk->sk_userlocks & SOCK_BINDPORT_LOCK))
inet_put_port(sk);
+ local_bh_enable();
/* fall through */
default:
if (oldstate == TCP_ESTABLISHED)
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
^ permalink raw reply related
* Re: [PATCH net-next v8 0/4] net: Add Keystone NetCP ethernet driver support
From: Murali Karicheri @ 2015-01-28 20:43 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: David Miller, devicetree, linux-kernel, netdev
In-Reply-To: <54C92878.3030207@ti.com>
On 01/28/2015 01:20 PM, Murali Karicheri wrote:
> On 01/28/2015 12:43 PM, Murali Karicheri wrote:
>> On 01/28/2015 11:49 AM, Murali Karicheri wrote:
>>> On 01/27/2015 05:28 PM, Arnd Bergmann wrote:
>>>> On Tuesday 20 January 2015 10:53:36 Murali Karicheri wrote:
>>>>> On 01/19/2015 03:11 PM, David Miller wrote:
>>>>>> From: Murali Karicheri<m-karicheri2@ti.com>
>>>>>> Date: Thu, 15 Jan 2015 19:10:03 -0500
>>>>>>
>>>>>>> The Network Coprocessor (NetCP) is a hardware accelerator that
>>>>>>> processes
>>>>>>> Ethernet packets. NetCP has a gigabit Ethernet (GbE) subsystem with
>>>>>>> a ethernet
>>>>>>> switch sub-module to send and receive packets. NetCP also includes
>>>>>>> a packet
>>>>>>> accelerator (PA) module to perform packet classification operations
>>>>>>> such as
>>>>>>> header matching, and packet modification operations such as checksum
>>>>>>> generation. NetCP can also optionally include a Security
>>>>>>> Accelerator(SA)
>>>>>>> capable of performing IPSec operations on ingress/egress packets.
>>>>>>>
>>>>>>> Keystone SoC's also have a 10 Gigabit Ethernet Subsystem (XGbE)
>>>>>>> which
>>>>>>> includes a 3-port Ethernet switch sub-module capable of 10Gb/s and
>>>>>>> 1Gb/s rates per Ethernet port.
>>>>>>>
>>>>>>> Both GBE and XGBE network processors supported using common
>>>>>>> driver. It
>>>>>>> is also designed to handle future variants of NetCP.
>>>>>>
>>>>>> Series applied to net-next, thanks.
>>>>> David,
>>>>>
>>>>> Thanks a lot for applying this series. This helps us move forward to
>>>>> work on the next set of patches.
>>>>
>>>> Hi Murali,
>>>>
>>>> Building an ARM 'allmodconfig' kernel now runs into two separate
>>>> problems
>>>> from your driver:
>>>>
>>>> - you have two module_init() instances in one module, which conflict.
>>>>
>>>> - you have two files that are linked into more than one module, so
>>>> building
>>>> both TI_CPSW and TI_KEYSTONE_NETCP in the same kernel fails.
>>>>
>>>> The answer to both of these is probably to have separate loadable
>>>> modules,
>>>> but you might be able to come up with a different solution.
>>> Arnd,
>>>
>>> Thanks for letting us know. We will look into this.
>>>
>>> How do I reproduce this? Is there a defconfig used for allmodconfig? I
>>> am unable to find one. Any details to reproduce this will be useful.
>>>
>> Ok I think I found it.
>>
>> I did this with next-next branch and it seems to work. I will make
>> kernel build to reproduce this.
>>
>> make ARCH=arm allmodconfig
>> make uImage;
>>
>> I am building it now.
> Arnd,
>
> I see allmodconfig configure NetCP driver as module. My uImage build
> from net-next branch went through fine. I am building modules right now
> and should show error as you have pointed out. Let me know if you any
> issues on how I am working to reproduce the issue (wrong branch, wrong
> /incomplete commands etc. I have my CROSS_COMPILE and ARCH set in my
> env). Want to reproduce this so as to make sure my fix is addressing
> this. Hope I am on the right track.
Reproduced this. Following errors seen when building the modules.
LD [M] drivers/net/ethernet/ti/keystone_netcp.o
drivers/net/ethernet/ti/netcp_ethss.o: In function `init_module':
netcp_ethss.c:(.init.text+0x0): multiple definition of `init_module'
drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.init.text+0x0):
first defined here
drivers/net/ethernet/ti/netcp_ethss.o: In function `cleanup_module':
netcp_ethss.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/net/ethernet/ti/netcp_core.o:netcp_core.c:(.exit.text+0x0):
first defined here
make[4]: *** [drivers/net/ethernet/ti/keystone_netcp.o] Error 1
BTW, I had to disable cpsw_ale.c to get to build keystone NetCP. I am
assuming someone from TI is addressing this.
drivers/net/ethernet/ti/cpsw_ale.c: In function ‘cpsw_ale_start’:
drivers/net/ethernet/ti/cpsw_ale.c:759:2: error: ‘KBUILD_MODNAME’
undeclared (first use in this function)
drivers/net/ethernet/ti/cpsw_ale.c:759:2: note: each undeclared
identifier is reported only once for each function it appears in
Murali
>
> Thanks
>
> Murali
>>
>> Murali
>>> Thanks.
>>>
>>> Murali
>>>>
>>>> Arnd
>>>
>>>
>>
>>
>
>
--
Murali Karicheri
Linux Kernel, Texas Instruments
^ permalink raw reply
* Re: [PATCH v2 linux-trace 4/8] samples: bpf: simple tracing example in C
From: Arnaldo Carvalho de Melo @ 2015-01-28 20:44 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Steven Rostedt, Ingo Molnar, Namhyung Kim, Jiri Olsa,
Masami Hiramatsu, Linux API, Network Development, LKML
In-Reply-To: <CAMEtUuxRXEPOaX3rksqQKdz4THMmtLR3=uHymEKaMSNkjMBhxw@mail.gmail.com>
Em Wed, Jan 28, 2015 at 08:42:29AM -0800, Alexei Starovoitov escreveu:
> On Wed, Jan 28, 2015 at 8:25 AM, Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> > Em Wed, Jan 28, 2015 at 01:24:15PM -0300, Arnaldo Carvalho de Melo escreveu:
> >> Em Tue, Jan 27, 2015 at 08:06:09PM -0800, Alexei Starovoitov escreveu:
> >> > + if (bpf_memcmp(dev->name, devname, 2) == 0)
> >> I'm only starting to look at all this, so bear with me... But why do we
> >> need to have it as "bpf_memcmp"? Can't we simply use it as "memcmp" and
> >> have it use the right function?
> >> Less typing, perhaps we would need to have a:
> >> #define memcmp bpf_memcmp(s1, s2, n) bpf_memcmp(s1, s2, n)
> > Argh, like this:
> > #define memcmp(s1, s2, n) bpf_memcmp(s1, s2, n)
> >> in bpf_helpers.h to have it work?
> yes, that will work just fine.
> Since it's an example I made it explicit that bpf_memcmp()
> has memcmp() semantics, but little bit different:
> int bpf_memcmp(void *unsafe_ptr, void *safe_ptr, int size)
Not knowing about the safe/unsafe pointers (at this point in my
conceptual eBPF learning process), I would think that it would be easier
to understand if it would reuse another well known idiom:
#define memcmp_from_user(kernel, user, n) bpf_memcmp(user, kernel, n)
That would be similar to:
copy_from_user(void *to, const void __user *from, unsigned long n)
But here, again bear with me, I'm just brainstorming, as from just
looking at:
bpf_memcmp(a, b, n)
I don't reuse anything I've learned before trying to understand eBPF,
not I see any well known marker (__user) that would help me understand
that that pointer needs special treatment/belongs to a different "domain".
> meaning that one of the pointers can point anywhere and
> the function will be doing probe_kernel_read() underneath
> similar to bpf_fetch_*() helpers.
> If it was plain memcmp() it would give a wrong impression
> that vanilla memcmp() can be used.
Since that is not the case, I agree that the 'memcmp' semantic can't be
used, as the two pointers are not on the same "domain", so to say.
> In general the programs cannot use any library functions
> outside of helpers defined in uapi/linux/bpf.h
>
> bpf_fetch_*() helpers are also explicit in examples.
> If one need to do a lot of pointer walking, then macro like
> #define D(P) ((typeof(P))bpf_fetch_ptr(&P))
> would be easier to use: p = D(D(skb->dev)->ifalias)
> multiple pointer derefs would look more natural...
And if possible, i.e. if the eBPF compiler would take care of that
somehow, would indeed be preferred as it looks more natural :-)
- Arnaldo
^ permalink raw reply
* Re: [PATCH net 0/2] netns: audit netdevice creation with IFLA_NET_NS_[PID|FD]
From: Nicolas Dichtel @ 2015-01-28 9:37 UTC (permalink / raw)
To: Alexander Aring; +Cc: netdev, davem, arvid.brodin, linux-wpan
In-Reply-To: <20150127202617.GA13654@omega>
Le 27/01/2015 21:26, Alexander Aring a écrit :
> On Tue, Jan 27, 2015 at 03:50:31PM +0100, Nicolas Dichtel wrote:
>> Le 27/01/2015 15:06, Alexander Aring a écrit :
>>> Hi,
>>>
>>> On Tue, Jan 27, 2015 at 02:28:47PM +0100, Nicolas Dichtel wrote:
>>> ...
>> [snip]
>>>>
>>>> I don't know how wpan0 is created and if this interface can be created directly
>>>> in another netns than init_net.
>>>>
>>>
>>> no it can't. The wpan0 interface can be created via the 802.15.4
>>> userspace tools and we don't have such option for namespaces. It
>>> should be always to init_net while creation.
>> Even with 'ip netns exec foo iwpan ...'?
>>
>
> I did a quick test:
>
> diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
> index 6fb6bdf..df55b42 100644
> --- a/net/mac802154/iface.c
> +++ b/net/mac802154/iface.c
> @@ -590,6 +590,11 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name,
> list_add_tail_rcu(&sdata->list, &local->interfaces);
> mutex_unlock(&local->iflist_mtx);
>
> + if (net_eq(dev_net(ndev), &init_net))
> + printk(KERN_INFO "it's init_net\n");
> + else
> + printk(KERN_INFO "it's not init_net\n");
>
> With this patch and running:
>
> ip netns exec foo iwpan phy phy0 interface add bar%d type node
>
> I got a:
>
> [ 52.032956] it's init_net
>
> It's also init_net when I run with "ip netns exec foo iwpan ..."
Ok. After looking at the code, it's right that no netns is set in
ieee802154_if_add(), thus the interface is in the default netns (init_net).
[snip]
>>
>> But I still wonder if we should add a check about dev_net(dev) != init_net in
>> net/ieee802154/6lowpan/core.c.
>> If my understanding is correct:
>> - wpan can be created directly in a netns != init_net
>> - 6lowpan must be in the same netns than wpan
>> - code under net/ieee802154 only works in init_net, thus 6lowpan only works
>> in init_net.
>>
>> Do you agree?
>
> yes. I will put the last item on my ToDo list if we can do more netns
> stuff there.
Cool.
>
>> What about this (based on net-next)?
>>
>
> There are some little issues, see below.
>
>> From 5ca1c46c68e4e4381b2f7e284f5dadeb28a53b2f Mon Sep 17 00:00:00 2001
>> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> Date: Tue, 27 Jan 2015 11:26:20 +0100
>> Subject: [PATCH] wpan/6lowpan: fix netns settings
>>
>
> use "ieee802154:" instead "wpan/6lowpan:".
Ok.
>
> Can you rebase this patch on bluetooth-next?
Will do.
[snip]
>> --- a/net/mac802154/iface.c
>> +++ b/net/mac802154/iface.c
>> @@ -475,6 +475,7 @@ static void ieee802154_if_setup(struct net_device *dev)
>> dev->mtu = IEEE802154_MTU;
>> dev->tx_queue_len = 300;
>> dev->flags = IFF_NOARP | IFF_BROADCAST;
>> + dev->features |= NETIF_F_NETNS_LOCAL;
>
> We should set this inside the cfg802154_netdev_notifier_call function
> and NETDEV_REGISTER case. This can be found in "net/ieee802154/core.c". [0]
>
> The branch "net/mac802154" affects 802.15.4 SoftMAC interfaces only. We
> currently support SoftMAC only, but further we support HardMAC drivers.
> The HardMAC drivers doesn't use the "net/mac802154" branch and call
> netdev_register in driver layer.
>
> When we do it in cfg802154_netdev_notifier_call then this will be set
> for SoftMAC and HardMAC drivers (when we have a HardMAC driver). The
> same behaviour can also be found in wireless implementation. [1]
Ok.
Regards,
Nicolas
^ permalink raw reply
* Re: [PATCH iproute2-next 1/3] include: update headers
From: Nicolas Dichtel @ 2015-01-28 13:28 UTC (permalink / raw)
To: shemminger; +Cc: netdev
In-Reply-To: <1421750163-20348-1-git-send-email-nicolas.dichtel@6wind.com>
Le 20/01/2015 11:36, Nicolas Dichtel a écrit :
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
Please drop this series, I will send a v2.
^ 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