public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Su Weifeng <suweifeng1@huawei.com>
Cc: mst@redhat.com, linux-kernel@vger.kernel.org,
	shikemeng@huawei.com, liuzhiqiang26@huawei.com,
	linfeilong@huawei.com, zhanghongtao22@huawei.com
Subject: Re: [PATCH v3] uio:uio_pci_generic:Don't clear master bit when the process does not exit
Date: Thu, 9 Mar 2023 12:05:07 +0100	[thread overview]
Message-ID: <ZAm9Y2O97doFXksF@kroah.com> (raw)
In-Reply-To: <20230304074316.736922-1-suweifeng1@huawei.com>

On Sat, Mar 04, 2023 at 03:43:16PM +0800, Su Weifeng wrote:
> From: Weifeng Su <suweifeng1@huawei.com>
> 
> The /dev/uioX device has concurrent operations in a few scenarios.

And you just broke that :(

> For example, when a process is operating the uio0 device, someone executes
> like "cat /dev/uio0" command. In this case, the bus master bit is cleared
> unconditionally.

It is cleared when the close happens, not when "cat" runs.

So prevent userspace from doing that with permissions, why must the
kernel enforce this policy you are making?

> As a result, the running program cannot work commands
> or I/Os, which is usually unaware of. This happens after
> 865a11f("uio/uio_pci_generic: Disable bus-mastering on release");

Please always reference commits in the documented way.

> The restriction on the process that uses the PCI device is added. The new
> process can be used only after the process that uses the PCI device exits.
> Otherwise, the system returns a message indicating that the device is busy.

Again, you are changing the functionality of the kernel, are you sure
you did not just now break something else?

thanks,

greg k-h

      reply	other threads:[~2023-03-09 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04  7:43 [PATCH v3] uio:uio_pci_generic:Don't clear master bit when the process does not exit Su Weifeng
2023-03-09 11:05 ` Greg KH [this message]

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=ZAm9Y2O97doFXksF@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=mst@redhat.com \
    --cc=shikemeng@huawei.com \
    --cc=suweifeng1@huawei.com \
    --cc=zhanghongtao22@huawei.com \
    /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