From: Frederic Weisbecker <fweisbec@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
John Kacur <jkacur@redhat.com>,
Sven-Thorsten Dietrich <sven@thebigcorporation.com>,
Jonathan Corbet <corbet@lwn.net>,
Alessio Igor Bogani <abogani@texware.it>,
Greg KH <gregkh@suse.de>
Subject: [PATCH] nvram: Drop the bkl from non-generic nvram_llseek()
Date: Fri, 9 Oct 2009 21:27:06 +0200 [thread overview]
Message-ID: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> (raw)
Drop the bkl from nvram_llseek() as it obviously protects nothing.
The file offset is safe in essence.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: John Kacur <jkacur@redhat.com>
Cc: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Alessio Igor Bogani <abogani@texware.it>
Cc: Greg KH <gregkh@suse.de>
---
drivers/char/nvram.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index b2a7eaf..d1e3987 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -214,7 +214,6 @@ void nvram_set_checksum(void)
static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
- lock_kernel();
switch (origin) {
case 0:
/* nothing to do */
@@ -226,7 +225,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
offset += NVRAM_BYTES;
break;
}
- unlock_kernel();
+
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;
}
--
1.6.2.3
next reply other threads:[~2009-10-09 19:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-09 19:27 Frederic Weisbecker [this message]
2009-10-14 15:49 ` [tip:bkl/drivers] nvram: Drop the bkl from non-generic nvram_llseek() tip-bot for Frederic Weisbecker
2009-10-14 15:58 ` [tip:bkl/drivers] nvram: Drop the BKL from nvram_open() tip-bot for Ingo Molnar
2009-10-21 20:09 ` John Kacur
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=1255116426-7270-1-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=abogani@texware.it \
--cc=corbet@lwn.net \
--cc=gregkh@suse.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sven@thebigcorporation.com \
--cc=tglx@linutronix.de \
/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