mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: xiubli@redhat.com
Cc: linux-kernel@vger.kernel.org, pkalever@redhat.com,
	pkarampu@redhat.com, atumball@redhat.com, sabose@redhat.com,
	mchristi@redhat.com
Subject: Re: [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock
Date: Thu, 5 Jul 2018 18:33:38 +0200	[thread overview]
Message-ID: <20180705163338.GA14941@kroah.com> (raw)
In-Reply-To: <1530808048-9494-2-git-send-email-xiubli@redhat.com>

On Thu, Jul 05, 2018 at 12:27:27PM -0400, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
> 
> We are hitting a regression with the following commit:
> 
> commit a93e7b331568227500186a465fee3c2cb5dffd1f
> Author: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
> Date:   Mon May 14 13:32:23 2018 +1200
> 
>     uio: Prevent device destruction while fds are open
> 
> The problem is the addition of spin_lock_irqsave in uio_write. This
> leads to hitting  uio_write -> copy_from_user -> _copy_from_user ->
> might_fault and the logs filling up with sleeping warnings.
> 
> I also noticed some uio drivers allocate memory, sleep, grab mutexes
> from callouts like open() and release and uio is now doing
> spin_lock_irqsave while calling them.
> 
> Reported-by: Mike Christie <mchristi@redhat.com>
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>  drivers/uio/uio.c          | 33 ++++++++++++++-------------------
>  include/linux/uio_driver.h |  2 +-
>  2 files changed, 15 insertions(+), 20 deletions(-)

Any specific reason you did not also cc: the author of the above patch
to review this one?

Please fix up and resend.

greg k-h

  reply	other threads:[~2018-07-05 16:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 16:27 [PATCH 0/2] uio: fix potential crash bug xiubli
2018-07-05 16:27 ` [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock xiubli
2018-07-05 16:33   ` Greg KH [this message]
2018-07-05 23:21     ` Xiubo Li
2018-07-05 16:27 ` [PATCH 2/2] uio: fix crash after the device is unregistered xiubli
2018-07-05 20:56   ` Jann Horn
2018-07-05 23:23     ` Xiubo Li

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=20180705163338.GA14941@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=atumball@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchristi@redhat.com \
    --cc=pkalever@redhat.com \
    --cc=pkarampu@redhat.com \
    --cc=sabose@redhat.com \
    --cc=xiubli@redhat.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

Powered by JetHome