aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
commitd1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch)
tree5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /drivers/s390/block
parenta41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff)
parent2fceef397f9880b212a74c418290ce69e7ac00eb (diff)
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd_eer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index 6e53ab606e97..29da4413ad43 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -15,6 +15,7 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/poll.h> 16#include <linux/poll.h>
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18#include <linux/smp_lock.h>
18 19
19#include <asm/uaccess.h> 20#include <asm/uaccess.h>
20#include <asm/atomic.h> 21#include <asm/atomic.h>
@@ -525,6 +526,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
525 eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); 526 eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL);
526 if (!eerb) 527 if (!eerb)
527 return -ENOMEM; 528 return -ENOMEM;
529 lock_kernel();
528 eerb->buffer_page_count = eer_pages; 530 eerb->buffer_page_count = eer_pages;
529 if (eerb->buffer_page_count < 1 || 531 if (eerb->buffer_page_count < 1 ||
530 eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { 532 eerb->buffer_page_count > INT_MAX / PAGE_SIZE) {
@@ -532,6 +534,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
532 MESSAGE(KERN_WARNING, "can't open device since module " 534 MESSAGE(KERN_WARNING, "can't open device since module "
533 "parameter eer_pages is smaller then 1 or" 535 "parameter eer_pages is smaller then 1 or"
534 " bigger then %d", (int)(INT_MAX / PAGE_SIZE)); 536 " bigger then %d", (int)(INT_MAX / PAGE_SIZE));
537 unlock_kernel();
535 return -EINVAL; 538 return -EINVAL;
536 } 539 }
537 eerb->buffersize = eerb->buffer_page_count * PAGE_SIZE; 540 eerb->buffersize = eerb->buffer_page_count * PAGE_SIZE;
@@ -539,12 +542,14 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
539 GFP_KERNEL); 542 GFP_KERNEL);
540 if (!eerb->buffer) { 543 if (!eerb->buffer) {
541 kfree(eerb); 544 kfree(eerb);
545 unlock_kernel();
542 return -ENOMEM; 546 return -ENOMEM;
543 } 547 }
544 if (dasd_eer_allocate_buffer_pages(eerb->buffer, 548 if (dasd_eer_allocate_buffer_pages(eerb->buffer,
545 eerb->buffer_page_count)) { 549 eerb->buffer_page_count)) {
546 kfree(eerb->buffer); 550 kfree(eerb->buffer);
547 kfree(eerb); 551 kfree(eerb);
552 unlock_kernel();
548 return -ENOMEM; 553 return -ENOMEM;
549 } 554 }
550 filp->private_data = eerb; 555 filp->private_data = eerb;
@@ -552,6 +557,7 @@ static int dasd_eer_open(struct inode *inp, struct file *filp)
552 list_add(&eerb->list, &bufferlist); 557 list_add(&eerb->list, &bufferlist);
553 spin_unlock_irqrestore(&bufferlock, flags); 558 spin_unlock_irqrestore(&bufferlock, flags);
554 559
560 unlock_kernel();
555 return nonseekable_open(inp,filp); 561 return nonseekable_open(inp,filp);
556} 562}
557 563