Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1490091iog; Thu, 16 Jun 2022 07:25:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDPlVgAz8K7kIQduA/rfrfbTma5eWxGa/mHxVHZ/Y0hdb2/R6yRRRlTnds13VVPz3GNNf0 X-Received: by 2002:a05:6402:3291:b0:42d:dd03:cbb1 with SMTP id f17-20020a056402329100b0042ddd03cbb1mr6796505eda.268.1655389533578; Thu, 16 Jun 2022 07:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655389533; cv=none; d=google.com; s=arc-20160816; b=xWJ5+XcN93sKl/HzlN7mXhyi1kjpvDTIEbK9oqqfBqi6lnRinr2oVVvfHPGAtr+hBs 36yFiVPaFGMkyFO3dlknXU8P8T+eo0D3eBcHMDORX3fkIRvx42Z+X2KbsEpGFG7im8ot 1vVA6leP15nXBBoNxX45GBfaocvpQcoWTE3Eydk7kMUpi8b8FKfBnhuQ5qKbFG0uWhoF H8lBq9nGv9eXI5Xmu07hH6+gBm4O9hSNPT/A5R7/VvCCOcvCRa/XweiM7zJIkA007w3A xHfGPhgDRYcITvMIKjGj7si7lpSYj4BIwYGq9FdjgF3x9Sce4HWGYIiwWitCOxMU/Xkd ei0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=2Hb1WIC7htcZUnTVocd9sTq0i8DWUd+UIspEOkNnz10=; b=RAYleKpa7ea4BtqH6U4z8iecDIbbumFwdguM3IALkZGq+mQcsNSbiJpVCOkXR5PNkf UMxFn9wpI4f+7BcdM9JZXt+CQ4R77nAtpu5Z6MCa0YdqNF/Pzq0YiPfrYCMvX1ENsNp6 PE/nkGQP8xgmGbgW7g7SS6dyshYEvZXGAK4p7s73N+k9cVNN8BCGeysLykEH78RjsQvr qVnMSSAzqDF5XZhhlZOocY8On6iivKC6y/mpQOxpheu7I507ZzGK+mu8GUucVLEjETV5 Z5hKpQkzvkQKiG1+y0Ergvn6LRa3pRDu11Wl69d4QJK2G6c3ESMMihN/1LXphS5xn5/t l9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=Rdxn534u; dkim=pass header.i=@codewreck.org header.s=2 header.b=QTlFwM8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a056402124c00b0042dd528577csi2491271edw.626.2022.06.16.07.25.07; Thu, 16 Jun 2022 07:25:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=Rdxn534u; dkim=pass header.i=@codewreck.org header.s=2 header.b=QTlFwM8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377280AbiFPNv5 (ORCPT + 99 others); Thu, 16 Jun 2022 09:51:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377275AbiFPNv4 (ORCPT ); Thu, 16 Jun 2022 09:51:56 -0400 Received: from nautica.notk.org (nautica.notk.org [91.121.71.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A659B41608; Thu, 16 Jun 2022 06:51:54 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 108) id 1CED5C01D; Thu, 16 Jun 2022 15:51:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1655387513; bh=2Hb1WIC7htcZUnTVocd9sTq0i8DWUd+UIspEOkNnz10=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rdxn534uKTaSDTnJiKZKi3gw63uExrASQ8SFeMr3Ze1hbArPYP1vZ4blzabc8AMAA tRTYSmBpprD6zoelusqs7oaZOgz8lZxCCmEPCSeh8nw109GGqJjdPFP8MV7ieaslqq JRO90MUCrLC2rGp3Cv2VCAgZt0mOYsNk5nDBgmu+y/SWxFNyVLRpoypJz/NS71r/S3 mFQWkcluCHS0ml4fH0tpAbVHkTZvpIyXRtsxdV2B4VSGPbKf5K9NGCgsJ0KtkNZPgN iKjIitmiBo1KOxxv7lmA/O6fk0ZCseUFiLa0Tqh0sT8Zc7D0pPrfl8T0S9XYeXltUH HQad/TpMqM7WA== X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from odin.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 319D6C009; Thu, 16 Jun 2022 15:51:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1655387512; bh=2Hb1WIC7htcZUnTVocd9sTq0i8DWUd+UIspEOkNnz10=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QTlFwM8XKRVvm2Y//7ChStOXQIIwD2Lu4eHvWvT2h0qHXFRtDtdO1mT0YWLnSyG6X nYBJiK36PBA9rueqp54TNCCcrmJzMC4GMxd0km7GjC3PuSd1Y+/vvfTGBpSjtIvY1w XcprBK83g+J5v1zhy32WW0zgbl0TyxGpZF7uvVDkYsz33vcbYKCz5N/BKodb5eKryM 0nM/nilLra97HaoleGvFSO77l8v/5n96g0BDhPA5TjLwjIblOO3u1rmzjSvBt06t5c IqKmEZySzErOC20CfAPn7X3N7ApmdVnIgR3qFJs5AKe3++/Dzh/HzTTeoDFqHemJlH N0JIVIUu35rIw== Received: from localhost (odin.codewreck.org [local]) by odin.codewreck.org (OpenSMTPD) with ESMTPA id c6d6cc5f; Thu, 16 Jun 2022 13:51:46 +0000 (UTC) Date: Thu, 16 Jun 2022 22:51:31 +0900 From: Dominique Martinet To: Christian Schoenebeck Cc: Eric Van Hensbergen , Latchesar Ionkov , David Howells , linux-fsdevel@vger.kernel.org, stable@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] 9p: fix EBADF errors in cached mode Message-ID: References: <1796737.mFSqR1lx0c@silver> <22073313.PYDa2UxuuP@silver> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <22073313.PYDa2UxuuP@silver> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christian Schoenebeck wrote on Thu, Jun 16, 2022 at 03:35:59PM +0200: > 2. I fixed the conflict and gave your patch a test spin, and it triggers > the BUG_ON(!fid); that you added with that patch. Backtrace based on > 30306f6194ca ("Merge tag 'hardening-v5.19-rc3' ..."): hm, that's probably the version I sent without the fallback to private_data fid if writeback fid was sent (I've only commented without sending a v2) > 1. your EBADF patch is based on you recent get/put refactoring patch, so it won't apply on stable. ugh, you are correct, that was wrong as well in the version I sent by mail... I've hurried that way too much. The patch that's currently on the tip of my 9p-next branch should be alright though, I'll resend it now so you can apply cleanly if you don't want to fetch https://github.com/martinetd/linux/commits/9p-next > Did your patch work there for you? I mean I have not applied the other pending > 9p patches, but they should not really make difference, right? I won't have > time today, but I will continue to look at it tomorrow. If you already had > some thoughts on this, that would be great of course. Yes, my version passes basic tests at least, and I could no longer reproduce the problem. Without the if (!fid) fid = file->private_data though it does fail horribly like you've found out. -- Dominique