From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A061C04E84 for ; Thu, 16 May 2019 12:32:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B2882087E for ; Thu, 16 May 2019 12:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727344AbfEPMcD (ORCPT ); Thu, 16 May 2019 08:32:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:46880 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726742AbfEPMcD (ORCPT ); Thu, 16 May 2019 08:32:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D2229AFBE; Thu, 16 May 2019 12:32:01 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 879F81E3ED6; Thu, 16 May 2019 14:32:01 +0200 (CEST) Date: Thu, 16 May 2019 14:32:01 +0200 From: Jan Kara To: Tetsuo Handa Cc: Jan Kara , Jens Axboe , Alexander Viro , syzbot , dvyukov@google.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, linux-block@vger.kernel.org Subject: Re: INFO: task hung in __get_super Message-ID: <20190516123201.GG13274@quack2.suse.cz> References: <0000000000002cd22305879b22c4@google.com> <201905150102.x4F12b6o009249@www262.sakura.ne.jp> <20190515102133.GA16193@quack2.suse.cz> <024bba2a-4d2f-1861-bfd9-819511bdf6eb@i-love.sakura.ne.jp> <20190515130730.GA9526@quack2.suse.cz> <20190516114817.GD13274@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 16-05-19 21:17:14, Tetsuo Handa wrote: > On 2019/05/16 20:48, Jan Kara wrote: > > OK, so non-racy fix was a bit more involved and I've ended up just > > upgrading the file reference to an exclusive one in loop_set_fd() instead > > of trying to hand-craft some locking solution. The result is attached and > > it passes blktests. > > blkdev_get() has corresponding blkdev_put(). > bdgrab() does not have corresponding bdput() ? Yes, and that's hidden inside blkdev_put() (or failing blkdev_get()). Don't get me started on calling conventions of these functions... I've wasted half an hour trying to figure out where I'm leaking inode references in my patch ;). Honza -- Jan Kara SUSE Labs, CR