diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 4 | ||||
-rw-r--r-- | drivers/cdrom/cdrom.c | 6 | ||||
-rw-r--r-- | drivers/net/sky2.c | 7 | ||||
-rw-r--r-- | fs/bio.c | 5 | ||||
-rw-r--r-- | include/asm-powerpc/cputable.h | 2 | ||||
-rw-r--r-- | kernel/exit.c | 8 | ||||
-rw-r--r-- | kernel/posix-cpu-timers.c | 48 |
8 files changed, 39 insertions, 43 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 17 | 3 | SUBLEVEL = 17 |
4 | EXTRAVERSION =-rc6 | 4 | EXTRAVERSION = |
5 | NAME=Crazed Snow-Weasel | 5 | NAME=Crazed Snow-Weasel |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 33654d1b1b43..994856e55b7c 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -52,7 +52,7 @@ static inline void __tlbie(unsigned long va, unsigned int psize) | |||
52 | default: | 52 | default: |
53 | penc = mmu_psize_defs[psize].penc; | 53 | penc = mmu_psize_defs[psize].penc; |
54 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | 54 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); |
55 | va |= (0x7f >> (8 - penc)) << 12; | 55 | va |= penc << 12; |
56 | asm volatile("tlbie %0,1" : : "r" (va) : "memory"); | 56 | asm volatile("tlbie %0,1" : : "r" (va) : "memory"); |
57 | break; | 57 | break; |
58 | } | 58 | } |
@@ -74,7 +74,7 @@ static inline void __tlbiel(unsigned long va, unsigned int psize) | |||
74 | default: | 74 | default: |
75 | penc = mmu_psize_defs[psize].penc; | 75 | penc = mmu_psize_defs[psize].penc; |
76 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | 76 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); |
77 | va |= (0x7f >> (8 - penc)) << 12; | 77 | va |= penc << 12; |
78 | asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" | 78 | asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" |
79 | : : "r"(va) : "memory"); | 79 | : : "r"(va) : "memory"); |
80 | break; | 80 | break; |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index a59876a0bfa1..3170eaa25087 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1009,9 +1009,9 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
1009 | if (fp->f_mode & FMODE_WRITE) { | 1009 | if (fp->f_mode & FMODE_WRITE) { |
1010 | ret = -EROFS; | 1010 | ret = -EROFS; |
1011 | if (cdrom_open_write(cdi)) | 1011 | if (cdrom_open_write(cdi)) |
1012 | goto err; | 1012 | goto err_release; |
1013 | if (!CDROM_CAN(CDC_RAM)) | 1013 | if (!CDROM_CAN(CDC_RAM)) |
1014 | goto err; | 1014 | goto err_release; |
1015 | ret = 0; | 1015 | ret = 0; |
1016 | cdi->media_written = 0; | 1016 | cdi->media_written = 0; |
1017 | } | 1017 | } |
@@ -1026,6 +1026,8 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
1026 | not be mounting, but opening with O_NONBLOCK */ | 1026 | not be mounting, but opening with O_NONBLOCK */ |
1027 | check_disk_change(ip->i_bdev); | 1027 | check_disk_change(ip->i_bdev); |
1028 | return 0; | 1028 | return 0; |
1029 | err_release: | ||
1030 | cdi->ops->release(cdi); | ||
1029 | err: | 1031 | err: |
1030 | cdi->use_count--; | 1032 | cdi->use_count--; |
1031 | return ret; | 1033 | return ret; |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 97fe95666f3b..fba1e4d4d83d 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2255,8 +2255,10 @@ static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
2255 | static void sky2_netpoll(struct net_device *dev) | 2255 | static void sky2_netpoll(struct net_device *dev) |
2256 | { | 2256 | { |
2257 | struct sky2_port *sky2 = netdev_priv(dev); | 2257 | struct sky2_port *sky2 = netdev_priv(dev); |
2258 | struct net_device *dev0 = sky2->hw->dev[0]; | ||
2258 | 2259 | ||
2259 | sky2_intr(sky2->hw->pdev->irq, sky2->hw, NULL); | 2260 | if (netif_running(dev) && __netif_rx_schedule_prep(dev0)) |
2261 | __netif_rx_schedule(dev0); | ||
2260 | } | 2262 | } |
2261 | #endif | 2263 | #endif |
2262 | 2264 | ||
@@ -3446,6 +3448,7 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3446 | 3448 | ||
3447 | sky2_down(dev); | 3449 | sky2_down(dev); |
3448 | netif_device_detach(dev); | 3450 | netif_device_detach(dev); |
3451 | netif_poll_disable(dev); | ||
3449 | } | 3452 | } |
3450 | } | 3453 | } |
3451 | 3454 | ||
@@ -3474,6 +3477,8 @@ static int sky2_resume(struct pci_dev *pdev) | |||
3474 | struct net_device *dev = hw->dev[i]; | 3477 | struct net_device *dev = hw->dev[i]; |
3475 | if (dev && netif_running(dev)) { | 3478 | if (dev && netif_running(dev)) { |
3476 | netif_device_attach(dev); | 3479 | netif_device_attach(dev); |
3480 | netif_poll_enable(dev); | ||
3481 | |||
3477 | err = sky2_up(dev); | 3482 | err = sky2_up(dev); |
3478 | if (err) { | 3483 | if (err) { |
3479 | printk(KERN_ERR PFX "%s: could not up: %d\n", | 3484 | printk(KERN_ERR PFX "%s: could not up: %d\n", |
@@ -654,9 +654,10 @@ static struct bio *__bio_map_user_iov(request_queue_t *q, | |||
654 | write_to_vm, 0, &pages[cur_page], NULL); | 654 | write_to_vm, 0, &pages[cur_page], NULL); |
655 | up_read(¤t->mm->mmap_sem); | 655 | up_read(¤t->mm->mmap_sem); |
656 | 656 | ||
657 | if (ret < local_nr_pages) | 657 | if (ret < local_nr_pages) { |
658 | ret = -EFAULT; | ||
658 | goto out_unmap; | 659 | goto out_unmap; |
659 | 660 | } | |
660 | 661 | ||
661 | offset = uaddr & ~PAGE_MASK; | 662 | offset = uaddr & ~PAGE_MASK; |
662 | for (j = cur_page; j < page_limit; j++) { | 663 | for (j = cur_page; j < page_limit; j++) { |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 9fcf0162d859..f6265c2a0dd2 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -329,7 +329,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
329 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 329 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 330 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ |
331 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 331 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
332 | CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO) | 332 | CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE) |
333 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 333 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
334 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2) | 334 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2) |
335 | #endif | 335 | #endif |
diff --git a/kernel/exit.c b/kernel/exit.c index e95b93282210..e06d0c10a24e 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -881,14 +881,6 @@ fastcall NORET_TYPE void do_exit(long code) | |||
881 | 881 | ||
882 | tsk->flags |= PF_EXITING; | 882 | tsk->flags |= PF_EXITING; |
883 | 883 | ||
884 | /* | ||
885 | * Make sure we don't try to process any timer firings | ||
886 | * while we are already exiting. | ||
887 | */ | ||
888 | tsk->it_virt_expires = cputime_zero; | ||
889 | tsk->it_prof_expires = cputime_zero; | ||
890 | tsk->it_sched_expires = 0; | ||
891 | |||
892 | if (unlikely(in_atomic())) | 884 | if (unlikely(in_atomic())) |
893 | printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", | 885 | printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", |
894 | current->comm, current->pid, | 886 | current->comm, current->pid, |
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 520f6c59948d..d38d9ec3276c 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -555,9 +555,6 @@ static void arm_timer(struct k_itimer *timer, union cpu_time_count now) | |||
555 | struct cpu_timer_list *next; | 555 | struct cpu_timer_list *next; |
556 | unsigned long i; | 556 | unsigned long i; |
557 | 557 | ||
558 | if (CPUCLOCK_PERTHREAD(timer->it_clock) && (p->flags & PF_EXITING)) | ||
559 | return; | ||
560 | |||
561 | head = (CPUCLOCK_PERTHREAD(timer->it_clock) ? | 558 | head = (CPUCLOCK_PERTHREAD(timer->it_clock) ? |
562 | p->cpu_timers : p->signal->cpu_timers); | 559 | p->cpu_timers : p->signal->cpu_timers); |
563 | head += CPUCLOCK_WHICH(timer->it_clock); | 560 | head += CPUCLOCK_WHICH(timer->it_clock); |
@@ -1173,6 +1170,9 @@ static void check_process_timers(struct task_struct *tsk, | |||
1173 | } | 1170 | } |
1174 | t = tsk; | 1171 | t = tsk; |
1175 | do { | 1172 | do { |
1173 | if (unlikely(t->flags & PF_EXITING)) | ||
1174 | continue; | ||
1175 | |||
1176 | ticks = cputime_add(cputime_add(t->utime, t->stime), | 1176 | ticks = cputime_add(cputime_add(t->utime, t->stime), |
1177 | prof_left); | 1177 | prof_left); |
1178 | if (!cputime_eq(prof_expires, cputime_zero) && | 1178 | if (!cputime_eq(prof_expires, cputime_zero) && |
@@ -1193,11 +1193,7 @@ static void check_process_timers(struct task_struct *tsk, | |||
1193 | t->it_sched_expires > sched)) { | 1193 | t->it_sched_expires > sched)) { |
1194 | t->it_sched_expires = sched; | 1194 | t->it_sched_expires = sched; |
1195 | } | 1195 | } |
1196 | 1196 | } while ((t = next_thread(t)) != tsk); | |
1197 | do { | ||
1198 | t = next_thread(t); | ||
1199 | } while (unlikely(t->flags & PF_EXITING)); | ||
1200 | } while (t != tsk); | ||
1201 | } | 1197 | } |
1202 | } | 1198 | } |
1203 | 1199 | ||
@@ -1289,30 +1285,30 @@ void run_posix_cpu_timers(struct task_struct *tsk) | |||
1289 | 1285 | ||
1290 | #undef UNEXPIRED | 1286 | #undef UNEXPIRED |
1291 | 1287 | ||
1292 | BUG_ON(tsk->exit_state); | ||
1293 | |||
1294 | /* | 1288 | /* |
1295 | * Double-check with locks held. | 1289 | * Double-check with locks held. |
1296 | */ | 1290 | */ |
1297 | read_lock(&tasklist_lock); | 1291 | read_lock(&tasklist_lock); |
1298 | spin_lock(&tsk->sighand->siglock); | 1292 | if (likely(tsk->signal != NULL)) { |
1293 | spin_lock(&tsk->sighand->siglock); | ||
1299 | 1294 | ||
1300 | /* | 1295 | /* |
1301 | * Here we take off tsk->cpu_timers[N] and tsk->signal->cpu_timers[N] | 1296 | * Here we take off tsk->cpu_timers[N] and tsk->signal->cpu_timers[N] |
1302 | * all the timers that are firing, and put them on the firing list. | 1297 | * all the timers that are firing, and put them on the firing list. |
1303 | */ | 1298 | */ |
1304 | check_thread_timers(tsk, &firing); | 1299 | check_thread_timers(tsk, &firing); |
1305 | check_process_timers(tsk, &firing); | 1300 | check_process_timers(tsk, &firing); |
1306 | 1301 | ||
1307 | /* | 1302 | /* |
1308 | * We must release these locks before taking any timer's lock. | 1303 | * We must release these locks before taking any timer's lock. |
1309 | * There is a potential race with timer deletion here, as the | 1304 | * There is a potential race with timer deletion here, as the |
1310 | * siglock now protects our private firing list. We have set | 1305 | * siglock now protects our private firing list. We have set |
1311 | * the firing flag in each timer, so that a deletion attempt | 1306 | * the firing flag in each timer, so that a deletion attempt |
1312 | * that gets the timer lock before we do will give it up and | 1307 | * that gets the timer lock before we do will give it up and |
1313 | * spin until we've taken care of that timer below. | 1308 | * spin until we've taken care of that timer below. |
1314 | */ | 1309 | */ |
1315 | spin_unlock(&tsk->sighand->siglock); | 1310 | spin_unlock(&tsk->sighand->siglock); |
1311 | } | ||
1316 | read_unlock(&tasklist_lock); | 1312 | read_unlock(&tasklist_lock); |
1317 | 1313 | ||
1318 | /* | 1314 | /* |