* Re: [PATCH iproute2-next 1/1] tc: add online mode
From: David Ahern @ 2018-03-30 15:52 UTC (permalink / raw)
To: Roman Mashak; +Cc: stephen, netdev, kernel, jhs, xiyou.wangcong, jiri
In-Reply-To: <1522361555-1913-1-git-send-email-mrv@mojatatu.com>
On 3/29/18 4:12 PM, Roman Mashak wrote:
> Add initial support for oneline mode in tc; actions, filters and qdiscs
> will be gradually updated in the follow-up patches.
>
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
> ---
> man/man8/tc.8 | 15 ++++++++++++++-
> tc/tc.c | 8 +++++++-
> 2 files changed, 21 insertions(+), 2 deletions(-)
>
applied to iproute2-next. Thanks
^ permalink raw reply
* Re: [PATCH iproute2-next 1/1] tc: enable json output for actions
From: David Ahern @ 2018-03-30 15:55 UTC (permalink / raw)
To: Roman Mashak; +Cc: netdev, stephen, kernel, jhs, xiyou.wangcong, jiri
In-Reply-To: <1522270784-17811-1-git-send-email-mrv@mojatatu.com>
On 3/28/18 2:59 PM, Roman Mashak wrote:
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
> ---
> tc/m_action.c | 23 ++++++++++++++++++-----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
applied to iproute2-next. Thanks
^ permalink raw reply
* Re: [PATCH net v3 1/3] ipv6: move ip6_dst_store() calls with flowi6 checks to a wrapper
From: kbuild test robot @ 2018-03-30 15:58 UTC (permalink / raw)
To: Alexey Kodanev
Cc: kbuild-all, netdev, Eric Dumazet, Martin KaFai Lau, David Miller,
Alexey Kodanev
In-Reply-To: <1522345042-26646-2-git-send-email-alexey.kodanev@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 10447 bytes --]
Hi Alexey,
I love your patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Alexey-Kodanev/ipv6-move-ip6_dst_store-calls-with-flowi6-checks-to-a-wrapper/20180330-173050
config: x86_64-kexec (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from include/linux/tcp.h:23:0,
from drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c:33:
include/net/ip6_route.h: In function 'ip6_dst_store_flow':
>> include/net/sock.h:349:34: error: 'struct sock_common' has no member named 'skc_v6_daddr'; did you mean 'skc_daddr'?
#define sk_v6_daddr __sk_common.skc_v6_daddr
^
include/net/ip6_route.h:221:43: note: in expansion of macro 'sk_v6_daddr'
ipv6_addr_equal(&fl6->daddr, &sk->sk_v6_daddr) ?
^~~~~~~~~~~
>> include/net/sock.h:349:34: error: 'struct sock_common' has no member named 'skc_v6_daddr'; did you mean 'skc_daddr'?
#define sk_v6_daddr __sk_common.skc_v6_daddr
^
include/net/ip6_route.h:222:14: note: in expansion of macro 'sk_v6_daddr'
&sk->sk_v6_daddr : NULL,
^~~~~~~~~~~
vim +349 include/net/sock.h
4dc6dc716 Eric Dumazet 2009-07-15 329
68835aba4 Eric Dumazet 2010-11-30 330 #define sk_dontcopy_begin __sk_common.skc_dontcopy_begin
68835aba4 Eric Dumazet 2010-11-30 331 #define sk_dontcopy_end __sk_common.skc_dontcopy_end
4dc6dc716 Eric Dumazet 2009-07-15 332 #define sk_hash __sk_common.skc_hash
508054668 Eric Dumazet 2013-10-02 333 #define sk_portpair __sk_common.skc_portpair
05dbc7b59 Eric Dumazet 2013-10-03 334 #define sk_num __sk_common.skc_num
05dbc7b59 Eric Dumazet 2013-10-03 335 #define sk_dport __sk_common.skc_dport
508054668 Eric Dumazet 2013-10-02 336 #define sk_addrpair __sk_common.skc_addrpair
508054668 Eric Dumazet 2013-10-02 337 #define sk_daddr __sk_common.skc_daddr
508054668 Eric Dumazet 2013-10-02 338 #define sk_rcv_saddr __sk_common.skc_rcv_saddr
^1da177e4 Linus Torvalds 2005-04-16 339 #define sk_family __sk_common.skc_family
^1da177e4 Linus Torvalds 2005-04-16 340 #define sk_state __sk_common.skc_state
^1da177e4 Linus Torvalds 2005-04-16 341 #define sk_reuse __sk_common.skc_reuse
055dc21a1 Tom Herbert 2013-01-22 342 #define sk_reuseport __sk_common.skc_reuseport
9fe516ba3 Eric Dumazet 2014-06-27 343 #define sk_ipv6only __sk_common.skc_ipv6only
26abe1437 Eric W. Biederman 2015-05-08 344 #define sk_net_refcnt __sk_common.skc_net_refcnt
^1da177e4 Linus Torvalds 2005-04-16 345 #define sk_bound_dev_if __sk_common.skc_bound_dev_if
^1da177e4 Linus Torvalds 2005-04-16 346 #define sk_bind_node __sk_common.skc_bind_node
8feaf0c0a Arnaldo Carvalho de Melo 2005-08-09 347 #define sk_prot __sk_common.skc_prot
07feaebfc Eric W. Biederman 2007-09-12 348 #define sk_net __sk_common.skc_net
efe4208f4 Eric Dumazet 2013-10-03 @349 #define sk_v6_daddr __sk_common.skc_v6_daddr
efe4208f4 Eric Dumazet 2013-10-03 350 #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
33cf7c90f Eric Dumazet 2015-03-11 351 #define sk_cookie __sk_common.skc_cookie
70da268b5 Eric Dumazet 2015-10-08 352 #define sk_incoming_cpu __sk_common.skc_incoming_cpu
8e5eb54d3 Eric Dumazet 2015-10-08 353 #define sk_flags __sk_common.skc_flags
ed53d0ab7 Eric Dumazet 2015-10-08 354 #define sk_rxhash __sk_common.skc_rxhash
efe4208f4 Eric Dumazet 2013-10-03 355
^1da177e4 Linus Torvalds 2005-04-16 356 socket_lock_t sk_lock;
9115e8cd2 Eric Dumazet 2016-12-03 357 atomic_t sk_drops;
9115e8cd2 Eric Dumazet 2016-12-03 358 int sk_rcvlowat;
9115e8cd2 Eric Dumazet 2016-12-03 359 struct sk_buff_head sk_error_queue;
b178bb3df Eric Dumazet 2010-11-16 360 struct sk_buff_head sk_receive_queue;
fa438ccfd Eric Dumazet 2007-03-04 361 /*
fa438ccfd Eric Dumazet 2007-03-04 362 * The backlog queue is special, it is always used with
fa438ccfd Eric Dumazet 2007-03-04 363 * the per-socket spinlock held and requires low latency
fa438ccfd Eric Dumazet 2007-03-04 364 * access. Therefore we special case it's implementation.
b178bb3df Eric Dumazet 2010-11-16 365 * Note : rmem_alloc is in this structure to fill a hole
b178bb3df Eric Dumazet 2010-11-16 366 * on 64bit arches, not because its logically part of
b178bb3df Eric Dumazet 2010-11-16 367 * backlog.
fa438ccfd Eric Dumazet 2007-03-04 368 */
fa438ccfd Eric Dumazet 2007-03-04 369 struct {
b178bb3df Eric Dumazet 2010-11-16 370 atomic_t rmem_alloc;
b178bb3df Eric Dumazet 2010-11-16 371 int len;
fa438ccfd Eric Dumazet 2007-03-04 372 struct sk_buff *head;
fa438ccfd Eric Dumazet 2007-03-04 373 struct sk_buff *tail;
fa438ccfd Eric Dumazet 2007-03-04 374 } sk_backlog;
b178bb3df Eric Dumazet 2010-11-16 375 #define sk_rmem_alloc sk_backlog.rmem_alloc
2c8c56e15 Eric Dumazet 2014-11-11 376
9115e8cd2 Eric Dumazet 2016-12-03 377 int sk_forward_alloc;
e0d1095ae Cong Wang 2013-08-01 378 #ifdef CONFIG_NET_RX_BUSY_POLL
dafcc4380 Eliezer Tamir 2013-06-14 379 unsigned int sk_ll_usec;
9115e8cd2 Eric Dumazet 2016-12-03 380 /* ===== mostly read cache line ===== */
9115e8cd2 Eric Dumazet 2016-12-03 381 unsigned int sk_napi_id;
060212928 Eliezer Tamir 2013-06-10 382 #endif
b178bb3df Eric Dumazet 2010-11-16 383 int sk_rcvbuf;
b178bb3df Eric Dumazet 2010-11-16 384
b178bb3df Eric Dumazet 2010-11-16 385 struct sk_filter __rcu *sk_filter;
ceb5d58b2 Eric Dumazet 2015-11-29 386 union {
eaefd1105 Eric Dumazet 2011-02-18 387 struct socket_wq __rcu *sk_wq;
ceb5d58b2 Eric Dumazet 2015-11-29 388 struct socket_wq *sk_wq_raw;
ceb5d58b2 Eric Dumazet 2015-11-29 389 };
def8b4faf Alexey Dobriyan 2008-10-28 390 #ifdef CONFIG_XFRM
d188ba86d Eric Dumazet 2015-12-08 391 struct xfrm_policy __rcu *sk_policy[2];
def8b4faf Alexey Dobriyan 2008-10-28 392 #endif
deaa58542 Eric Dumazet 2012-06-24 393 struct dst_entry *sk_rx_dst;
0e36cbb34 Cong Wang 2013-01-22 394 struct dst_entry __rcu *sk_dst_cache;
^1da177e4 Linus Torvalds 2005-04-16 395 atomic_t sk_omem_alloc;
4e07a91c3 Arnaldo Carvalho de Melo 2007-05-29 396 int sk_sndbuf;
9115e8cd2 Eric Dumazet 2016-12-03 397
9115e8cd2 Eric Dumazet 2016-12-03 398 /* ===== cache line for TX ===== */
9115e8cd2 Eric Dumazet 2016-12-03 399 int sk_wmem_queued;
14afee4b6 Reshetova, Elena 2017-06-30 400 refcount_t sk_wmem_alloc;
9115e8cd2 Eric Dumazet 2016-12-03 401 unsigned long sk_tsq_flags;
75c119afe Eric Dumazet 2017-10-05 402 union {
9115e8cd2 Eric Dumazet 2016-12-03 403 struct sk_buff *sk_send_head;
75c119afe Eric Dumazet 2017-10-05 404 struct rb_root tcp_rtx_queue;
75c119afe Eric Dumazet 2017-10-05 405 };
^1da177e4 Linus Torvalds 2005-04-16 406 struct sk_buff_head sk_write_queue;
9115e8cd2 Eric Dumazet 2016-12-03 407 __s32 sk_peek_off;
9115e8cd2 Eric Dumazet 2016-12-03 408 int sk_write_pending;
9b8805a32 Julian Anastasov 2017-02-06 409 __u32 sk_dst_pending_confirm;
218af599f Eric Dumazet 2017-05-16 410 u32 sk_pacing_status; /* see enum sk_pacing */
9115e8cd2 Eric Dumazet 2016-12-03 411 long sk_sndtimeo;
9115e8cd2 Eric Dumazet 2016-12-03 412 struct timer_list sk_timer;
9115e8cd2 Eric Dumazet 2016-12-03 413 __u32 sk_priority;
9115e8cd2 Eric Dumazet 2016-12-03 414 __u32 sk_mark;
9115e8cd2 Eric Dumazet 2016-12-03 415 u32 sk_pacing_rate; /* bytes per second */
9115e8cd2 Eric Dumazet 2016-12-03 416 u32 sk_max_pacing_rate;
9115e8cd2 Eric Dumazet 2016-12-03 417 struct page_frag sk_frag;
9115e8cd2 Eric Dumazet 2016-12-03 418 netdev_features_t sk_route_caps;
9115e8cd2 Eric Dumazet 2016-12-03 419 netdev_features_t sk_route_nocaps;
9115e8cd2 Eric Dumazet 2016-12-03 420 int sk_gso_type;
9115e8cd2 Eric Dumazet 2016-12-03 421 unsigned int sk_gso_max_size;
9115e8cd2 Eric Dumazet 2016-12-03 422 gfp_t sk_allocation;
9115e8cd2 Eric Dumazet 2016-12-03 423 __u32 sk_txhash;
fc64869c4 Andrey Ryabinin 2016-05-18 424
fc64869c4 Andrey Ryabinin 2016-05-18 425 /*
fc64869c4 Andrey Ryabinin 2016-05-18 426 * Because of non atomicity rules, all
fc64869c4 Andrey Ryabinin 2016-05-18 427 * changes are protected by socket lock.
fc64869c4 Andrey Ryabinin 2016-05-18 428 */
aa4c1037a David Ahern 2016-12-01 429 unsigned int __sk_flags_offset[0];
aa4c1037a David Ahern 2016-12-01 430 #ifdef __BIG_ENDIAN_BITFIELD
aa4c1037a David Ahern 2016-12-01 431 #define SK_FL_PROTO_SHIFT 16
aa4c1037a David Ahern 2016-12-01 432 #define SK_FL_PROTO_MASK 0x00ff0000
aa4c1037a David Ahern 2016-12-01 433
:::::: The code at line 349 was first introduced by commit
:::::: efe4208f47f907b86f528788da711e8ab9dea44d ipv6: make lookups simpler and faster
:::::: TO: Eric Dumazet <edumazet@google.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26634 bytes --]
^ permalink raw reply
* Re: [PATCH net-next 4/6] inet: frags: use rhashtables for reassembly units
From: Eric Dumazet @ 2018-03-30 16:09 UTC (permalink / raw)
To: Kirill Tkhai, Eric Dumazet, David S . Miller
Cc: netdev, Florian Westphal, Herbert Xu, Thomas Graf,
Jesper Dangaard Brouer, Alexander Aring, Stefan Schmidt,
Nikolay Aleksandrov
In-Reply-To: <b803a854-f050-a12e-680f-c53da35b3151@virtuozzo.com>
On 03/30/2018 04:44 AM, Kirill Tkhai wrote:
> Hi, Eric,
>
> Great results!
>
> Please, see some comments below.
>
Thanks a lot Kirill for this detailed review.
I will address/correct all points that you raised in V2.
^ permalink raw reply
* Re: [PATCH] ISDN: eicon: message: remove redundant check
From: Joe Perches @ 2018-03-30 16:19 UTC (permalink / raw)
To: Gustavo A. R. Silva, Armin Schindler, Karsten Keil; +Cc: netdev, linux-kernel
In-Reply-To: <20180330154648.GA13995@embeddedgus>
On Fri, 2018-03-30 at 10:46 -0500, Gustavo A. R. Silva wrote:
> Check on plci->internal_command is unnecessary.
Probably all of these are unnecessary too:
$ for length in {7..2} ; do \
grep-2.5.4 -rP --include=*.[ch] -n "^\t{$length,$length}break;\n\t{$(($length-1)),$(($length-1))}break;" * ; \
done
drivers/staging/wilc1000/wilc_wlan.c:691: break;
break;
drivers/media/dvb-frontends/drxd_hard.c:2261: break;
break;
drivers/media/dvb-frontends/drxd_hard.c:2266: break;
break;
drivers/media/usb/gspca/sn9c20x.c:1860: break;
break;
drivers/isdn/i4l/isdn_common.c:624: break;
break;
drivers/isdn/i4l/isdn_common.c:642: break;
break;
drivers/isdn/i4l/isdn_common.c:654: break;
break;
drivers/isdn/hardware/eicon/message.c:13890: break;
break;
sound/usb/mixer_quirks.c:1832: break;
break;
^ permalink raw reply
* Re: [PATCH v2 net-next 0/2] do not allow adding routes if disable_ipv6 is enabled
From: David Miller @ 2018-03-30 16:21 UTC (permalink / raw)
To: lorenzo.bianconi; +Cc: netdev
In-Reply-To: <cover.1522312507.git.lorenzo.bianconi@redhat.com>
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Date: Thu, 29 Mar 2018 11:02:23 +0200
> Do not allow userspace to add static ipv6 routes if disable_ipv6 is enabled.
> Update disable_ipv6 documentation according to that change
>
> Changes since v1:
> - added an extack message telling the user that IPv6 is disabled on the nexthop
> device
> - rebased on-top of net-next
Series applied, thanks Lorenzo.
^ permalink raw reply
* [PATCH iproute2-next] devlink: Print size of -1 as unlimited
From: David Ahern @ 2018-03-30 16:21 UTC (permalink / raw)
To: netdev, jiri, arkadis; +Cc: David Ahern
(u64)-1 essentially means the size is unlimited. Print as 'unlimited'
as opposed to the current unsigned int range of 4294967295.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
devlink/devlink.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index ba02064b848c..fa33684cb20a 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -1405,6 +1405,14 @@ static void pr_out_uint(struct dl *dl, const char *name, unsigned int val)
}
}
+static void pr_out_u64(struct dl *dl, const char *name, uint64_t val)
+{
+ if (val == (uint64_t) -1)
+ return pr_out_str(dl, name, "unlimited");
+
+ return pr_out_uint(dl, name, val);
+}
+
static void pr_out_dev(struct dl *dl, struct nlattr **tb)
{
pr_out_handle(dl, tb);
@@ -4213,16 +4221,16 @@ static void resource_show(struct resource *resource,
pr_out_str(dl, "name", resource->name);
if (dl->verbose)
resource_path_print(dl, ctx->resources, resource->id);
- pr_out_uint(dl, "size", resource->size);
+ pr_out_u64(dl, "size", resource->size);
if (resource->size != resource->size_new)
- pr_out_uint(dl, "size_new", resource->size_new);
+ pr_out_u64(dl, "size_new", resource->size_new);
if (resource->occ_valid)
pr_out_uint(dl, "occ", resource->size_occ);
pr_out_str(dl, "unit", resource_unit_str_get(resource->unit));
if (resource->size_min != resource->size_max) {
pr_out_uint(dl, "size_min", resource->size_min);
- pr_out_uint(dl, "size_max", resource->size_max);
+ pr_out_u64(dl, "size_max", resource->size_max);
pr_out_uint(dl, "size_gran", resource->size_gran);
}
--
2.11.0
^ permalink raw reply related
* Re: [net-next V7 PATCH 12/16] page_pool: refurbish version of page_pool code
From: kbuild test robot @ 2018-03-30 16:26 UTC (permalink / raw)
To: Jesper Dangaard Brouer
Cc: kbuild-all, netdev, BjörnTöpel, magnus.karlsson,
eugenia, Jason Wang, John Fastabend, Eran Ben Elisha,
Saeed Mahameed, galp, Jesper Dangaard Brouer, Daniel Borkmann,
Alexei Starovoitov, Tariq Toukan
In-Reply-To: <152234291739.17048.7135649249513438321.stgit@firesoul>
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
Hi Jesper,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jesper-Dangaard-Brouer/XDP-redirect-memory-return-API/20180330-203122
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k
All errors (new ones prefixed by >>):
net/core/page_pool.o: In function `__page_pool_alloc_pages_slow':
>> page_pool.c:(.text+0x9a): undefined reference to `bad_dma_ops'
page_pool.c:(.text+0xa8): undefined reference to `bad_dma_ops'
net/core/page_pool.o: In function `__page_pool_clean_page.isra.0':
page_pool.c:(.text+0x27a): undefined reference to `bad_dma_ops'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12283 bytes --]
^ permalink raw reply
* Re: [PATCH] net: mvneta: remove duplicate *_coal assignment
From: David Miller @ 2018-03-30 16:28 UTC (permalink / raw)
To: Jisheng.Zhang; +Cc: thomas.petazzoni, netdev, linux-kernel, linux-arm-kernel
In-Reply-To: <20180329172940.4a5f592c@xhacker.debian>
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Date: Thu, 29 Mar 2018 17:29:40 +0800
> The style of the rx/tx queue's *_coal member assignment is:
>
> static void foo_coal_set(...)
> {
> set the coal in hw;
> update queue's foo_coal member; [1]
> }
>
> In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1]
> is duplicated and could be removed.
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Applied.
We could make this convention even more explicit by not passing
the coalescing parameter into these helpers, but instead using
the value in rxq->foo and txq->foo.
^ permalink raw reply
* [PATCH net-next] netdevsim: Change nsim_devlink_setup to return error to caller
From: David Ahern @ 2018-03-30 16:28 UTC (permalink / raw)
To: netdev, jakub.kicinski; +Cc: David Ahern
Change nsim_devlink_setup to return any error back to the caller and
update nsim_init to handle it.
Requested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
drivers/net/netdevsim/devlink.c | 12 +++++++-----
drivers/net/netdevsim/netdev.c | 6 +++++-
drivers/net/netdevsim/netdevsim.h | 5 +++--
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/netdevsim/devlink.c b/drivers/net/netdevsim/devlink.c
index bbdcf064ba10..27ae05c5fdaf 100644
--- a/drivers/net/netdevsim/devlink.c
+++ b/drivers/net/netdevsim/devlink.c
@@ -218,22 +218,22 @@ void nsim_devlink_teardown(struct netdevsim *ns)
}
}
-void nsim_devlink_setup(struct netdevsim *ns)
+int nsim_devlink_setup(struct netdevsim *ns)
{
struct net *net = nsim_to_net(ns);
bool *reg_devlink = net_generic(net, nsim_devlink_id);
struct devlink *devlink;
- int err = -ENOMEM;
+ int err;
/* only one device per namespace controls devlink */
if (!*reg_devlink) {
ns->devlink = NULL;
- return;
+ return 0;
}
devlink = devlink_alloc(&nsim_devlink_ops, 0);
if (!devlink)
- return;
+ return -ENOMEM;
err = devlink_register(devlink, &ns->dev);
if (err)
@@ -247,12 +247,14 @@ void nsim_devlink_setup(struct netdevsim *ns)
*reg_devlink = false;
- return;
+ return 0;
err_dl_unregister:
devlink_unregister(devlink);
err_devlink_free:
devlink_free(devlink);
+
+ return err;
}
/* Initialize per network namespace state */
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index 8b30ab3ea2c2..ec68f38213d9 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -167,10 +167,14 @@ static int nsim_init(struct net_device *dev)
SET_NETDEV_DEV(dev, &ns->dev);
- nsim_devlink_setup(ns);
+ err = nsim_devlink_setup(ns);
+ if (err)
+ goto err_unreg_dev;
return 0;
+err_unreg_dev:
+ device_unregister(&ns->dev);
err_bpf_uninit:
nsim_bpf_uninit(ns);
err_debugfs_destroy:
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index afb8cf90c0fd..3a8581af3b85 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -117,7 +117,7 @@ enum nsim_resource_id {
NSIM_RESOURCE_IPV6_FIB_RULES,
};
-void nsim_devlink_setup(struct netdevsim *ns);
+int nsim_devlink_setup(struct netdevsim *ns);
void nsim_devlink_teardown(struct netdevsim *ns);
int nsim_devlink_init(void);
@@ -128,8 +128,9 @@ void nsim_fib_exit(void);
u64 nsim_fib_get_val(struct net *net, enum nsim_resource_id res_id, bool max);
int nsim_fib_set_max(struct net *net, enum nsim_resource_id res_id, u64 val);
#else
-static inline void nsim_devlink_setup(struct netdevsim *ns)
+static inline int nsim_devlink_setup(struct netdevsim *ns)
{
+ return 0;
}
static inline void nsim_devlink_teardown(struct netdevsim *ns)
--
2.11.0
^ permalink raw reply related
* Re: [PATCH v2 net-next 0/2] Fix TX Timeout and implement Safety Features
From: David Miller @ 2018-03-30 16:32 UTC (permalink / raw)
To: Jose.Abreu; +Cc: netdev, Joao.Pinto, peppe.cavallaro, alexandre.torgue, andrew
In-Reply-To: <cover.1522315930.git.joabreu@synopsys.com>
From: Jose Abreu <Jose.Abreu@synopsys.com>
Date: Thu, 29 Mar 2018 10:40:17 +0100
> Fix the TX Timeout handler to correctly reconfigure the whole system and
> start implementing features for DWMAC5 cores, specifically the Safety
> Features.
>
> Changes since v1:
> - Display error stats in ethtool
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH] ISDN: eicon: message: remove redundant check
From: Gustavo A. R. Silva @ 2018-03-30 16:32 UTC (permalink / raw)
To: Joe Perches, Armin Schindler, Karsten Keil; +Cc: netdev, linux-kernel
In-Reply-To: <1522426759.2210.46.camel@perches.com>
On 03/30/2018 11:19 AM, Joe Perches wrote:
> On Fri, 2018-03-30 at 10:46 -0500, Gustavo A. R. Silva wrote:
>> Check on plci->internal_command is unnecessary.
>
> Probably all of these are unnecessary too:
>
> $ for length in {7..2} ; do \
> grep-2.5.4 -rP --include=*.[ch] -n "^\t{$length,$length}break;\n\t{$(($length-1)),$(($length-1))}break;" * ; \
> done
> drivers/staging/wilc1000/wilc_wlan.c:691: break;
> break;
> drivers/media/dvb-frontends/drxd_hard.c:2261: break;
> break;
> drivers/media/dvb-frontends/drxd_hard.c:2266: break;
> break;
> drivers/media/usb/gspca/sn9c20x.c:1860: break;
> break;
> drivers/isdn/i4l/isdn_common.c:624: break;
> break;
> drivers/isdn/i4l/isdn_common.c:642: break;
> break;
> drivers/isdn/i4l/isdn_common.c:654: break;
> break;
> drivers/isdn/hardware/eicon/message.c:13890: break;
> break;
> sound/usb/mixer_quirks.c:1832: break;
> break;
>
Oh, cool.
I'll take a look at them.
Thanks, Joe.
^ permalink raw reply
* Re: [PATCH net-next] dt-bindings: net: renesas-ravb: Add support for r8a77470 SoC
From: David Miller @ 2018-03-30 16:32 UTC (permalink / raw)
To: biju.das
Cc: robh+dt, mark.rutland, linux, geert+renesas, sergei.shtylyov,
horms, magnus.damm, chris.paterson2, fabrizio.castro, devicetree,
linux-renesas-soc, linux-arm-kernel, netdev
In-Reply-To: <1522317775-35671-1-git-send-email-biju.das@bp.renesas.com>
From: Biju Das <biju.das@bp.renesas.com>
Date: Thu, 29 Mar 2018 11:02:55 +0100
> Add a new compatible string for the RZ/G1C (R8A77470) SoC.
>
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Applied.
^ permalink raw reply
* kernel BUG at /home/blee/project/race-fuzzer/kernels/kernel_v4.16-rc3/net/packet/af_packet.c:LINE!
From: DaeRyong Jeong @ 2018-03-30 16:33 UTC (permalink / raw)
To: linux-kernel; +Cc: Byoungyoung Lee, Kyungtae Kim, netdev
We report the crash: kernel BUG at
/home/blee/project/race-fuzzer/kernels/kernel_v4.16-rc3/net/packet/af_packet.c:LINE!
This crash has been found in v4.16-rc3 using RaceFuzzer (a modified
version of Syzkaller), which we describe more at the end of this
report. Our analysis shows that the race occurs when invoking two
syscalls concurrently, (setsockopt$packet_int) and (bind$packet).
We have confirmed that the kernel v4.16-rc3, v4.16-rc7, and v4.15.14
built with gcc 7.1.0 are crashing by running the provided C repro
program within a few minutes (5 minutes).
Note that this crash can be triggered from the user space.
C repro code : https://kiwi.cs.purdue.edu/static/race-fuzzer/afpacket-setsockopt-bind-repro.c
kernel config v4.16-rc3 :
https://kiwi.cs.purdue.edu/static/race-fuzzer/afpacket-setsockopt-bind-v4.16-rc3.config
kernel config v4.16-rc7 :
https://kiwi.cs.purdue.edu/static/race-fuzzer/afpacket-setsockopt-bind-v4.16-rc7.config
kernel config v4.15.14 :
https://kiwi.cs.purdue.edu/static/race-fuzzer/afpacket-setsockopt-bind-v4.15.14.config
[ 881.047513] ------------[ cut here ]------------
[ 881.048416] kernel BUG at
/home/blee/project/race-fuzzer/kernels/kernel_v4.16-rc3/net/packet/af_packet.c:3107!
[ 881.050014] invalid opcode: 0000 [#1] SMP KASAN
[ 881.050698] Dumping ftrace buffer:
[ 881.051244] (ftrace buffer empty)
[ 881.051768] Modules linked in:
[ 881.052236] CPU: 1 PID: 18247 Comm: syz-executor0 Not tainted 4.16.0-rc3 #1
[ 881.053247] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
[ 881.054880] RIP: 0010:packet_do_bind+0x88d/0x950
[ 881.055553] RSP: 0018:ffff8802231d7b08 EFLAGS: 00010212
[ 881.056310] RAX: 0000000000010000 RBX: ffff8800af831740 RCX: ffffc900025ce000
[ 881.057318] RDX: 00000000000000a5 RSI: ffffffff838b257d RDI: 0000000000000001
[ 881.058301] RBP: ffff8802231d7c10 R08: ffff8802342f2480 R09: 0000000000000000
[ 881.059298] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8802309f8f00
[ 881.060314] R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000001000
[ 881.061320] FS: 00007f7fab50d700(0000) GS:ffff88023fc00000(0000)
knlGS:0000000000000000
[ 881.062467] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 881.063285] CR2: 0000000020038000 CR3: 00000000b11c9000 CR4: 00000000000006e0
[ 881.064317] Call Trace:
[ 881.064686] ? compat_packet_setsockopt+0x100/0x100
[ 881.065430] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20
[ 881.066188] packet_bind+0xa2/0xe0
[ 881.066690] SYSC_bind+0x279/0x2f0
[ 881.067180] ? move_addr_to_kernel.part.19+0xc0/0xc0
[ 881.067896] ? do_futex+0x1e90/0x1e90
[ 881.068435] ? SyS_sched_getaffinity+0xe3/0x100
[ 881.069112] ? mark_held_locks+0x25/0xb0
[ 881.069677] ? SyS_socketpair+0x4a0/0x4a0
[ 881.070265] SyS_bind+0x24/0x30
[ 881.070732] do_syscall_64+0x209/0x5d0
[ 881.071270] ? syscall_return_slowpath+0x3e0/0x3e0
[ 881.071929] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20
[ 881.072675] ? syscall_return_slowpath+0x260/0x3e0
[ 881.073365] ? mark_held_locks+0x25/0xb0
[ 881.073950] ? entry_SYSCALL_64_after_hwframe+0x52/0xb7
[ 881.074693] ? trace_hardirqs_off_caller+0xb5/0x120
[ 881.075390] ? trace_hardirqs_off_thunk+0x1a/0x1c
[ 881.076079] entry_SYSCALL_64_after_hwframe+0x42/0xb7
[ 881.076797] RIP: 0033:0x453909
[ 881.077238] RSP: 002b:00007f7fab50caf8 EFLAGS: 00000212 ORIG_RAX:
0000000000000031
[ 881.078268] RAX: ffffffffffffffda RBX: 00000000007080d8 RCX: 0000000000453909
[ 881.079239] RDX: 0000000000000014 RSI: 000000002001f000 RDI: 0000000000000015
[ 881.080268] RBP: 0000000000000250 R08: 0000000000000000 R09: 0000000000000000
[ 881.081256] R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004a82d3
[ 881.082272] R13: 00000000ffffffff R14: 0000000000000015 R15: 000000002001f000
[ 881.083251] Code: c0 fd 48 c7 c2 00 c8 d9 84 be ab 02 00 00 48 c7
c7 60 c8 d9 84 c6 05 e7 a2 48 02 01 e8 3f 17 af fd e9 60 fb ff ff e8
43 b3 c0 fd <0f> 0b e8 3c b3 c0 fd 48 8b bd 20 ff ff ff e8 60 1e e7 fd
4c 89
[ 881.085828] RIP: packet_do_bind+0x88d/0x950 RSP: ffff8802231d7b08
[ 881.086619] ---[ end trace 9c461502752b4f3e ]---
[ 881.087181] Kernel panic - not syncing: Fatal exception
[ 881.088352] Dumping ftrace buffer:
[ 881.088877] (ftrace buffer empty)
[ 881.089414] Kernel Offset: disabled
[ 881.089950] Rebooting in 86400 seconds..
= About RaceFuzzer
RaceFuzzer is a customized version of Syzkaller, specifically tailored
to find race condition bugs in the Linux kernel. While we leverage
many different technique, the notable feature of RaceFuzzer is in
leveraging a custom hypervisor (QEMU/KVM) to interleave the
scheduling. In particular, we modified the hypervisor to intentionally
stall a per-core execution, which is similar to supporting per-core
breakpoint functionality. This allows RaceFuzzer to force the kernel
to deterministically trigger racy condition (which may rarely happen
in practice due to randomness in scheduling).
RaceFuzzer's C repro always pinpoints two racy syscalls. Since C
repro's scheduling synchronization should be performed at the user
space, its reproducibility is limited (reproduction may take from 1
second to 10 minutes (or even more), depending on a bug). This is
because, while RaceFuzzer precisely interleaves the scheduling at the
kernel's instruction level when finding this bug, C repro cannot fully
utilize such a feature. Please disregard all code related to
"should_hypercall" in the C repro, as this is only for our debugging
purposes using our own hypervisor.
^ permalink raw reply
* Re: [PATCH net-next 4/6] inet: frags: use rhashtables for reassembly units
From: Herbert Xu @ 2018-03-30 16:37 UTC (permalink / raw)
To: Eric Dumazet
Cc: Eric Dumazet, David S . Miller, netdev, Florian Westphal,
Thomas Graf, Jesper Dangaard Brouer, Alexander Aring,
Stefan Schmidt, Nikolay Aleksandrov
In-Reply-To: <bc46ffdc-e3c4-93be-39ab-76c2634f2c6e@gmail.com>
On Fri, Mar 30, 2018 at 06:30:42AM -0700, Eric Dumazet wrote:
>
> I guess I will need to add a cond_resched() in it, right ?
I only ever run with preemption enabled :)
But yeah we should probably add some cond_rescheds to it. While
you're at it you might want to add some to these functions too:
- nested_table_free
- bucket_table_alloc
- rhashtable_rehash_table
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* [PATCH RESEND net-next 0/2] net_rwsem fixes
From: Kirill Tkhai @ 2018-03-30 16:38 UTC (permalink / raw)
To: davem, zhangshengju, ktkhai, jakub.kicinski, dsahern, mschiffer,
daniel, netdev
(Forgot to CC netdev@ :)
Hi,
there is wext_netdev_notifier_call()->wireless_nlevent_flush()
netdevice notifier, which takes net_rwsem, so we can't take
net_rwsem in {,un}register_netdevice_notifier().
Since {,un}register_netdevice_notifier() is executed under
pernet_ops_rwsem, net_namespace_list can't change, while we
holding it, so there is no need net_rwsem in these functions [1/2].
The same is in [2/2]. We make callers of __rtnl_link_unregister()
take pernet_ops_rwsem, and close the race with setup_net()
and cleanup_net(), so __rtnl_link_unregister() does not need it.
This also fixes the problem of that __rtnl_link_unregister() does
not see initializing and exiting nets.
Thanks,
Kirill
---
Kirill Tkhai (2):
net: Remove net_rwsem from {,un}register_netdevice_notifier()
net: Do not take net_rwsem in __rtnl_link_unregister()
drivers/net/dummy.c | 2 ++
drivers/net/ifb.c | 2 ++
net/core/dev.c | 5 -----
net/core/net_namespace.c | 1 +
net/core/rtnetlink.c | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
^ permalink raw reply
* [PATCH RESEND net-next 1/2] net: Remove net_rwsem from {, un}register_netdevice_notifier()
From: Kirill Tkhai @ 2018-03-30 16:38 UTC (permalink / raw)
To: davem, zhangshengju, ktkhai, jakub.kicinski, dsahern, mschiffer,
daniel, netdev
In-Reply-To: <152242784495.18864.4373352355749698367.stgit@localhost.localdomain>
These functions take net_rwsem, while wireless_nlevent_flush()
also takes it. But down_read() can't be taken recursive,
because of rw_semaphore design, which prevents it to be occupied
by only readers forever.
Since we take pernet_ops_rwsem in {,un}register_netdevice_notifier(),
net list can't change, so these down_read()/up_read() can be removed.
Fixes: f0b07bb151b0 "net: Introduce net_rwsem to protect net_namespace_list"
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
net/core/dev.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 07da7add4845..8edb58829124 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1633,7 +1633,6 @@ int register_netdevice_notifier(struct notifier_block *nb)
goto unlock;
if (dev_boot_phase)
goto unlock;
- down_read(&net_rwsem);
for_each_net(net) {
for_each_netdev(net, dev) {
err = call_netdevice_notifier(nb, NETDEV_REGISTER, dev);
@@ -1647,7 +1646,6 @@ int register_netdevice_notifier(struct notifier_block *nb)
call_netdevice_notifier(nb, NETDEV_UP, dev);
}
}
- up_read(&net_rwsem);
unlock:
rtnl_unlock();
@@ -1671,7 +1669,6 @@ int register_netdevice_notifier(struct notifier_block *nb)
}
outroll:
- up_read(&net_rwsem);
raw_notifier_chain_unregister(&netdev_chain, nb);
goto unlock;
}
@@ -1704,7 +1701,6 @@ int unregister_netdevice_notifier(struct notifier_block *nb)
if (err)
goto unlock;
- down_read(&net_rwsem);
for_each_net(net) {
for_each_netdev(net, dev) {
if (dev->flags & IFF_UP) {
@@ -1715,7 +1711,6 @@ int unregister_netdevice_notifier(struct notifier_block *nb)
call_netdevice_notifier(nb, NETDEV_UNREGISTER, dev);
}
}
- up_read(&net_rwsem);
unlock:
rtnl_unlock();
up_write(&pernet_ops_rwsem);
^ permalink raw reply related
* [PATCH RESEND net-next 2/2] net: Do not take net_rwsem in __rtnl_link_unregister()
From: Kirill Tkhai @ 2018-03-30 16:38 UTC (permalink / raw)
To: davem, zhangshengju, ktkhai, jakub.kicinski, dsahern, mschiffer,
daniel, netdev
In-Reply-To: <152242784495.18864.4373352355749698367.stgit@localhost.localdomain>
This function calls call_netdevice_notifier(), which also
may take net_rwsem. So, we can't use net_rwsem here.
This patch makes callers of this functions take pernet_ops_rwsem,
like register_netdevice_notifier() does. This will protect
the modifications of net_namespace_list, and allows notifiers
to take it (they won't have to care about context).
Since __rtnl_link_unregister() is used on module load
and unload (which are not frequent operations), this looks
for me better, than make all call_netdevice_notifier()
always executing in "protected net_namespace_list" context.
Also, this fixes the problem we had a deal in 328fbe747ad4
"Close race between {un, }register_netdevice_notifier and ...",
and guarantees __rtnl_link_unregister() does not skip
exitting net.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
drivers/net/dummy.c | 2 ++
drivers/net/ifb.c | 2 ++
net/core/net_namespace.c | 1 +
net/core/rtnetlink.c | 6 +++---
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 30b1c8512049..0d15a12a4560 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -219,6 +219,7 @@ static int __init dummy_init_module(void)
{
int i, err = 0;
+ down_write(&pernet_ops_rwsem);
rtnl_lock();
err = __rtnl_link_register(&dummy_link_ops);
if (err < 0)
@@ -233,6 +234,7 @@ static int __init dummy_init_module(void)
out:
rtnl_unlock();
+ up_write(&pernet_ops_rwsem);
return err;
}
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 0008da7e9d4c..5f2897ec0edc 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -330,6 +330,7 @@ static int __init ifb_init_module(void)
{
int i, err;
+ down_write(&pernet_ops_rwsem);
rtnl_lock();
err = __rtnl_link_register(&ifb_link_ops);
if (err < 0)
@@ -344,6 +345,7 @@ static int __init ifb_init_module(void)
out:
rtnl_unlock();
+ up_write(&pernet_ops_rwsem);
return err;
}
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 7fdf321d4997..a11e03f920d3 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -51,6 +51,7 @@ static bool init_net_initialized;
* outside.
*/
DECLARE_RWSEM(pernet_ops_rwsem);
+EXPORT_SYMBOL_GPL(pernet_ops_rwsem);
#define MIN_PERNET_OPS_ID \
((sizeof(struct net_generic) + sizeof(void *) - 1) / sizeof(void *))
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e86b28482ca7..45936922d7e2 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -412,17 +412,17 @@ static void __rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops)
* __rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink.
* @ops: struct rtnl_link_ops * to unregister
*
- * The caller must hold the rtnl_mutex.
+ * The caller must hold the rtnl_mutex and guarantee net_namespace_list
+ * integrity (hold pernet_ops_rwsem for writing to close the race
+ * with setup_net() and cleanup_net()).
*/
void __rtnl_link_unregister(struct rtnl_link_ops *ops)
{
struct net *net;
- down_read(&net_rwsem);
for_each_net(net) {
__rtnl_kill_links(net, ops);
}
- up_read(&net_rwsem);
list_del(&ops->list);
}
EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
^ permalink raw reply related
* Re: [patch iproute2-next] man: fix devlink object list
From: David Ahern @ 2018-03-30 16:43 UTC (permalink / raw)
To: Jiri Pirko, netdev; +Cc: stephen, mlxsw, valex
In-Reply-To: <20180329142616.2717-1-jiri@resnulli.us>
On 3/29/18 8:26 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
> man/man8/devlink.8 | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
resource and sb exist on master, so this patch seems more appropriate
for it than -next.
^ permalink raw reply
* Re: INFO: task hung in stop_sync_thread (2)
From: syzbot @ 2018-03-30 16:46 UTC (permalink / raw)
To: coreteam, davem, fw, horms, ja, kadlec, linux-kernel, lvs-devel,
netdev, netfilter-devel, pablo, syzkaller-bugs, wensong
In-Reply-To: <000000000000878b6a05688805c5@google.com>
syzbot has found reproducer for the following crash on net-next commit
18845557fd6fc1998f2d0d8c30467f86db587529 (Thu Mar 29 20:24:06 2018 +0000)
Merge tag 'wireless-drivers-next-for-davem-2018-03-29' of
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=5fe074c01b2032ce9618
So far this crash happened 2 times on net-next.
C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5531070485233664
syzkaller reproducer:
https://syzkaller.appspot.com/x/repro.syz?id=5632385408303104
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=6520566391504896
Kernel config: https://syzkaller.appspot.com/x/.config?id=-37309782588693906
compiler: gcc (GCC) 7.1.1 20170620
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5fe074c01b2032ce9618@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed.
INFO: task syzkaller923914:4319 blocked for more than 120 seconds.
Not tainted 4.16.0-rc6+ #286
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syzkaller923914 D23312 4319 4316 0x00000000
Call Trace:
context_switch kernel/sched/core.c:2862 [inline]
__schedule+0x8fb/0x1ec0 kernel/sched/core.c:3440
schedule+0xf5/0x430 kernel/sched/core.c:3499
schedule_timeout+0x1a3/0x230 kernel/time/timer.c:1777
do_wait_for_common kernel/sched/completion.c:86 [inline]
__wait_for_common kernel/sched/completion.c:107 [inline]
wait_for_common kernel/sched/completion.c:118 [inline]
wait_for_completion+0x415/0x770 kernel/sched/completion.c:139
kthread_stop+0x14a/0x7a0 kernel/kthread.c:530
stop_sync_thread+0x3d9/0x740 net/netfilter/ipvs/ip_vs_sync.c:1996
do_ip_vs_set_ctl+0x2b1/0x1cc0 net/netfilter/ipvs/ip_vs_ctl.c:2394
nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115
ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1253
udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2400
sock_common_setsockopt+0x95/0xd0 net/core/sock.c:3039
SYSC_setsockopt net/socket.c:1850 [inline]
SyS_setsockopt+0x189/0x360 net/socket.c:1829
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4459d9
RSP: 002b:00007f1d6f47cdb8 EFLAGS: 00000297 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 00000000004459d9
RDX: 000000000000048c RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00000000006dac20 R08: 0000000000000018 R09: 0000000000000000
R10: 0000000020000000 R11: 0000000000000297 R12: 0000000000000000
R13: 00007fffcf128acf R14: 00007f1d6f47d9c0 R15: 0000000000000001
INFO: lockdep is turned off.
NMI backtrace for cpu 1
CPU: 1 PID: 869 Comm: khungtaskd Not tainted 4.16.0-rc6+ #286
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x24d lib/dump_stack.c:53
nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x123/0x180 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:138 [inline]
check_hung_task kernel/hung_task.c:132 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:190 [inline]
watchdog+0x90c/0xd60 kernel/hung_task.c:249
kthread+0x33c/0x400 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4317 Comm: syzkaller923914 Not tainted 4.16.0-rc6+ #286
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50
RSP: 0018:ffff8801b56df138 EFLAGS: 00000093
RAX: ffff8801cbaae640 RBX: 0000000000000000 RCX: ffffffff866a3971
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff8801db218038
RBP: ffff8801b56df168 R08: ffff88021fff801c R09: ffff88021fff8008
R10: ffff88021fff8010 R11: ffff88021fff801d R12: ffff8801db218038
R13: 0000000000000040 R14: ffff8801db218038 R15: 00000000ffffffff
FS: 0000000001968880(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600400 CR3: 00000001c94dc001 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
cpumask_next+0x24/0x30 lib/cpumask.c:21
select_idle_smt kernel/sched/fair.c:6116 [inline]
select_idle_sibling+0x86d/0xda0 kernel/sched/fair.c:6238
select_task_rq_fair+0xe0a/0x2910 kernel/sched/fair.c:6394
select_task_rq kernel/sched/core.c:1554 [inline]
try_to_wake_up+0x4ee/0x15f0 kernel/sched/core.c:2064
default_wake_function+0x30/0x50 kernel/sched/core.c:3693
autoremove_wake_function+0x78/0x350 kernel/sched/wait.c:377
__wake_up_common+0x18e/0x780 kernel/sched/wait.c:97
__wake_up_common_lock+0x1b4/0x310 kernel/sched/wait.c:125
__wake_up_sync_key+0x19/0x20 kernel/sched/wait.c:203
pipe_write+0x63b/0xd60 fs/pipe.c:477
call_write_iter include/linux/fs.h:1782 [inline]
new_sync_write fs/read_write.c:469 [inline]
__vfs_write+0x684/0x970 fs/read_write.c:482
vfs_write+0x189/0x510 fs/read_write.c:544
SYSC_write fs/read_write.c:589 [inline]
SyS_write+0xef/0x220 fs/read_write.c:581
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4459d9
RSP: 002b:00007fffcf128b48 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006dada0 RCX: 00000000004459d9
RDX: 0000000000000012 RSI: 00000000004adf28 RDI: 0000000000000001
RBP: 0000000000000010 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dad8c
R13: 00000000006dada0 R14: 0000000000000005 R15: 0000000000000001
Code: ff 4c 89 e7 e8 62 b2 38 00 e9 32 fd ff ff 48 8b bd d0 fe ff ff e8 f1
b2 38 00 e9 c3 fc ff ff 90 90 90 90 90 90 90 90 90 90 90 90 <55> 65 48 8b
04 25 c0 ed 01 00 48 89 e5 65 8b 15 8c 20 90 7e 81
^ permalink raw reply
* Re: [PATCH net 0/2] Fix vlan tag handling for vlan packets without ethernet headers
From: David Miller @ 2018-03-30 16:49 UTC (permalink / raw)
To: makita.toshiaki; +Cc: netdev, eric.dumazet
In-Reply-To: <1522317930-2951-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>
From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Thu, 29 Mar 2018 19:05:28 +0900
> Eric Dumazet reported syzbot found a new bug which leads to underflow of
> size argument of memmove(), causing crash[1]. This can be triggered by tun
> devices.
>
> The underflow happened because skb_vlan_untag() did not expect vlan packets
> without ethernet headers, and tun can produce such packets.
> I also checked vlan_insert_inner_tag() and found a similar bug.
>
> This series fixes these problems.
>
> [1] https://marc.info/?l=linux-netdev&m=152221753920510&w=2
Series applied, thank you.
^ permalink raw reply
* Re: INFO: task hung in stop_sync_thread (2)
From: Dmitry Vyukov @ 2018-03-30 16:54 UTC (permalink / raw)
To: syzbot
Cc: coreteam, David Miller, Florian Westphal, horms, Julian Anastasov,
Jozsef Kadlecsik, LKML, lvs-devel, netdev, netfilter-devel,
Pablo Neira Ayuso, syzkaller-bugs, wensong
In-Reply-To: <94eb2c05b2d8af3dfa0568a3f964@google.com>
On Fri, Mar 30, 2018 at 6:46 PM, syzbot
<syzbot+5fe074c01b2032ce9618@syzkaller.appspotmail.com> wrote:
> syzbot has found reproducer for the following crash on net-next commit
/\/\/\/\/\/\
now syzbot can test fixes
> 18845557fd6fc1998f2d0d8c30467f86db587529 (Thu Mar 29 20:24:06 2018 +0000)
> Merge tag 'wireless-drivers-next-for-davem-2018-03-29' of
> git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
> syzbot dashboard link:
> https://syzkaller.appspot.com/bug?extid=5fe074c01b2032ce9618
>
> So far this crash happened 2 times on net-next.
> C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5531070485233664
> syzkaller reproducer:
> https://syzkaller.appspot.com/x/repro.syz?id=5632385408303104
> Raw console output:
> https://syzkaller.appspot.com/x/log.txt?id=6520566391504896
> Kernel config: https://syzkaller.appspot.com/x/.config?id=-37309782588693906
> compiler: gcc (GCC) 7.1.1 20170620
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+5fe074c01b2032ce9618@syzkaller.appspotmail.com
> It will help syzbot understand when the bug is fixed.
^ permalink raw reply
* Re: [PATCH] PCI: allow drivers to limit the number of VFs to 0
From: Alexander Duyck @ 2018-03-30 16:54 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jakub Kicinski, Bjorn Helgaas, linux-pci, Netdev, Sathya Perla,
Felix Manlunas, John Fastabend, Jacob Keller, Donald Dutile,
oss-drivers
In-Reply-To: <20180330114905.GA10246@infradead.org>
On Fri, Mar 30, 2018 at 4:49 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Thu, Mar 29, 2018 at 11:22:31AM -0700, Jakub Kicinski wrote:
>> Some user space depends on driver allowing sriov_totalvfs to be
>> enabled.
>
> I can't make sene of this sentence. Can you explain what user space
> code depends on what semantics? The sriov_totalvfs file should show
> up for any device supporting SR-IOV as far as I can tell.
>
>>
>> For devices which VF support depends on loaded FW we
>> have the pci_sriov_{g,s}et_totalvfs() API. However, this API
>> uses 0 as a special "unset" value, meaning drivers can't limit
>> sriov_totalvfs to 0. Change the special value to be U16_MAX.
>> Use simple min() to determine actual totalvfs.
>
> Please use a PCI_MAX_VFS or similar define instead of plain U16_MAX or ~0.
Actually is there any reason why driver_max_VFs couldn't just be
initialized to the same value as total_VFs?
Also looking over the patch I don't see how writing ~0 would be
accepted unless you also make changes to pci_sriov_set_totalvfs since
it should fail the "numvfs > dev->sriov->total_VFs" check. You might
just want to look at adding a new function that would reset the
driver_max_VFs value instead of trying to write it to an arbitrary
value from the driver.
- Alex
^ permalink raw reply
* Re: [PATCH net] net/dim: Fix int overflow
From: David Miller @ 2018-03-30 16:56 UTC (permalink / raw)
To: talgi; +Cc: netdev, tariqt, andrew.gospodarek, saeedm
In-Reply-To: <1522320832-18416-1-git-send-email-talgi@mellanox.com>
From: Tal Gilboa <talgi@mellanox.com>
Date: Thu, 29 Mar 2018 13:53:52 +0300
> When calculating difference between samples, the values
> are multiplied by 100. Large values may cause int overflow
> when multiplied (usually on first iteration).
> Fixed by forcing 100 to be of type unsigned long.
>
> Fixes: 4c4dbb4a7363 ("net/mlx5e: Move dynamic interrupt coalescing code to include/linux")
> Signed-off-by: Tal Gilboa <talgi@mellanox.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH net-next 0/9] devlink: Add support for region access
From: David Ahern @ 2018-03-30 16:57 UTC (permalink / raw)
To: Andrew Lunn, Alex Vesker
Cc: David S. Miller, netdev, Tariq Toukan, Jiri Pirko
In-Reply-To: <20180330143403.GD28244@lunn.ch>
On 3/30/18 8:34 AM, Andrew Lunn wrote:
>>> And it seems to want contiguous pages. How well does that work after
>>> the system has been running for a while and memory is fragmented?
>>
>> The allocation can be changed, there is no read need for contiguous pages.
>> It is important to note that we the amount of snapshots is limited by the
>> driver
>> this can be based on the dump size or expected frequency of collection.
>> I also prefer not to pre-allocate this memory.
>
> The driver code also asks for a 1MB contiguous chunk of memory! You
> really should think about this API, how can you avoid double memory
> allocations. And can kvmalloc be used. But then you get into the
> problem for DMA'ing the memory from the device...
>
> This API also does not scale. 1MB is actually quite small. I'm sure
> there is firmware running on CPUs with a lot more than 1MB of RAM.
> How well does with API work with 64MB? Say i wanted to snapshot my
> GPU? Or the MC/BMC?
>
That and the drivers control the number of snapshots. The user should be
able to control the number of snapshots, and an option to remove all
snapshots to free up that memory.
^ 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