diff mbox

net.git: Call-trace after "Merge branch 'netlink_multicast'"

Message ID CA+icZUVkNHBqCn66onJP9i5vfVzHR9mdSFXyiBFyjhkrySrSzQ@mail.gmail.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Sedat Dilek Dec. 28, 2014, 5:39 a.m. UTC
On Sat, Dec 27, 2014 at 11:46 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Sat, Dec 27, 2014 at 11:30 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> Hi johill :-),
>>
>> I am seeing here a call-trace after pulling net.git#master on top of upstream.
>>
>> [   21.095849] ------------[ cut here ]------------
>> [   21.095862] WARNING: CPU: 1 PID: 1291 at
>> net/netlink/genetlink.c:1011 genl_bind+0xeb/0x100()
>> [   21.095864] Modules linked in: arc4 iwldvm snd_hda_codec_hdmi
>> uvcvideo snd_hda_codec_realtek mac80211 snd_hda_codec_generic
>> snd_hda_intel videobuf2_vmalloc snd_hda_controller videobuf2_memops
>> snd_hda_codec videobuf2_core bnep rfcomm v4l2_common joydev option
>> i915 usb_wwan videodev snd_hwdep cdc_ether usbserial snd_pcm usbnet
>> snd_seq_midi snd_seq_midi_event iwlwifi snd_rawmidi psmouse btusb
>> snd_seq i2c_algo_bit parport_pc snd_timer drm_kms_helper bluetooth
>> ppdev snd_seq_device serio_raw cfg80211 drm snd samsung_laptop lpc_ich
>> soundcore video wmi intel_rst mac_hid lp parport binfmt_misc
>> hid_generic usbhid hid usb_storage r8169 mii
>> [   21.095942] CPU: 1 PID: 1291 Comm: acpid Not tainted
>> 3.19.0-rc1-55.2-iniza-small #1
>> [   21.095945] Hardware name: SAMSUNG ELECTRONICS CO., LTD.
>> 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
>> [   21.095948]  ffffffff81ae3fda ffff8800b8877dc8 ffffffff8175b61c
>> 0000000000000000
>> [   21.095955]  0000000000000000 ffff8800b8877e08 ffffffff810753da
>> ffffffff82c82f40
>> [   21.095962]  0000000000000001 ffffffff82c82f40 0000000000000000
>> 0000000000000000
>> [   21.095967] Call Trace:
>> [   21.095976]  [<ffffffff8175b61c>] dump_stack+0x4c/0x65
>> [   21.095983]  [<ffffffff810753da>] warn_slowpath_common+0x8a/0xc0
>> [   21.095989]  [<ffffffff810754ca>] warn_slowpath_null+0x1a/0x20
>> [   21.095993]  [<ffffffff8169738b>] genl_bind+0xeb/0x100
>> [   21.095998]  [<ffffffff81695d97>] netlink_bind+0xb7/0x280
>> [   21.096004]  [<ffffffff811add89>] ? might_fault+0xb9/0xc0
>> [   21.096009]  [<ffffffff811add2e>] ? might_fault+0x5e/0xc0
>> [   21.096015]  [<ffffffff8164d038>] SYSC_bind+0xb8/0xf0
>> [   21.096021]  [<ffffffff810c2f0d>] ? trace_hardirqs_on+0xd/0x10
>> [   21.096027]  [<ffffffff81025ae5>] ? syscall_trace_enter_phase1+0x105/0x180
>> [   21.096033]  [<ffffffff813b4e1e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [   21.096038]  [<ffffffff8164e65e>] SyS_bind+0xe/0x10
>> [   21.096044]  [<ffffffff817654ed>] system_call_fastpath+0x16/0x1b
>> [   21.096047] ---[ end trace 7dceb0e985894682 ]---
>>
>> My kernel-config, full dmesg and my patchset on top of Linux
>> v.3.19-rc1 are attached.
>>
>> Please CC me if you need more informations.
>>
>
> It looks like the WARN_ON() in commit "genetlink: pass multicast
> bind/unbind to families" [1] causes this...
>
> [ dmesg ]
> ...
> [   21.095862] WARNING: CPU: 1 PID: 1291 at
> net/netlink/genetlink.c:1011 genl_bind+0xeb/0x100()
>
> [ patch ]
> ...
> +static int genl_bind(int group)
> +{
> + int i, err;
> + bool found = false;
> +
> + down_read(&cb_lock);
> + for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
> + struct genl_family *f;
> +
> + list_for_each_entry(f, genl_family_chain(i), family_list) {
> + if (group >= f->mcgrp_offset &&
> + group < f->mcgrp_offset + f->n_mcgrps) {
> + int fam_grp = group - f->mcgrp_offset;
> +
> + if (f->mcast_bind)
> + err = f->mcast_bind(fam_grp);
> + else
> + err = 0;
> + found = true;
> + break;
> + }
> + }
> + }
> + up_read(&cb_lock);
> +
> + if (WARN_ON(!found)) <--- *** Line #1011 ***
> + err = 0;
> +
> + return err;
> +}
>
> Hope this helps.
>
> Regards,
> - Sedat -
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/net/netlink/genetlink.c?id=c380d9a7afff0e4c2e5f3c1c2dc7d2f4214dd962

