public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg KH <gregkh@suse.de>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	John Kacur <jkacur@redhat.com>, Andi Kleen <andi@firstfloor.org>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 4/6] USB-BKL: Remove BKL use in uhci-debug
Date: Wed, 02 Jun 2010 14:11:53 +0400	[thread overview]
Message-ID: <4C062E69.8050406@ru.mvista.com> (raw)
In-Reply-To: <1275426285-9088-5-git-send-email-arnd@arndb.de>

Hello.

Arnd Bergmann wrote:

> From: Andi Kleen <ak@linux.intel.com>

> BKL was not really needed, just came from earlier push downs.

> The only part that's a bit dodgy is the lseek function. Would
> need another lock or atomic access to fpos on 32bit?
> Better to have a libfs lseek

> Signed-off-by: Andi Kleen <ak@linux.intel.com>

[...]

> diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
> index 98cf0b2..b0cf4f8 100644
> --- a/drivers/usb/host/uhci-debug.c
> +++ b/drivers/usb/host/uhci-debug.c

[...]

> @@ -539,11 +534,11 @@ static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence)
>  		new = file->f_pos + off;
>  		break;
>  	}
> +
> +	/* XXX: Can size shrink? */
>  	if (new < 0 || new > up->size) {
> -		unlock_kernel();
>  		return -EINVAL;
>  	}

    Should have dropped {}...

> -	unlock_kernel();
>  	return (file->f_pos = new);
>  }

WBR, Sergei

  reply	other threads:[~2010-06-02 10:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 21:04 [PATCH 0/6] USB: BKL removal Arnd Bergmann
2010-06-01 21:04 ` [PATCH 1/6] USB-BKL: Remove lock_kernel in usbfs update_sb() Arnd Bergmann
2010-06-01 21:04 ` [PATCH 2/6] USB-BKL: Convert usb_driver ioctl to unlocked_ioctl Arnd Bergmann
2010-06-01 21:04 ` [PATCH 3/6] USB-BKL: Remove BKL use for usb serial driver probing Arnd Bergmann
2010-06-01 21:04 ` [PATCH 4/6] USB-BKL: Remove BKL use in uhci-debug Arnd Bergmann
2010-06-02 10:11   ` Sergei Shtylyov [this message]
2010-06-17 17:44     ` Greg KH
2010-06-02 13:47   ` Alan Stern
2010-06-17 17:43     ` Greg KH
2010-06-01 21:04 ` [PATCH 5/6] usb/gadget: Do not take BKL for gadget->ops->ioctl Arnd Bergmann
2010-06-18 13:59   ` Michał Nazarewicz
2010-06-18 18:22     ` Arnd Bergmann
2010-06-29 14:08     ` David Brownell
2010-06-01 21:04 ` [PATCH 6/6] usb/mon: kill BKL usage Arnd Bergmann
2010-06-17 17:46 ` [PATCH 0/6] USB: BKL removal Greg KH

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=4C062E69.8050406@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=arnd@arndb.de \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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