Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1874493pxu; Sat, 17 Oct 2020 04:15:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKWUKas67IEb22HJl5BfTz4AaCQ8J+2084WfyjwNTBehv64uHlJvdUFbaqTmE6QPPUz2r3 X-Received: by 2002:aa7:d2d5:: with SMTP id k21mr8470082edr.62.1602933348764; Sat, 17 Oct 2020 04:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602933348; cv=none; d=google.com; s=arc-20160816; b=0xbV4egpd9EckS/GQfmPeQ/FNYMjHKA3u+ZUra0CpHAPkbbJsMmMnbbIycRgrkaQQP HkQucQFEcQ+k49sKpCX4pgKxh0SIsdOyKGOw8VpIQhIRvGP0Dx7biclFD0gS8/D+FXku Mp0Ko6PEGjYDNUZ73nV1gKjJUKGE3U69RyIUlcrMAGROKqfoPC4gy22NiR2pdUgFxeAF aKcBfs/WI49Nmi4rHSnUF0Dw8KR58DIIX5+cX2DRh+o4JjNGVf505KIYVCdXlTDlivni 6WLJXJy6UeKpyMa7SwWdUO/UULyUQePEdVGwaaf37OhcY3rOokvslbidSI3nnf4iMnoA gqXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=t277L0PtjJn0YRpElwpWbcmjWJZElTZ49NHaOID2Uro=; b=Nxby+JYQHFSiz+7Hmi6/vfDt1AZRUEK5GwPg5SZwaefL+bTrrtdhQcu1k8nIFBKufa VeopUNp8tA6QTAoay4OQnRloo8NDwqfbkMty9+Z9zx3SeTYHsI9nE/kDGQIuCyKniz9j /AXqLprJLdYtrBcGDLCkGOkHoIgynyauaevmQb2KdTtW4/BjfX0/HuFig4XWoVR4INd5 rsgqSwBEg0vChI/O3vDkI+XCIIGPs13MylTS8wJlyeA+DRgAQMuVhe7dKOMobiSrWt3l wSf2FfmsvEc2hrwcuHGdA8DQMz2AIaLepVXvM+5vWbAa7Va0FVzVsDH2UMFTEuZRqChi 4gJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si4180187ejm.497.2020.10.17.04.15.27; Sat, 17 Oct 2020 04:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437348AbgJQLNe (ORCPT + 99 others); Sat, 17 Oct 2020 07:13:34 -0400 Received: from smtp1.kaist.ac.kr ([143.248.5.228]:53263 "EHLO smtp1.kaist.ac.kr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437174AbgJQLNe (ORCPT ); Sat, 17 Oct 2020 07:13:34 -0400 X-Greylist: delayed 394 seconds by postgrey-1.27 at vger.kernel.org; Sat, 17 Oct 2020 07:13:33 EDT Received: from unknown (HELO mail1.kaist.ac.kr) (143.248.5.247) by 143.248.5.228 with ESMTP; 17 Oct 2020 20:06:50 +0900 X-Original-SENDERIP: 143.248.5.247 X-Original-MAILFROM: dae.r.jeong@kaist.ac.kr X-Original-RCPTTO: linux-kernel@vger.kernel.org Received: from kaist.ac.kr (143.248.133.220) by kaist.ac.kr with ESMTP imoxion SensMail SmtpServer 7.0 id <595760cb0b67440a9c04038fe1fdce40> from ; Sat, 17 Oct 2020 20:06:51 +0900 Date: Sat, 17 Oct 2020 20:06:51 +0900 From: "Dae R. Jeong" To: song@kernel.org Cc: yjkwon@kaist.ac.kr, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: WARNING in md_ioctl Message-ID: <20201017110651.GA1602260@dragonet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I looked into the warning "WARNING in md_ioctl" found by Syzkaller. (https://syzkaller.appspot.com/bug?id=fbf9eaea2e65bfcabb4e2750c3ab0892867edea1) I suspect that it is caused by a race between two concurrenct ioctl()s as belows. CPU1 (md_ioctl()) CPU2 (md_ioctl()) ------ ------ set_bit(MD_CLOSING, &mddev->flags); did_set_md_closing = true; WARN_ON_ONCE(test_bit(MD_CLOSING, &mddev->flags)); if(did_set_md_closing) clear_bit(MD_CLOSING, &mddev->flags); If the above is correct, this warning is introduced in the commit 065e519e("md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop"). Could you please take a look into this? Best regards, Dae R. Jeong