mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Yang Shen <shenyang39@huawei.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-crypto@vger.kernel.org,
	linux-accelerators@lists.ozlabs.org
Subject: Re: [PATCH] uacce: fix concurrency of fops_open and uacce_remove
Date: Mon, 20 Jun 2022 14:25:39 +0100	[thread overview]
Message-ID: <YrB1U29QVHcKV3g8@myrica> (raw)
In-Reply-To: <1fab1f9a-5c6c-8190-829b-4bacf15eb306@linaro.org>

On Fri, Jun 17, 2022 at 10:23:13PM +0800, Zhangfei Gao wrote:
> @@ -312,12 +345,20 @@ static ssize_t available_instances_show(struct device
> *dev,
>                      char *buf)
>  {
>      struct uacce_device *uacce = to_uacce_device(dev);
> +    ssize_t ret;
> 
> -    if (!uacce->ops->get_available_instances)
> -        return -ENODEV;
> +    mutex_lock(&uacce_mutex);
> +    if (!uacce->ops || !uacce->ops->get_available_instances) {

Doesn't the sysfs group go away with uacce_remove()?  We shouldn't need
this check

Thanks,
Jean

  reply	other threads:[~2022-06-20 14:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 12:34 Zhangfei Gao
2022-06-15 15:16 ` Jean-Philippe Brucker
2022-06-16  4:10   ` Zhangfei Gao
2022-06-16  8:14     ` Jean-Philippe Brucker
2022-06-17  6:05       ` Zhangfei Gao
2022-06-17  8:20         ` Zhangfei Gao
2022-06-17 14:23           ` Zhangfei Gao
2022-06-20 13:25             ` Jean-Philippe Brucker [this message]
2022-06-20 13:24         ` Jean-Philippe Brucker
2022-06-20 13:36           ` Greg Kroah-Hartman
2022-06-21  7:37             ` Zhangfei Gao
2022-06-21  7:44               ` Greg Kroah-Hartman
2022-06-22  8:14                 ` Zhangfei Gao
2022-06-22  8:24                   ` Greg Kroah-Hartman
2022-06-20 13:38           ` Greg Kroah-Hartman
2022-06-20 20:18           ` [PATCH] uacce: Tidy up locking kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YrB1U29QVHcKV3g8@myrica \
    --to=jean-philippe@linaro.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-accelerators@lists.ozlabs.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shenyang39@huawei.com \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®