[ CCing Fengguang Wu who reported the same issue on LKML (see [0]) ]

Was "netlink/genetlink: pass network namespace to bind/unbind" patch
[1] forgotten in this 'netlink_multicast' merge?
I also tested with that patch on top of net.git#master.
The warning still remains.

I have #if 0-ed the WARN_ON() for now (see attached patch), this makes
the warning go away for me.

BTW, I looked through the patches listed in [2] but this list seems to
be truncated.
Then I looked again at the linux-netdev ML where I found Johannes'
patch and Dave replied "Applied, thanks Johannes." (see thread in
[3]).
Forgot to push out?

- Sedat -

[0] http://marc.info/?l=linux-kernel&m=141972716410805&w=2
[1] http://patchwork.ozlabs.org/patch/423799/
[2] http://patchwork.ozlabs.org/project/netdev/list/
[3] http://marc.info/?t=141936487400002&r=1&w=2

Comments

Sedat Dilek Dec. 28, 2014, 6:22 a.m. UTC | #1
On Sun, Dec 28, 2014 at 6:39 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
[ ... ]
> [ CCing Fengguang Wu who reported the same issue on LKML (see [0]) ]
>
> Was "netlink/genetlink: pass network namespace to bind/unbind" patch
> [1] forgotten in this 'netlink_multicast' merge?

OK, this patch is additional and on top of "[PATCH 0/5]
netlink/genetlink cleanups & multicast improvements"

- Sedat -

[1] http://marc.info/?l=linux-netdev&w=2&r=1&s=netlink&q=b

> I also tested with that patch on top of net.git#master.
> The warning still remains.
>
> I have #if 0-ed the WARN_ON() for now (see attached patch), this makes
> the warning go away for me.
>
> BTW, I looked through the patches listed in [2] but this list seems to
> be truncated.
> Then I looked again at the linux-netdev ML where I found Johannes'
> patch and Dave replied "Applied, thanks Johannes." (see thread in
> [3]).
> Forgot to push out?
>
> - Sedat -
>
> [0] http://marc.info/?l=linux-kernel&m=141972716410805&w=2
> [1] http://patchwork.ozlabs.org/patch/423799/
> [2] http://patchwork.ozlabs.org/project/netdev/list/
> [3] http://marc.info/?t=141936487400002&r=1&w=2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sedat Dilek Dec. 28, 2014, 7:54 a.m. UTC | #2
Just a small thing, if you look at this...

With gcc-4.9.2 I see this warning in my logs...

net/netlink/genetlink.c: In function 'genl_bind':
net/netlink/genetlink.c:1018:2: warning: 'err' may be used
uninitialized in this function [-Wmaybe-uninitialized]

- Sedat -

P.S.: Some gcc-4.9 outputs

$ cat /proc/version
Linux version 3.19.0-rc1-58.2-iniza-small
(sedat.dilek@gmail.com@fambox) (gcc version 4.9.2 (Ubuntu
4.9.2-0ubuntu1~12.04) ) #1 SMP Sun Dec 28 08:09:51 CET 2014

$ gcc-4.9 -v
Using built-in specs.
COLLECT_GCC=gcc-4.9
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.2-0ubuntu1~12.04'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Ubuntu 4.9.2-0ubuntu1~12.04)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sedat Dilek Dec. 28, 2014, 9:39 a.m. UTC | #3
On Sun, Dec 28, 2014 at 7:22 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Sun, Dec 28, 2014 at 6:39 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> [ ... ]
>> [ CCing Fengguang Wu who reported the same issue on LKML (see [0]) ]
>>
>> Was "netlink/genetlink: pass network namespace to bind/unbind" patch
>> [1] forgotten in this 'netlink_multicast' merge?
>
> OK, this patch is additional and on top of "[PATCH 0/5]
> netlink/genetlink cleanups & multicast improvements"
>

Thanks, now I can see that patch in net.git#master.

- Sedat -

[1] http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=023e2cfa36c31b0ad28c159a1bb0d61ff57334c8
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From 02730e1fb7ffda68f16abdf310d36fabc4e25154 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Sat, 27 Dec 2014 17:36:23 +0100
Subject: [PATCH] genetlink: Comment out WARN_ON() in genl_bind()

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 net/netlink/genetlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 05bf40b..3637369 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -1008,8 +1008,10 @@  static int genl_bind(int group)
 	}
 	up_read(&cb_lock);
 
+#if 0
 	if (WARN_ON(!found))
 		err = 0;
+#endif
 
 	return err;
 }
-- 
2.2.1