Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1676575rwb; Thu, 29 Sep 2022 00:09:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4P+x7pGsq6QLA+bvzH3L1fP+pZqOkwx6CnC32ynvY2Ac6u6GyPKBc63gN9Rzfqhe5GO7k1 X-Received: by 2002:a17:907:3da3:b0:785:d09f:addd with SMTP id he35-20020a1709073da300b00785d09fadddmr1518995ejc.330.1664435359267; Thu, 29 Sep 2022 00:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664435359; cv=none; d=google.com; s=arc-20160816; b=ANM+fkqjHtQ33ILjvJ2bFMqrjihVlwYHxPfCbDXTRcpI1Ec6fujhqyQFCINjT+TMDE P7HtZNjmmTdshMw7KI3WaQc3fNGVMdrKHs1CG0MgNW6D3IrAIKpH5CBBh6VVW2p7Ik44 UmT8mstlmULA+FFGfYJdFJFDR0MtMlyY4MXXgBj4WZIKyk1emzvg5QWSh9wsPs9Oq7Bb LWMgipFAAjjO7F7krDZIHk0Y0tjs1C2rIHUDyrg+Ave3Fe4yGRLr0ik/tw5nWPFBXVqq UqqWDCJuNrDaYCMIgPS3///YE27UFSNV6MmsT3jMFOBWGj0uW6w38smnfhnjMQX21R3M ITAQ== 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=jnYXx8RyU8Xz38FBBjgJIXss06fviVw1nDupFosbI1E=; b=s7wv2iMR0LyhKEruRDixF0SNQ79t3Ik2HSJyJdZcz/wNdOu7bLyXqQ5yK3aJBQbJBH XcDNwilmgWGhGWzEfHi5tGYaP810xGBTCmcjVIMbNfNPPuzMw+4e4EBlNfm7wZY7JTtj zEZyQOkX4c2z/otzbc+pjce7d1f2PddJkNG8GjOU/xAwCDf1X65cUcxYr8C8ibnNFGCX EkiQ3lOvChAs8AD2qO+mk6VxjXW5YjsvLtKhQ5kfXnqXb9pMC2Z6IlkfX1UgJDQwdq32 9HLvhJGc2H4RAmh1diu80QxxN0ueM6pBCMvl22bM2XNAQdegfr3N2Adb9qoZe6gk3Ew+ BwUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=vi7DUuTg; dkim=pass header.i=@codewreck.org header.s=2 header.b=vi7DUuTg; 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 h14-20020aa7c60e000000b004584e4d62c3si248257edq.187.2022.09.29.00.08.53; Thu, 29 Sep 2022 00:09:19 -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=vi7DUuTg; dkim=pass header.i=@codewreck.org header.s=2 header.b=vi7DUuTg; 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 S235049AbiI2HEl (ORCPT + 99 others); Thu, 29 Sep 2022 03:04:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235077AbiI2HE0 (ORCPT ); Thu, 29 Sep 2022 03:04:26 -0400 Received: from nautica.notk.org (nautica.notk.org [91.121.71.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77295131F69 for ; Thu, 29 Sep 2022 00:04:13 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 108) id 91B99C01D; Thu, 29 Sep 2022 09:04:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1664435050; bh=jnYXx8RyU8Xz38FBBjgJIXss06fviVw1nDupFosbI1E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vi7DUuTg1NGRDGjgO8BHjnNsST4FQrlM17K62hZQZV9IPwqEXqxsOXn9AaMgnzX0q TsMdnEksZLwa5hFYeyAGJaWPb5W8ds0Jbj535bo3fDFTBCVhzSPCZL0AAQrtHq91b7 yWXA3pft1fA2NIg6wwhnnDAPz4dHFDIzIEWwITvF7aIsasTfJbc43WOumi9Jn2C2m2 SCwRSJaSSLqkmLeQrj782dJ+yAsAaV3gjEseASZUKJ3otLJM1HlaEV/w3SkuBr7di/ foQlfT/7cUtfzbGPZC81xpvrzFA3MC3JTS6LXov/PFItLXDAEt6EyC4jAozjpeAH9V z0dMr9YNF2Q7g== 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 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 5D81FC009; Thu, 29 Sep 2022 09:04:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1664435050; bh=jnYXx8RyU8Xz38FBBjgJIXss06fviVw1nDupFosbI1E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vi7DUuTg1NGRDGjgO8BHjnNsST4FQrlM17K62hZQZV9IPwqEXqxsOXn9AaMgnzX0q TsMdnEksZLwa5hFYeyAGJaWPb5W8ds0Jbj535bo3fDFTBCVhzSPCZL0AAQrtHq91b7 yWXA3pft1fA2NIg6wwhnnDAPz4dHFDIzIEWwITvF7aIsasTfJbc43WOumi9Jn2C2m2 SCwRSJaSSLqkmLeQrj782dJ+yAsAaV3gjEseASZUKJ3otLJM1HlaEV/w3SkuBr7di/ foQlfT/7cUtfzbGPZC81xpvrzFA3MC3JTS6LXov/PFItLXDAEt6EyC4jAozjpeAH9V z0dMr9YNF2Q7g== Received: from localhost (odin.codewreck.org [local]) by odin.codewreck.org (OpenSMTPD) with ESMTPA id dc3ba70a; Thu, 29 Sep 2022 07:04:05 +0000 (UTC) Date: Thu, 29 Sep 2022 16:03:50 +0900 From: Dominique Martinet To: Leon Romanovsky Cc: v9fs-developer@lists.sourceforge.net, linux_oss@crudebyte.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH 2/2] 9p: client_create: init fcall_cache earlier Message-ID: References: <20220928214417.1749609-1-asmadeus@codewreck.org> <20220928214417.1749609-2-asmadeus@codewreck.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leon Romanovsky wrote on Thu, Sep 29, 2022 at 08:57:31AM +0300: > > + * followed by data accessed from userspace by read > > + * Note we do not check for failure here because the cache is > > + * optional; warning will be issued on dmesg for failure. > > + */ > > + clnt->fcall_cache = > > + kmem_cache_create_usercopy("9p-fcall-cache", clnt->msize, > > + 0, 0, P9_HDRSZ + 4, > > + clnt->msize - (P9_HDRSZ + 4), > > + NULL); > > + > > clnt->msize can be changed after call to ->create() if it is larger than clnt->trans_mod->maxsize). Ugh, that's what I get for doing this in a hurry because you're all talking about order this order that... This is absolutely correct, I'm dropping this patch. -- Dominique