From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761349AbZJIT1p (ORCPT ); Fri, 9 Oct 2009 15:27:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761326AbZJIT1o (ORCPT ); Fri, 9 Oct 2009 15:27:44 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:45453 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761316AbZJIT1o (ORCPT ); Fri, 9 Oct 2009 15:27:44 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=on4ldNgLa1ZFYzziQfuQ+H30GVHYGIukcDuxjzNF2RzQQqum19dr0ZDBnfwBV5jHkc w5NECY6znnWK8Gd4m5FbN3KzsAroblLHLVLEXoEPicTSyWVD6yqiaMRrlZLjbu4eVDFr /HKEqLnGMfqnu1x0zbHz7I3rthClTQeY+3ySE= From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , John Kacur , Sven-Thorsten Dietrich , Jonathan Corbet , Alessio Igor Bogani , Greg KH Subject: [PATCH] nvram: Drop the bkl from non-generic nvram_llseek() Date: Fri, 9 Oct 2009 21:27:06 +0200 Message-Id: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.6.2.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop the bkl from nvram_llseek() as it obviously protects nothing. The file offset is safe in essence. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: John Kacur Cc: Sven-Thorsten Dietrich Cc: Jonathan Corbet Cc: Alessio Igor Bogani Cc: Greg KH --- 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