diff options
author | Clark Williams <williams@redhat.com> | 2012-04-04 10:52:26 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-04 10:52:26 -0500 |
commit | 2d93eaf2d4ace5853a74a4b0596f601aa62cb840 (patch) | |
tree | b0a2e2083c1749c4e3b8ae23db7bb13a7ca9aafe /kernel | |
parent | 003133585fc61d7bd36d3a097d7fde62e64a9550 (diff) | |
parent | 23d8c3f8f494c8516c9b4c05529e118e6a485956 (diff) |
Merge commit 'v3.2.14' into rt-3.2.14-rt23v3.2.14-rt23
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/futex.c | 19 | ||||
-rw-r--r-- | kernel/irq/chip.c | 3 | ||||
-rw-r--r-- | kernel/irq/manage.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 3 | ||||
-rw-r--r-- | kernel/power/hibernate.c | 7 | ||||
-rw-r--r-- | kernel/time/ntp.c | 2 |
6 files changed, 21 insertions, 15 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 2d311cdad5a6..97e3f0f16553 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2687,6 +2687,16 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, } switch (cmd) { + case FUTEX_LOCK_PI: + case FUTEX_UNLOCK_PI: + case FUTEX_TRYLOCK_PI: + case FUTEX_WAIT_REQUEUE_PI: + case FUTEX_CMP_REQUEUE_PI: + if (!futex_cmpxchg_enabled) + return -ENOSYS; + } + + switch (cmd) { case FUTEX_WAIT: val3 = FUTEX_BITSET_MATCH_ANY; case FUTEX_WAIT_BITSET: @@ -2707,16 +2717,13 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, ret = futex_wake_op(uaddr, flags, uaddr2, val, val2, val3); break; case FUTEX_LOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_lock_pi(uaddr, flags, val, timeout, 0); + ret = futex_lock_pi(uaddr, flags, val, timeout, 0); break; case FUTEX_UNLOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_unlock_pi(uaddr, flags); + ret = futex_unlock_pi(uaddr, flags); break; case FUTEX_TRYLOCK_PI: - if (futex_cmpxchg_enabled) - ret = futex_lock_pi(uaddr, flags, 0, timeout, 1); + ret = futex_lock_pi(uaddr, flags, 0, timeout, 1); break; case FUTEX_WAIT_REQUEUE_PI: val3 = FUTEX_BITSET_MATCH_ANY; diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index fb7db75ee0c8..25784d630a12 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -61,8 +61,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type) return -EINVAL; type &= IRQ_TYPE_SENSE_MASK; - if (type != IRQ_TYPE_NONE) - ret = __irq_set_trigger(desc, irq, type); + ret = __irq_set_trigger(desc, irq, type); irq_put_desc_busunlock(desc, flags); return ret; } diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 530d894d04e5..87dc0539cebb 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -783,7 +783,7 @@ static int irq_thread(void *data) struct irqaction *action); int wake; - if (force_irqthreads & test_bit(IRQTF_FORCED_THREAD, + if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD, &action->thread_flags)) handler_fn = irq_forced_thread_fn; else diff --git a/kernel/module.c b/kernel/module.c index 178333c48d1e..6969ef05d2d7 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2341,8 +2341,7 @@ static int copy_and_check(struct load_info *info, return -ENOEXEC; /* Suck in entire file: we'll want most of it. */ - /* vmalloc barfs on "unusual" numbers. Check here */ - if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL) + if ((hdr = vmalloc(len)) == NULL) return -ENOMEM; if (copy_from_user(hdr, umod, len) != 0) { diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index d6b4ebb1b81f..32741e27501c 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -655,7 +655,7 @@ int hibernate(void) /* Allocate memory management structures */ error = create_basic_memory_bitmaps(); if (error) - goto Exit; + goto Enable_umh; printk(KERN_INFO "PM: Syncing filesystems ... "); sys_sync(); @@ -663,7 +663,7 @@ int hibernate(void) error = prepare_processes(); if (error) - goto Finish; + goto Free_bitmaps; error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); if (error) @@ -696,8 +696,9 @@ int hibernate(void) Thaw: thaw_processes(); - Finish: + Free_bitmaps: free_basic_memory_bitmaps(); + Enable_umh: usermodehelper_enable(); Exit: pm_notifier_call_chain(PM_POST_HIBERNATION); diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index c465e88117ad..419cbaa2f5c0 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -275,7 +275,7 @@ static inline s64 ntp_update_offset_fll(s64 offset64, long secs) time_status |= STA_MODE; - return div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); + return div64_long(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); } static void ntp_update_offset(long offset) |