Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9696769imu; Sun, 30 Dec 2018 03:11:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN5dCDaunvErklrWBdAHiQ31dWKLdTxDWYzSuhW2r5Z9JXzCq85KH1vOsfEQ6EL9s4eyGaFf X-Received: by 2002:a17:902:9f89:: with SMTP id g9mr34113970plq.214.1546168294222; Sun, 30 Dec 2018 03:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546168294; cv=none; d=google.com; s=arc-20160816; b=KQAobynDpbFU5evcQxbaHkpIOrEYNZLcNYGI+CYWLsVSvihrnj7C4Z9/+gDxcmrzpR 3T3wvCbYIZMEsi2hCIqrslpLdnMBncbfkppsfCP33b0eC7XG4oKr/qPD935b2qErqi64 hwObdAUMXx60SikrUI4SQXTLRqGyOe8GhSuzghv2UOMEVBP50Mv7nPdjg0VgT4+/2c+1 //KhQkUdrHubZiLGjyyX13zte1BK8EUfoQPAuplCseEumEFCxXUnXJ50TKk1Pyt/pLPW Pd1hpSa9pYrn9PqlJ5sac9VlnLnN2tY5PkBVaQaXWqUfVPQ7Z82/NSvk97QIAHE0iX8N J52Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IopB3OJEHMkbL4+zfUW9FfwFFcYlgYfqDYEkENCo6mU=; b=vnfMtLjcDTaed/ut5LzKXaQbU55HbqEnCtv2F0a6UlIyg2VuHLyCzS1UWDUU5qD4ZF V6e8YTxU/Em4s3mhcj1T/mSs6Z2dEnburOuAj2nZ6PHWuA0S6StW9G9c0eEpQ2OIhGEW M96RP1rFonmds1sPUClg+nhX4eBRm78IomtM5lQI9Dfyd57tcBhyd1zQnpD1dylK7uq7 a6Pzs8xIitbdWuo4h1UAxevebpSbWBDPhBEiCdeGZoK0NZan6gsZSr7GiC/A5yUVF8Ib jh0imrSNe2DfNqd9kKtAHIOkNm68iN5vx75IwgkRa/GuvKXl4IN5tWkbvjcGJ5ajzHd3 e8zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H2fMLgaw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si42560708plv.258.2018.12.30.03.11.18; Sun, 30 Dec 2018 03:11:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H2fMLgaw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbeL3LJF (ORCPT + 99 others); Sun, 30 Dec 2018 06:09:05 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:55399 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbeL3LJF (ORCPT ); Sun, 30 Dec 2018 06:09:05 -0500 Received: by mail-it1-f194.google.com with SMTP id m62so33351545ith.5 for ; Sun, 30 Dec 2018 03:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IopB3OJEHMkbL4+zfUW9FfwFFcYlgYfqDYEkENCo6mU=; b=H2fMLgaw5QAf10jNRHr+TXGERAXyjZ902iLiCUVjA12BKkNC1QNSYG5ONuxk7x2G6n Zdj8Tf4WCo4GvswGuK2HdMgRaCjmfTSkKuJyTFS16Zt2eC2oZdl7rrL91Gn4RANOzk2y AAy5/4V9W7bJQ+f0vTQavEzSmSFeR1zXuJYjmN5nnlJdyPlqj1s+84c64BMKhRlZBBAj rKybKt3lrs5KXVlbhKbljslVRXQPzDgKdCcxY15Tm8kq4vqTqDP+fDV0zvHS1fDxQGnl HrfcimXtY/JYQZ/LuSLHEiOWlM6fTZHTxBd/nWtVxUr4NiX3XGlndVpNm2yh3bGm+IRN bhwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IopB3OJEHMkbL4+zfUW9FfwFFcYlgYfqDYEkENCo6mU=; b=RgorAhdNMelyt2tgGoY1ezcyJCP9s2NdZiBcr2oz2dZwJWdr3SO57eApRaSHE1xue3 SmsO08852zIYA2+Hd3dGqBxmcpCJQm6WvXn662X9uOrbXQsWZy2ob2zyNVQ5FNUFXmoS QyQALzvv6JjoLMl2Jqsp8WFT5mj/uBokBrOLhcAzzdR5gTebLR36hDHf0rhcZZ383OuK 7mgkMFrDQ+jYHno9aCch0z1H6YHnNppfWMcAeScXjquvPgvm7AIpQJyHM2oJz0ubHPpb X4NHNBY1hCbwGNjMOs9YsKE7s3t9wHMGXGNMbw+EZG7Y9OmfGtXRKUcaN+TJ6pLPd9Qr rHVg== X-Gm-Message-State: AJcUukc3XpdkHztV/Jx7DMbERulQL9zuBGqPP6nzKjYoXn4AQxlDwUmh +cb46LCNxd8m3Q5K0OKqJXZauICvkzhzB7yjpBBnuA== X-Received: by 2002:a05:660c:f94:: with SMTP id x20mr19107462itl.144.1546168144058; Sun, 30 Dec 2018 03:09:04 -0800 (PST) MIME-Version: 1.0 References: <000000000000d89413057e3aeec2@google.com> <3100603.HWLWhOUWpG@sven-edge> In-Reply-To: <3100603.HWLWhOUWpG@sven-edge> From: Dmitry Vyukov Date: Sun, 30 Dec 2018 12:08:53 +0100 Message-ID: Subject: Re: WARNING in batadv_is_on_batman_iface To: Sven Eckelmann Cc: syzbot , a@unstable.cc, b.a.t.m.a.n@lists.open-mesh.org, David Miller , LKML , mareklindner@neomailbox.ch, netdev , sw@simonwunderlich.de, syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 30, 2018 at 12:00 PM Sven Eckelmann wrote: > > On Sunday, 30 December 2018 11.41.03 CET syzbot wrote: > [...] > > HEAD commit: d8924c0d76aa Merge tag 'devprop-4.21-rc1' of git://git.ker.. > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt?x=122a373f400000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=91a256823ef17263 > > dashboard link: https://syzkaller.appspot.com/bug?extid=c764de0fcfadca9a8595 > > compiler: gcc (GCC) 8.0.1 20180413 (experimental) > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16fd1d67400000 > > > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > > Reported-by: syzbot+c764de0fcfadca9a8595@syzkaller.appspotmail.com > > What is the bug here? The kernel module showed a warning because the parent > device cannot be found in the same netns using __dev_get_by_index. > > The test system was just configured to panic on warnings. So are we now > expected to show warnings or what is the expected behavior? > > This behavior was added with commit b7eddd0b3950 ("batman-adv: prevent using > any virtual device created on batman-adv as hard-interface") - 3d48811b27f5 in > the out-of-tree module. Hi Sven, The problem is that kernel code uses WARNING when it should not. For WARN guidelines please see this: https://elixir.bootlin.com/linux/v4.20/source/include/asm-generic/bug.h#L81 and this (search for WARN_ON_ONCE): https://lwn.net/Articles/769365/ > Kind regards, > Sven > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7eddd0b3950ea9dc863f1cbfa30d172dbf772f4