Received: by 10.213.65.68 with SMTP id h4csp1674362imn; Thu, 5 Apr 2018 01:37:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49PuNZgG0boetTcQI6jJkZ6JoUHRWcmg7Lv9KtHDsopnBRQ39HM8mtG5L8f55P3FMHsweil X-Received: by 10.99.133.193 with SMTP id u184mr14394532pgd.141.1522917466950; Thu, 05 Apr 2018 01:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522917466; cv=none; d=google.com; s=arc-20160816; b=1D6OltVoQ3SSaWT9zGAzd/MtJcgOiG2sQoLXqMlTQ563zQHsVZp7DflMDBHGTArIwK l2DIpYIdk0JWfBSywG28U1f7xHl5+3SUM8vJzf0/npC2kl6zDqbEXYu7/fiFGM5IBqNu ZYtpVMrqwLhExq+oQrB1AiOo0680GpMp3j1V00zX4JEpzu1cb8yD+qtIVUJvByBc2Aly YoCDUQ1it2vwMCQlheJk7g9P2dvBnisYPYWnuelojxkPlQZF7wECJapagTDL+8A9Ls4N z0Y+n0KplKkOc+v3jx2n+YIsbNUae8BB9eStwxDajJ/40qbfmC6M4hONCySJbO8ITOAA xudw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=mXt11FOn6yTYoIkVd/sJcKLJ/TgHAS+IVXcueeMnXJg=; b=QMm1xeMEnqYTsS/8Wjg6p19F4tNkhjcQslvyDCnQaHAqLHtXfj9Xi1ht1sPGhhz/lj CBeKF+O+7kJ0BA6Dc19dZWXEGliHA3MV61c3uRx2+10zTxRuDlVI9yaz/ClAlsw6pt1A aM24nS+tjbOAgtBmiFDzvfp5A5mHNxEslIVCWPzaC/Ka3P5TYU0SZE+xm5QbACQNKwQU xKIjpeGA84zdT09A7vH5gCOgP9ZyivYWZdIenzZN5TzhrMUnNP3IKPioTklEGoQ4m0zF YKpOD2U9amWYDEEh3kPuqFER+5RzQQ+e9FJQoVM1m1kbKn03GAtqdRoUt/ATiUXahVDU 7xFw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si5062470pgj.458.2018.04.05.01.37.32; Thu, 05 Apr 2018 01:37:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259AbeDEIg2 (ORCPT + 99 others); Thu, 5 Apr 2018 04:36:28 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45046 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751097AbeDEIgY (ORCPT ); Thu, 5 Apr 2018 04:36:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B27697C6DC; Thu, 5 Apr 2018 08:36:23 +0000 (UTC) Received: from 117.195.187.81.in-addr.arpa (unknown [10.33.36.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id E14619458A; Thu, 5 Apr 2018 08:36:19 +0000 (UTC) Subject: Re: WARNING: kobject bug in sysfs_warn_dup To: Dmitry Vyukov , Greg KH , rpeterso@redhat.com, cluster-devel@redhat.com Cc: syzbot , LKML , syzkaller-bugs@googlegroups.com References: <20180405063444.GA5877@kroah.com> From: Steven Whitehouse Message-ID: <26e497b0-1e10-d9c6-73eb-e0feed9a60ea@redhat.com> Date: Thu, 5 Apr 2018 09:36:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 05 Apr 2018 08:36:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 05 Apr 2018 08:36:23 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'swhiteho@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 05/04/18 09:19, Dmitry Vyukov wrote: > 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. I'm trying to figure out what the test is doing, but it is not very clear. At a guess I'd say that perhaps it is trying to mount multiple filesystems with the same label? If that is the case then it is not allowed, and it should be caught be the sysfs code and result in a refusal to mount, which is what I think I see here. Knowing which sysfs directory is involved would allow us to confirm, but I suspect that the test needs altering to give each gfs2 mount a different label at an initial guess, Steve.