diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-12 21:47:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-12 21:47:55 -0400 |
commit | 5ec390e046039942d59ef2634b967b8b23fc57c2 (patch) | |
tree | c1d80246ec80ef60335f7bbcc6f5c22db901edcb | |
parent | cdf5f61ed1d64d50eb9cf10071ab40836f5f9f91 (diff) | |
parent | 57d84906f0f3005d4d22e13a3f5102a16a7fc4a2 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] correct address of _stext with CONFIG_SHARED_KERNEL=y
[S390] ptrace: fix return value of do_syscall_trace_enter()
[S390] dasd: fix race between tasklet and dasd_sleep_on
-rw-r--r-- | arch/s390/kernel/head31.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 2 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 5 | ||||
-rw-r--r-- | drivers/s390/block/dasd.c | 17 |
4 files changed, 14 insertions, 12 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index 1bbcc499d455..b8f8dc126102 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -82,7 +82,7 @@ startup_continue: | |||
82 | _ehead: | 82 | _ehead: |
83 | 83 | ||
84 | #ifdef CONFIG_SHARED_KERNEL | 84 | #ifdef CONFIG_SHARED_KERNEL |
85 | .org 0x100000 | 85 | .org 0x100000 - 0x11000 # head.o ends at 0x11000 |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | # | 88 | # |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 1f70970de0aa..cdef68717416 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -80,7 +80,7 @@ startup_continue: | |||
80 | _ehead: | 80 | _ehead: |
81 | 81 | ||
82 | #ifdef CONFIG_SHARED_KERNEL | 82 | #ifdef CONFIG_SHARED_KERNEL |
83 | .org 0x100000 | 83 | .org 0x100000 - 0x11000 # head.o ends at 0x11000 |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | # | 86 | # |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 33fdc5a79764..9f654da4cecc 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -640,7 +640,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
640 | 640 | ||
641 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | 641 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) |
642 | { | 642 | { |
643 | long ret; | 643 | long ret = 0; |
644 | 644 | ||
645 | /* Do the secure computing check first. */ | 645 | /* Do the secure computing check first. */ |
646 | secure_computing(regs->gprs[2]); | 646 | secure_computing(regs->gprs[2]); |
@@ -649,7 +649,6 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
649 | * The sysc_tracesys code in entry.S stored the system | 649 | * The sysc_tracesys code in entry.S stored the system |
650 | * call number to gprs[2]. | 650 | * call number to gprs[2]. |
651 | */ | 651 | */ |
652 | ret = regs->gprs[2]; | ||
653 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 652 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
654 | (tracehook_report_syscall_entry(regs) || | 653 | (tracehook_report_syscall_entry(regs) || |
655 | regs->gprs[2] >= NR_syscalls)) { | 654 | regs->gprs[2] >= NR_syscalls)) { |
@@ -671,7 +670,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
671 | regs->gprs[2], regs->orig_gpr2, | 670 | regs->gprs[2], regs->orig_gpr2, |
672 | regs->gprs[3], regs->gprs[4], | 671 | regs->gprs[3], regs->gprs[4], |
673 | regs->gprs[5]); | 672 | regs->gprs[5]); |
674 | return ret; | 673 | return ret ?: regs->gprs[2]; |
675 | } | 674 | } |
676 | 675 | ||
677 | asmlinkage void do_syscall_trace_exit(struct pt_regs *regs) | 676 | asmlinkage void do_syscall_trace_exit(struct pt_regs *regs) |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index acf222f91f5a..fa2339cb1681 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -37,6 +37,9 @@ | |||
37 | */ | 37 | */ |
38 | #define DASD_CHANQ_MAX_SIZE 4 | 38 | #define DASD_CHANQ_MAX_SIZE 4 |
39 | 39 | ||
40 | #define DASD_SLEEPON_START_TAG (void *) 1 | ||
41 | #define DASD_SLEEPON_END_TAG (void *) 2 | ||
42 | |||
40 | /* | 43 | /* |
41 | * SECTION: exported variables of dasd.c | 44 | * SECTION: exported variables of dasd.c |
42 | */ | 45 | */ |
@@ -1472,7 +1475,10 @@ void dasd_add_request_tail(struct dasd_ccw_req *cqr) | |||
1472 | */ | 1475 | */ |
1473 | static void dasd_wakeup_cb(struct dasd_ccw_req *cqr, void *data) | 1476 | static void dasd_wakeup_cb(struct dasd_ccw_req *cqr, void *data) |
1474 | { | 1477 | { |
1475 | wake_up((wait_queue_head_t *) data); | 1478 | spin_lock_irq(get_ccwdev_lock(cqr->startdev->cdev)); |
1479 | cqr->callback_data = DASD_SLEEPON_END_TAG; | ||
1480 | spin_unlock_irq(get_ccwdev_lock(cqr->startdev->cdev)); | ||
1481 | wake_up(&generic_waitq); | ||
1476 | } | 1482 | } |
1477 | 1483 | ||
1478 | static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | 1484 | static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) |
@@ -1482,10 +1488,7 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | |||
1482 | 1488 | ||
1483 | device = cqr->startdev; | 1489 | device = cqr->startdev; |
1484 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 1490 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1485 | rc = ((cqr->status == DASD_CQR_DONE || | 1491 | rc = (cqr->callback_data == DASD_SLEEPON_END_TAG); |
1486 | cqr->status == DASD_CQR_NEED_ERP || | ||
1487 | cqr->status == DASD_CQR_TERMINATED) && | ||
1488 | list_empty(&cqr->devlist)); | ||
1489 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1492 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1490 | return rc; | 1493 | return rc; |
1491 | } | 1494 | } |
@@ -1573,7 +1576,7 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible) | |||
1573 | wait_event(generic_waitq, !(device->stopped)); | 1576 | wait_event(generic_waitq, !(device->stopped)); |
1574 | 1577 | ||
1575 | cqr->callback = dasd_wakeup_cb; | 1578 | cqr->callback = dasd_wakeup_cb; |
1576 | cqr->callback_data = (void *) &generic_waitq; | 1579 | cqr->callback_data = DASD_SLEEPON_START_TAG; |
1577 | dasd_add_request_tail(cqr); | 1580 | dasd_add_request_tail(cqr); |
1578 | if (interruptible) { | 1581 | if (interruptible) { |
1579 | rc = wait_event_interruptible( | 1582 | rc = wait_event_interruptible( |
@@ -1652,7 +1655,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1652 | } | 1655 | } |
1653 | 1656 | ||
1654 | cqr->callback = dasd_wakeup_cb; | 1657 | cqr->callback = dasd_wakeup_cb; |
1655 | cqr->callback_data = (void *) &generic_waitq; | 1658 | cqr->callback_data = DASD_SLEEPON_START_TAG; |
1656 | cqr->status = DASD_CQR_QUEUED; | 1659 | cqr->status = DASD_CQR_QUEUED; |
1657 | list_add(&cqr->devlist, &device->ccw_queue); | 1660 | list_add(&cqr->devlist, &device->ccw_queue); |
1658 | 1661 | ||