Received: by 10.213.65.68 with SMTP id h4csp1662378imn; Thu, 5 Apr 2018 01:21:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/kYbQGlJ7ngnw3E6wieyPdGhzn98Y1uoLdtJ61a+wtp9Y3NwLl6jiSRXqp8Y57L+FvF1uU X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr22391385plb.2.1522916497714; Thu, 05 Apr 2018 01:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522916497; cv=none; d=google.com; s=arc-20160816; b=L1Pw8xAljeXjH7w+hXDn9yIYOubqjA7MczRbEN9l8L/0NY0pdPLamWkTcm26tYRoZ3 alf6t9VOzYWSD00gzcyeesELYoho5FjEbNgcBhnKyY3A45f9esPzprjRj2+Al4wy5GEg KAYSTDMw6FL7x0u53NyPWT4kwTWfWPLJY9Z7fd/mr+0qIGUKZIt0nEFuETlajZr5shPI BVtJi2r0Aj0mSjjmnFcfYNZgpb9FZKLGzq7rpEk1+O5rK1jvmWiEA85L6IDnkZGYwLYV VLHYMhPJRYSxT2wwEtba/zs2/jOnHwr7okN29zxjOzfwmAJcX9yYlkVLHaO3E8J9pnSu kMWQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hYUMZGf56iTZMFjDGAfaI/bx8kp8/A/Nu1KHq0QePSw=; b=D3oACXbsqPN4tJh8krlB8PWNjKzjj5914mnXYh73mWgeFaXwpXRPGIdvHsAE0byYLv AnkH5xWBt/irCuRe3iX15QfXQHGpqvrV9mZv5FeJxTLvP4lGtk6tlnTpTAmu4naY3ucF oNDWwfPpCjwBXOS8W4R5g7KdTQ4pBc7GDtwpD+m6IuFdmKsKCTOFtdHO+7W7PHP6aHRy c61wE+/LFLyyj/FR5iqrerxfb1fgqCBXxmgr2F91/l8cRV5VyvpfNiV6ypqpJvPRM9pj S4i5h5shQMa/V+TI1cKp/lXR5sK5zXurQ0sTeWR1c/hvf7sa021VuX955KrCcxP6n94t jxqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GOQCKoAE; 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 v18-v6si5450873plo.81.2018.04.05.01.21.22; Thu, 05 Apr 2018 01:21:37 -0700 (PDT) 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=GOQCKoAE; 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 S1751417AbeDEIUO (ORCPT + 99 others); Thu, 5 Apr 2018 04:20:14 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:44816 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbeDEIUL (ORCPT ); Thu, 5 Apr 2018 04:20:11 -0400 Received: by mail-pl0-f68.google.com with SMTP id b6-v6so16122281pla.11 for ; Thu, 05 Apr 2018 01:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hYUMZGf56iTZMFjDGAfaI/bx8kp8/A/Nu1KHq0QePSw=; b=GOQCKoAE8P7x8WMSDtTQbn85AxfeZg1rpoA0RghDjg+F9aznaoCRTVh02TrY98HYKf 23MbVKhjsnbAoiIQku9VpLK+ud1yr2jzsmZsAKAhx4BtDF1NkSQQrQ0ab9K0T7fokDMv 7hexZTTb8Ob/lU9J8RBeRx4PrwFWan0OalvpZi8l4dYxadXBue4yJghOPPA3q8eU+QQk jgt+k1p8xO4hAMPvT6AJFlAiAlpAIB9oBLnDNdbaHYOCemRy99/Cibc1WbZuJFVxStkC y7OcarzXu1QBGZcl7y5dYuzvf4+ZyHYEjy9iqANJDgvfujnXJfQf2GGh+z/pSKdy2UDR 74Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hYUMZGf56iTZMFjDGAfaI/bx8kp8/A/Nu1KHq0QePSw=; b=uFxr3WPX48TbSX/GvIfokjvYVXvtlRPCb5NbIxzQ2bO775pjBMkP+9QtJxGtkKr1ch 1EHEqT5X/2BHz+jkPNU9c9MbbXGWOnkflsLK41OoLE1rgLeR9kzaEFQd3GiLx2k3+Evp 20GPVwtARxR4ZkZ9o9hyqhH9mgvu/8S7KhL+uQgQegHahiJXAKD5ss/FFTrswai92z7c dmDQQ6wM1MKYbFmBx4m1qRkxUsEMIdf4K7iXuALUcmU/W9RiSzdiJ3Rh88AzrhqE8niu 6BkLTEW9TXnlhVI74PBDOnISb12BM3sTxs5ggUMbtRBOUobhHFwhfd2EYeK8mKkwO8G5 oOgg== X-Gm-Message-State: AElRT7FvmYF8jp14qsymlVSQWPkMyvHydg9HbzBiEbvaUzZUzBqK38Iz 3OBwpbjJeJmbB/64MexXgR9CiQy2CgiLO88+T8HTyg== X-Received: by 10.101.64.7 with SMTP id f7mr14321897pgp.216.1522916410880; Thu, 05 Apr 2018 01:20:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.136 with HTTP; Thu, 5 Apr 2018 01:19:50 -0700 (PDT) In-Reply-To: <20180405063444.GA5877@kroah.com> References: <20180405063444.GA5877@kroah.com> From: Dmitry Vyukov Date: Thu, 5 Apr 2018 10:19:50 +0200 Message-ID: Subject: Re: WARNING: kobject bug in sysfs_warn_dup To: Greg KH , swhiteho@redhat.com, rpeterso@redhat.com, cluster-devel@redhat.com Cc: syzbot , LKML , syzkaller-bugs@googlegroups.com 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 Thu, Apr 5, 2018 at 8:34 AM, Greg KH wrote: > On Wed, Apr 04, 2018 at 07:02:01PM -0700, syzbot wrote: >> Hello, >> >> syzbot hit the following crash on upstream commit >> 3e968c9f1401088abc9a19ae6ff571644d37a355 (Wed Apr 4 21:19:24 2018 +0000) >> Merge tag 'ext4_for_linus' of >> git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 >> syzbot dashboard link: >> https://syzkaller.appspot.com/bug?extid=ff87a28e665c163aa7f5 >> >> C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5104666266304512 >> syzkaller reproducer: >> https://syzkaller.appspot.com/x/repro.syz?id=5683447737614336 >> Raw console output: >> https://syzkaller.appspot.com/x/log.txt?id=5104818200772608 >> Kernel config: >> https://syzkaller.appspot.com/x/.config?id=9118669095563550941 >> compiler: gcc (GCC) 7.1.1 20170620 >> >> IMPORTANT: if you fix the bug, please add the following tag to the commit: >> Reported-by: syzbot+ff87a28e665c163aa7f5@syzkaller.appspotmail.com >> It will help syzbot understand when the bug is fixed. See footer for >> details. >> If you forward the report, please keep this part and the footer. >> >> R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000003 >> R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000 >> ------------[ cut here ]------------ >> kobject_add_internal failed for nodev( with -EEXIST, don't try to register >> things with the same name in the same directory. >> sysfs: cannot create duplicate filename '/fs/gfs2/nodev(' >> WARNING: CPU: 1 PID: 4473 at lib/kobject.c:238 >> kobject_add_internal+0x8d4/0xbc0 lib/kobject.c:235 >> CPU: 0 PID: 4474 Comm: syzkaller533472 Not tainted 4.16.0+ #15 >> Kernel panic - not syncing: panic_on_warn set ... >> >> 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+0x1a7/0x27d lib/dump_stack.c:53 >> sysfs_warn_dup+0x83/0xa0 fs/sysfs/dir.c:30 >> sysfs_create_dir_ns+0x178/0x1d0 fs/sysfs/dir.c:58 >> create_dir lib/kobject.c:69 [inline] >> kobject_add_internal+0x335/0xbc0 lib/kobject.c:227 >> kobject_add_varg lib/kobject.c:364 [inline] >> kobject_init_and_add+0xf9/0x150 lib/kobject.c:436 >> gfs2_sys_fs_add+0x1ff/0x580 fs/gfs2/sys.c:652 >> fill_super+0x86f/0x1d70 fs/gfs2/ops_fstype.c:1118 >> gfs2_mount+0x587/0x6e0 fs/gfs2/ops_fstype.c:1321 > > gfs2 bug, not a sysfs bug, we are correctly warning about an incorrect > usage of the api. Then +gfs2 maintainers. > Now if we should turn this into a non-WARN message, that's a different > thing, I'll gladly take a patch for that. If it's API usage bug in higher level code, then I think WARN is a proper thing. We already had similar ones and they were fixed.