Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp500070imm; Wed, 11 Jul 2018 06:18:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcCv6q2GAxUPMwsBRXschB7Q3uAiiIiJyYrBAPj0gXjJdYuQklI8U5IZQScQkVVJwYP8evX X-Received: by 2002:a62:283:: with SMTP id 125-v6mr30037763pfc.51.1531315087338; Wed, 11 Jul 2018 06:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531315087; cv=none; d=google.com; s=arc-20160816; b=fwxJEihzHwi8R6tTB4JgFEIfHSLiEwDHxZI7KUmd0YJMXWR2XC7F+O2RAiHqTm76z7 CPWgiCq9wv2oG7gqECK7ZUO/gYpjR2alXT0jzuktsStM1rKyQqDRZeOrddspvXgUBqtu P8fyndqK54OV1tbTJQWQ/5u8pAEKwH2D9iN32BRRBlHeNUAXGnW8+PK17repe/xdxOL3 gA6zhAIoPw2xv2R+wvbGr4jo+fAlwGklxvU20UY5e0gBHN2WkpworJWY1Ap+sE9L5Lcc 7fbAfCtTKwIv9OFOXN8HeI14j5m2RUvf18VsWtWUd8xafGwPpxE09mJcgXGk6IKH9FIB jHlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ZUltF0npA//UKgQtzhT8p2kjr6/3movVZVA23/V/nSI=; b=WHwVrRPAeAVwYHQBYNxWS1GRxOl350OqA60iQUcRceZ8Z6gyo5SoF0shqodG3Qfn1I qn62Au32FNJYtP2uD6dycgmHtjAB9t+h41ALdbzKV4BFldVqwNKIH0/Aze3GBWAB3ifC 4EwnEAW/+V8gBCrakcKrQ7T2m5TCKZNIyVIb9xUT0fZesR6U2yDySMjVxZSP8rFlQ1Z8 yMwK3VlYkdmhmM6HFykcCHLmyHymbNiHR7s0RJpi5MUJI/WM2IBSjCNvnEpKpmI35uKK ruSXTcjvG9kHncFd3WzGBBEIdFN0OeihcFSx1gAXXufM3wZBmPNs8q9oeHCQxjIxYsR4 f7Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="RwTAzJ1/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b135-v6si17799418pga.51.2018.07.11.06.17.50; Wed, 11 Jul 2018 06:18:07 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="RwTAzJ1/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387427AbeGKNNQ (ORCPT + 99 others); Wed, 11 Jul 2018 09:13:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38130 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726575AbeGKNNQ (ORCPT ); Wed, 11 Jul 2018 09:13:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZUltF0npA//UKgQtzhT8p2kjr6/3movVZVA23/V/nSI=; b=RwTAzJ1/4oq3FaSbbxRvvNG/E 2Wpomiy/Fc+9ANekliG0j9ft6fv7IYXOiPGvGrQq+Rjn1LAE8rrk0vA5e1emJf2h5NkEzBoL9jtkT zyF5Nw7cExT4WHGeYqh87u55agkekZSGWzRQmckiHSIJEStp6sAeuPXYB5wfnBIw2zVf7/Mm49pGx YPKyFOeo+2aVbE8D4ujXz8XAi0qXaYdoWagRMw24OLoFrIwFmqxo/sRObennJGapEN7tWWOhgDqCS nmANxPeR92C+4+F2jxRpkKBIRtncvq3AC4BujMBCZOW0yW9KZWulCFoxPeh33O/xlxzTrQ/3IFhxW 1MLYehNag==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdErX-0002h9-Ix; Wed, 11 Jul 2018 13:08:55 +0000 Date: Wed, 11 Jul 2018 06:08:54 -0700 From: Matthew Wilcox To: Dominique Martinet Cc: v9fs-developer@lists.sourceforge.net, Latchesar Ionkov , Eric Van Hensbergen , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ron Minnich Subject: Re: [V9fs-developer] [PATCH 2/6] 9p: Replace the fidlist with an IDR Message-ID: <20180711130854.GB23640@bombadil.infradead.org> References: <20180628132629.3148-1-willy@infradead.org> <20180628132629.3148-3-willy@infradead.org> <20180711124038.GB835@nautica> <20180711125219.GA23640@bombadil.infradead.org> <20180711125812.GA9691@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711125812.GA9691@nautica> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 11, 2018 at 02:58:12PM +0200, Dominique Martinet wrote: > > I don't understand your assertion that this is a change of behaviour. > > The implementation of p9_idpool_get() uses idr_alloc(), not > > idr_alloc_cyclic(), so I don't believe I've changed which FID would > > be allocated. > > Hmm, I just tried mounting something with ganesha and that broke because > it received fid=1730858632 in a TATTACH request, so something in the > patch series made some big fid happens. > > If you say this isn't intented though this needs debugging, I'm glad I > brought this up :P > > (Note that it really should be fine if it is random within the pool, I > have notified the current developpers of the problem) Heh, unintended protocol fuzzing ;-) I see the problem; need to initialise fid->fid to 0 before calling idr_alloc_u32. I'd misread: memset(&fid->qid, 0, sizeof(struct p9_qid)); as memset(fid, 0, sizeof(struct p9_fid)); so I thought fid->fid was already 0. I'll fix that up, thanks!