Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754642AbYK0KdF (ORCPT ); Thu, 27 Nov 2008 05:33:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752676AbYK0KcV (ORCPT ); Thu, 27 Nov 2008 05:32:21 -0500 Received: from mtagate4.de.ibm.com ([195.212.29.153]:45980 "EHLO mtagate4.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019AbYK0KcS (ORCPT ); Thu, 27 Nov 2008 05:32:18 -0500 Message-Id: <20081127103127.797415689@de.ibm.com> References: <20081127103020.528516828@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 27 Nov 2008 11:30:21 +0100 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Heiko Carstens , Christian Borntraeger , Martin Schwidefsky Subject: [patch 01/60] vmcp: remove BKL Content-Disposition: inline; filename=100-vmcp-bkl.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 54 From: Christian Borntraeger The vmcp driver uses the session->mutex for concurrent access of the data structures. Therefore, the BKL in vmcp_open does not protect against any other function in the driver. The BLK in vmcp_open would protect concurrent access to the module init but all necessary steps ave finished before misc_register is called. We can safely remove the lock_kernel from vcmp. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- drivers/s390/char/vmcp.c | 3 --- 1 file changed, 3 deletions(-) Index: quilt-2.6/drivers/s390/char/vmcp.c =================================================================== --- quilt-2.6.orig/drivers/s390/char/vmcp.c +++ quilt-2.6/drivers/s390/char/vmcp.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -41,13 +40,11 @@ static int vmcp_open(struct inode *inode if (!session) return -ENOMEM; - lock_kernel(); session->bufsize = PAGE_SIZE; session->response = NULL; session->resp_size = 0; mutex_init(&session->mutex); file->private_data = session; - unlock_kernel(); return nonseekable_open(inode, file); } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/