Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2933769iog; Mon, 20 Jun 2022 07:47:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u5V/Mb+q8/XdAJe0fJrVi6JaEVNJRM/Z42usxw3n/mNFiOXOhCOtDEsI9kDKrBaPQa/FZm X-Received: by 2002:aa7:90c4:0:b0:521:2cd6:bd3e with SMTP id k4-20020aa790c4000000b005212cd6bd3emr24895362pfk.19.1655736438375; Mon, 20 Jun 2022 07:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736438; cv=none; d=google.com; s=arc-20160816; b=kblTMd09C0TtbLryvtDniHTP1RClQb0uorsyWMIuISjmAhx9OVi998GukyYceEz+gt aQmSzdtYWwnWa0poZ4fn0kW+fSINJAXEIdudg+tEAwx7K7k97HasvcLv07SZhVOZtIX5 CUzWm5I2avvGjzNvrPNCxWCnKQUGvjJSoU+t9o0rHFTZvlFg+roxFz7JBgiMqncMpSK8 NeF+0md88jGTHk0yJ9CCCRlA0ZH0jLFh/qS4EvH/+a4tfu8bHz8BrXEDolunMSASNQoG McE5/IE5U9hc8X7NjKSoys7XvN8IHA7826urxpInuD6aWM8LySzjqjTtIeVYmIF+/Os6 jsLg== 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; bh=LinUmtzjsyytkuAr+Q0sjFwp3YB2DU9PUleVHCxc3pA=; b=ZjXhPiFH+4VPy2rZDz/xzMR0UhOdSoo96QLoZ52mQTsUKPm+RRov3FbrwjrsDaK9Pb EIYuOI4EuDRqoRROjVUtzKzPP+zxbyBpEH8YqmPO1HRX3quYpDQxLogT4DdMRYDzWw2d G6xDnMYn7jr+0unZ0DOkRknCVFNHohh59rbncqLXBKuszQwEQjW8ZU0q09bqwwY+IaeT rS1V/CvjETbrAapeL8vy6KmbDey8Zci0m+JQYgyzNtuFq9JiCRO1r5Zx9g5XgOLOUD5E mNaPU4QEt5/2sqzszyMGZ2q33oh43fwtPtR/im6x1614imLoIkKXN/Ob2plMyB//IX51 vW4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MY0okBXn; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020aa79ae5000000b0050e0d9b0e4dsi7442828pfp.166.2022.06.20.07.46.54; Mon, 20 Jun 2022 07:47:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@linuxfoundation.org header.s=korg header.b=MY0okBXn; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245449AbiFTOX7 (ORCPT + 99 others); Mon, 20 Jun 2022 10:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245182AbiFTOXs (ORCPT ); Mon, 20 Jun 2022 10:23:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6731B1EEEC; Mon, 20 Jun 2022 06:38:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 22394B811C2; Mon, 20 Jun 2022 13:38:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33985C3411C; Mon, 20 Jun 2022 13:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655732335; bh=+fFogW7MYgbcV+/+vdX3im2l7WY1OGpRvAvNxoxAPyI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MY0okBXnmX/EcirZ4FWy0Au4Y8zBCrkzVtpjevX0FoB6qwpJTz30gOQFAAt4oN6Wp DW3fpwxgyyETQUYYDXCMkZ3HFC4L2BRZ0in3174sgFIpi+tOiSnguvTwsE9p523sUu fFtI9jPYwiStyH0GgovpWMaPLWnOVLDFBXv5s+7c= Date: Mon, 20 Jun 2022 15:38:32 +0200 From: Greg Kroah-Hartman To: Jean-Philippe Brucker Cc: Zhangfei Gao , Arnd Bergmann , Herbert Xu , Wangzhou , Jonathan Cameron , linux-accelerators@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, Yang Shen Subject: Re: [PATCH] uacce: fix concurrency of fops_open and uacce_remove Message-ID: References: <20220610123423.27496-1-zhangfei.gao@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jun 20, 2022 at 02:24:31PM +0100, Jean-Philippe Brucker wrote: > >From c7c2b051ec19285bbb973f8a2a5e58bb5326e00e Mon Sep 17 00:00:00 2001 > From: Jean-Philippe Brucker > Date: Mon, 20 Jun 2022 10:10:41 +0100 > Subject: [PATCH] uacce: Tidy up locking > > The uacce driver must deal with a possible removal of the parent driver > or device at any time. No it should not, if the reference counting logic is properly set up. The parent driver should correctly tear things down here. > At the moment there are several issues that may > result in use-after-free. Tidy up the locking to handle module removal. I don't think you did that, as module removal should never happen if a file descriptor is opened as I previously mentioned. thanks, greg k-h