Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge upstream into 'upstream' branch of netdev-2.6.git.

Hand fix merge conflict in drivers/net/tokenring/Kconfig.

+676 -641
+1 -1
Makefile
··· 1 1 VERSION = 2 2 2 PATCHLEVEL = 6 3 3 SUBLEVEL = 13 4 - EXTRAVERSION =-rc6 4 + EXTRAVERSION =-rc7 5 5 NAME=Woozy Numbat 6 6 7 7 # *DOCUMENTATION*
+1 -1
arch/alpha/Kconfig
··· 522 522 523 523 config NUMA 524 524 bool "NUMA Support (EXPERIMENTAL)" 525 - depends on DISCONTIGMEM 525 + depends on DISCONTIGMEM && BROKEN 526 526 help 527 527 Say Y to compile the kernel to support NUMA (Non-Uniform Memory 528 528 Access). This option is for configuring high-end multiprocessor
+3 -3
arch/alpha/kernel/smp.c
··· 1036 1036 " br 1b\n" 1037 1037 ".previous" 1038 1038 : "=r" (tmp), "=m" (lock->lock), "=r" (stuck) 1039 - : "1" (lock->lock), "2" (stuck) : "memory"); 1039 + : "m" (lock->lock), "2" (stuck) : "memory"); 1040 1040 1041 1041 if (stuck < 0) { 1042 1042 printk(KERN_WARNING ··· 1115 1115 ".previous" 1116 1116 : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy), 1117 1117 "=&r" (stuck_lock), "=&r" (stuck_reader) 1118 - : "0" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); 1118 + : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); 1119 1119 1120 1120 if (stuck_lock < 0) { 1121 1121 printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc); ··· 1153 1153 " br 1b\n" 1154 1154 ".previous" 1155 1155 : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock) 1156 - : "0" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); 1156 + : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); 1157 1157 1158 1158 if (stuck_lock < 0) { 1159 1159 printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc);
+3 -3
arch/alpha/oprofile/common.c
··· 65 65 model->reg_setup(&reg, ctr, &sys); 66 66 67 67 /* Configure the registers on all cpus. */ 68 - smp_call_function(model->cpu_setup, &reg, 0, 1); 68 + (void)smp_call_function(model->cpu_setup, &reg, 0, 1); 69 69 model->cpu_setup(&reg); 70 70 return 0; 71 71 } ··· 86 86 static int 87 87 op_axp_start(void) 88 88 { 89 - smp_call_function(op_axp_cpu_start, NULL, 0, 1); 89 + (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1); 90 90 op_axp_cpu_start(NULL); 91 91 return 0; 92 92 } ··· 101 101 static void 102 102 op_axp_stop(void) 103 103 { 104 - smp_call_function(op_axp_cpu_stop, NULL, 0, 1); 104 + (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1); 105 105 op_axp_cpu_stop(NULL); 106 106 } 107 107
+1 -1
arch/arm/Kconfig
··· 310 310 311 311 config SMP 312 312 bool "Symmetric Multi-Processing (EXPERIMENTAL)" 313 - depends on EXPERIMENTAL #&& n 313 + depends on EXPERIMENTAL && BROKEN #&& n 314 314 help 315 315 This enables support for systems with more than one CPU. If you have 316 316 a system with only one CPU, like most personal computers, say N. If
+1 -1
arch/arm/kernel/traps.c
··· 617 617 notify_die("unknown data abort code", regs, &info, instr, 0); 618 618 } 619 619 620 - volatile void __bug(const char *file, int line, void *data) 620 + void __attribute__((noreturn)) __bug(const char *file, int line, void *data) 621 621 { 622 622 printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); 623 623 if (data)
+3 -3
arch/arm/nwfpe/fpopcode.h
··· 370 370 #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) 371 371 372 372 #ifdef CONFIG_FPE_NWFPE_XP 373 - static inline const floatx80 getExtendedConstant(const unsigned int nIndex) 373 + static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) 374 374 { 375 375 extern const floatx80 floatx80Constant[]; 376 376 return floatx80Constant[nIndex]; 377 377 } 378 378 #endif 379 379 380 - static inline const float64 getDoubleConstant(const unsigned int nIndex) 380 + static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) 381 381 { 382 382 extern const float64 float64Constant[]; 383 383 return float64Constant[nIndex]; 384 384 } 385 385 386 - static inline const float32 getSingleConstant(const unsigned int nIndex) 386 + static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) 387 387 { 388 388 extern const float32 float32Constant[]; 389 389 return float32Constant[nIndex];
+2 -2
arch/i386/kernel/nmi.c
··· 195 195 wrmsr(MSR_P6_EVNTSEL0, 0, 0); 196 196 break; 197 197 case 15: 198 - if (boot_cpu_data.x86_model > 0x3) 198 + if (boot_cpu_data.x86_model > 0x4) 199 199 break; 200 200 201 201 wrmsr(MSR_P4_IQ_CCCR0, 0, 0); ··· 432 432 setup_p6_watchdog(); 433 433 break; 434 434 case 15: 435 - if (boot_cpu_data.x86_model > 0x3) 435 + if (boot_cpu_data.x86_model > 0x4) 436 436 return; 437 437 438 438 if (!setup_p4_watchdog())
+6 -4
arch/i386/kernel/traps.c
··· 803 803 */ 804 804 cwd = get_fpu_cwd(task); 805 805 swd = get_fpu_swd(task); 806 - switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { 806 + switch (swd & ~cwd & 0x3f) { 807 807 case 0x000: 808 808 default: 809 809 break; 810 810 case 0x001: /* Invalid Op */ 811 - case 0x041: /* Stack Fault */ 812 - case 0x241: /* Stack Fault | Direction */ 811 + /* 812 + * swd & 0x240 == 0x040: Stack Underflow 813 + * swd & 0x240 == 0x240: Stack Overflow 814 + * User must clear the SF bit (0x40) if set 815 + */ 813 816 info.si_code = FPE_FLTINV; 814 - /* Should we clear the SF or let user space do it ???? */ 815 817 break; 816 818 case 0x002: /* Denormalize */ 817 819 case 0x010: /* Underflow */
+1 -1
arch/ia64/hp/sim/boot/boot_head.S
··· 22 22 .save rp, r0 23 23 .body 24 24 movl gp = __gp 25 - movl sp = stack_mem 25 + movl sp = stack_mem+16384-16 26 26 bsw.1 27 27 br.call.sptk.many rp=start_bootloader 28 28 END(_start)
+10 -8
arch/ia64/sn/kernel/io_init.c
··· 323 323 struct pci_controller *controller; 324 324 struct pcibus_bussoft *prom_bussoft_ptr; 325 325 struct hubdev_info *hubdev_info; 326 - void *provider_soft; 326 + void *provider_soft = NULL; 327 327 struct sn_pcibus_provider *provider; 328 328 329 329 status = sal_get_pcibus_info((u64) segment, (u64) busnum, ··· 339 339 if (bus == NULL) { 340 340 bus = pci_scan_bus(busnum, &pci_root_ops, controller); 341 341 if (bus == NULL) 342 - return; /* error, or bus already scanned */ 342 + goto error_return; /* error, or bus already scanned */ 343 343 bus->sysdata = NULL; 344 344 } 345 345 ··· 352 352 */ 353 353 354 354 if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) 355 - return; /* unsupported asic type */ 355 + goto error_return; /* unsupported asic type */ 356 356 357 357 if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) 358 358 goto error_return; /* no further fixup necessary */ 359 359 360 360 provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; 361 361 if (provider == NULL) 362 - return; /* no provider registerd for this asic */ 362 + goto error_return; /* no provider registerd for this asic */ 363 363 364 - provider_soft = NULL; 364 + bus->sysdata = controller; 365 365 if (provider->bus_fixup) 366 366 provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); 367 367 368 - if (provider_soft == NULL) 369 - return; /* fixup failed or not applicable */ 368 + if (provider_soft == NULL) { 369 + /* fixup failed or not applicable */ 370 + bus->sysdata = NULL; 371 + goto error_return; 372 + } 370 373 371 374 /* 372 375 * Generic bus fixup goes here. Don't reference prom_bussoft_ptr 373 376 * after this point. 374 377 */ 375 378 376 - bus->sysdata = controller; 377 379 PCI_CONTROLLER(bus)->platform_data = provider_soft; 378 380 nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); 379 381 cnode = nasid_to_cnodeid(nasid);
+2 -1
arch/m32r/Kconfig
··· 269 269 # Common NUMA Features 270 270 config NUMA 271 271 bool "Numa Memory Allocation Support" 272 - depends on SMP 272 + depends on SMP && BROKEN 273 273 default n 274 274 275 275 # turning this on wastes a bunch of space. ··· 286 286 287 287 config PCI 288 288 bool "PCI support" 289 + depends on BROKEN 289 290 default n 290 291 help 291 292 Find out whether you have a PCI motherboard. PCI is the name of a
+1 -1
arch/m32r/Kconfig.debug
··· 20 20 21 21 config DEBUG_PAGEALLOC 22 22 bool "Page alloc debugging" 23 - depends on DEBUG_KERNEL 23 + depends on DEBUG_KERNEL && BROKEN 24 24 help 25 25 Unmap pages from the kernel linear mapping after free_pages(). 26 26 This results in a large slowdown, but helps to find certain types
+3 -1
arch/m32r/kernel/setup_m32700ut.c
··· 30 30 typedef struct { 31 31 unsigned long icucr; /* ICU Control Register */ 32 32 } icu_data_t; 33 + static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; 34 + #else 35 + icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; 33 36 #endif /* CONFIG_SMP */ 34 37 35 - static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; 36 38 37 39 static void disable_m32700ut_irq(unsigned int irq) 38 40 {
+3 -1
arch/m32r/kernel/setup_opsput.c
··· 31 31 typedef struct { 32 32 unsigned long icucr; /* ICU Control Register */ 33 33 } icu_data_t; 34 + static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; 35 + #else 36 + icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; 34 37 #endif /* CONFIG_SMP */ 35 38 36 - static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; 37 39 38 40 static void disable_opsput_irq(unsigned int irq) 39 41 {
+1
arch/m32r/kernel/smpboot.c
··· 91 91 92 92 /* which physical physical ID maps to which logical CPU number */ 93 93 static volatile int physid_2_cpu[NR_CPUS]; 94 + #define physid_to_cpu(physid) physid_2_cpu[physid] 94 95 95 96 /* which logical CPU number maps to which physical ID */ 96 97 volatile int cpu_2_physid[NR_CPUS];
+1
arch/m32r/lib/csum_partial_copy.c
··· 58 58 return csum_partial(dst, len-missing, sum); 59 59 } 60 60 EXPORT_SYMBOL(csum_partial_copy_from_user); 61 + EXPORT_SYMBOL(csum_partial);
+2
arch/m32r/mm/discontig.c
··· 12 12 #include <linux/mmzone.h> 13 13 #include <linux/initrd.h> 14 14 #include <linux/nodemask.h> 15 + #include <linux/module.h> 15 16 16 17 #include <asm/setup.h> 17 18 18 19 extern char _end[]; 19 20 20 21 struct pglist_data *node_data[MAX_NUMNODES]; 22 + EXPORT_SYMBOL(node_data); 21 23 static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; 22 24 23 25 pg_data_t m32r_node_data[MAX_NUMNODES];
+4 -1
arch/ppc/Kconfig
··· 911 911 default y if PPC_PREP 912 912 913 913 config SMP 914 + depends on PPC_STD_MMU 914 915 bool "Symmetric multi-processing support" 915 916 ---help--- 916 917 This enables support for systems with more than one CPU. If you have ··· 931 930 932 931 config IRQ_ALL_CPUS 933 932 bool "Distribute interrupts on all CPUs by default" 934 - depends on SMP 933 + depends on SMP && !MV64360 935 934 help 936 935 This option gives the kernel permission to distribute IRQs across 937 936 multiple CPUs. Saying N here will route all IRQs to the first ··· 1122 1121 1123 1122 source "drivers/zorro/Kconfig" 1124 1123 1124 + if !44x || BROKEN 1125 1125 source kernel/power/Kconfig 1126 + endif 1126 1127 1127 1128 config SECCOMP 1128 1129 bool "Enable seccomp to safely compute untrusted bytecode"
+10 -4
arch/ppc/platforms/4xx/Kconfig
··· 3 3 depends on 40x || 44x 4 4 default y 5 5 6 + config WANT_EARLY_SERIAL 7 + bool 8 + select SERIAL_8250 9 + default n 10 + 6 11 menu "IBM 4xx options" 7 12 depends on 4xx 8 13 ··· 23 18 24 19 config BUBINGA 25 20 bool "Bubinga" 21 + select WANT_EARLY_SERIAL 26 22 help 27 23 This option enables support for the IBM 405EP evaluation board. 28 24 ··· 76 70 77 71 config BAMBOO 78 72 bool "Bamboo" 73 + select WANT_EARLY_SERIAL 79 74 help 80 75 This option enables support for the IBM PPC440EP evaluation board. 81 76 82 77 config EBONY 83 78 bool "Ebony" 79 + select WANT_EARLY_SERIAL 84 80 help 85 81 This option enables support for the IBM PPC440GP evaluation board. 86 82 87 83 config LUAN 88 84 bool "Luan" 85 + select WANT_EARLY_SERIAL 89 86 help 90 87 This option enables support for the IBM PPC440SP evaluation board. 91 88 92 89 config OCOTEA 93 90 bool "Ocotea" 91 + select WANT_EARLY_SERIAL 94 92 help 95 93 This option enables support for the IBM PPC440GX evaluation board. 96 94 ··· 239 229 bool 240 230 depends on 4xx 241 231 default y 242 - 243 - config PM 244 - bool "Power Management support (EXPERIMENTAL)" 245 - depends on 4xx && EXPERIMENTAL 246 232 247 233 choice 248 234 prompt "TTYS0 device and default console"
+4 -4
arch/s390/kernel/cpcmd.c
··· 46 46 "lra 3,0(%4)\n" 47 47 "lr 5,%5\n" 48 48 "diag 2,4,0x8\n" 49 - "brc 8, .Litfits\n" 49 + "brc 8, 1f\n" 50 50 "ar 5, %5\n" 51 - ".Litfits: \n" 51 + "1: \n" 52 52 "lr %0,4\n" 53 53 "lr %1,5\n" 54 54 : "=d" (return_code), "=d" (return_len) ··· 64 64 "sam31\n" 65 65 "diag 2,4,0x8\n" 66 66 "sam64\n" 67 - "brc 8, .Litfits\n" 67 + "brc 8, 1f\n" 68 68 "agr 5, %5\n" 69 - ".Litfits: \n" 69 + "1: \n" 70 70 "lgr %0,4\n" 71 71 "lgr %1,5\n" 72 72 : "=d" (return_code), "=d" (return_len)
+3 -2
arch/sparc/kernel/sparc_ksyms.c
··· 98 98 * The module references will be fixed up by module_frob_arch_sections. 99 99 */ 100 100 #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ 101 - extern __ret __x(__arg1, __arg2) \ 102 - __attribute__((weak, alias("." # __x))); 101 + extern __ret __x(__arg1, __arg2); \ 102 + asm(".weak " #__x);\ 103 + asm(#__x "=." #__x); 103 104 104 105 DOT_ALIAS2(int, div, int, int) 105 106 DOT_ALIAS2(int, mul, int, int)
+1 -1
arch/sparc64/kernel/Makefile
··· 8 8 extra-y := head.o init_task.o vmlinux.lds 9 9 10 10 obj-y := process.o setup.o cpu.o idprom.o \ 11 - traps.o devices.o auxio.o \ 11 + traps.o devices.o auxio.o una_asm.o \ 12 12 irq.o ptrace.o time.o sys_sparc.o signal.o \ 13 13 unaligned.o central.o pci.o starfire.o semaphore.o \ 14 14 power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o
+3
arch/sparc64/kernel/traps.c
··· 2127 2127 TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) || 2128 2128 TI_NEW_CHILD != offsetof(struct thread_info, new_child) || 2129 2129 TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) || 2130 + TI_RESTART_BLOCK != offsetof(struct thread_info, restart_block) || 2131 + TI_KUNA_REGS != offsetof(struct thread_info, kern_una_regs) || 2132 + TI_KUNA_INSN != offsetof(struct thread_info, kern_una_insn) || 2130 2133 TI_FPREGS != offsetof(struct thread_info, fpregs) || 2131 2134 (TI_FPREGS & (64 - 1))) 2132 2135 thread_info_offsets_are_bolixed_dave();
+153
arch/sparc64/kernel/una_asm.S
··· 1 + /* una_asm.S: Kernel unaligned trap assembler helpers. 2 + * 3 + * Copyright (C) 1996,2005 David S. Miller (davem@davemloft.net) 4 + * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 + */ 6 + 7 + .text 8 + 9 + kernel_unaligned_trap_fault: 10 + call kernel_mna_trap_fault 11 + nop 12 + retl 13 + nop 14 + .size kern_unaligned_trap_fault, .-kern_unaligned_trap_fault 15 + 16 + .globl __do_int_store 17 + __do_int_store: 18 + rd %asi, %o4 19 + wr %o3, 0, %asi 20 + ldx [%o2], %g3 21 + cmp %o1, 2 22 + be,pn %icc, 2f 23 + cmp %o1, 4 24 + be,pt %icc, 1f 25 + srlx %g3, 24, %g2 26 + srlx %g3, 56, %g1 27 + srlx %g3, 48, %g7 28 + 4: stba %g1, [%o0] %asi 29 + srlx %g3, 40, %g1 30 + 5: stba %g7, [%o0 + 1] %asi 31 + srlx %g3, 32, %g7 32 + 6: stba %g1, [%o0 + 2] %asi 33 + 7: stba %g7, [%o0 + 3] %asi 34 + srlx %g3, 16, %g1 35 + 8: stba %g2, [%o0 + 4] %asi 36 + srlx %g3, 8, %g7 37 + 9: stba %g1, [%o0 + 5] %asi 38 + 10: stba %g7, [%o0 + 6] %asi 39 + ba,pt %xcc, 0f 40 + 11: stba %g3, [%o0 + 7] %asi 41 + 1: srl %g3, 16, %g7 42 + 12: stba %g2, [%o0] %asi 43 + srl %g3, 8, %g2 44 + 13: stba %g7, [%o0 + 1] %asi 45 + 14: stba %g2, [%o0 + 2] %asi 46 + ba,pt %xcc, 0f 47 + 15: stba %g3, [%o0 + 3] %asi 48 + 2: srl %g3, 8, %g2 49 + 16: stba %g2, [%o0] %asi 50 + 17: stba %g3, [%o0 + 1] %asi 51 + 0: 52 + wr %o4, 0x0, %asi 53 + retl 54 + nop 55 + .size __do_int_store, .-__do_int_store 56 + 57 + .section __ex_table 58 + .word 4b, kernel_unaligned_trap_fault 59 + .word 5b, kernel_unaligned_trap_fault 60 + .word 6b, kernel_unaligned_trap_fault 61 + .word 7b, kernel_unaligned_trap_fault 62 + .word 8b, kernel_unaligned_trap_fault 63 + .word 9b, kernel_unaligned_trap_fault 64 + .word 10b, kernel_unaligned_trap_fault 65 + .word 11b, kernel_unaligned_trap_fault 66 + .word 12b, kernel_unaligned_trap_fault 67 + .word 13b, kernel_unaligned_trap_fault 68 + .word 14b, kernel_unaligned_trap_fault 69 + .word 15b, kernel_unaligned_trap_fault 70 + .word 16b, kernel_unaligned_trap_fault 71 + .word 17b, kernel_unaligned_trap_fault 72 + .previous 73 + 74 + .globl do_int_load 75 + do_int_load: 76 + rd %asi, %o5 77 + wr %o4, 0, %asi 78 + cmp %o1, 8 79 + bge,pn %icc, 9f 80 + cmp %o1, 4 81 + be,pt %icc, 6f 82 + 4: lduba [%o2] %asi, %g2 83 + 5: lduba [%o2 + 1] %asi, %g3 84 + sll %g2, 8, %g2 85 + brz,pt %o3, 3f 86 + add %g2, %g3, %g2 87 + sllx %g2, 48, %g2 88 + srax %g2, 48, %g2 89 + 3: ba,pt %xcc, 0f 90 + stx %g2, [%o0] 91 + 6: lduba [%o2 + 1] %asi, %g3 92 + sll %g2, 24, %g2 93 + 7: lduba [%o2 + 2] %asi, %g7 94 + sll %g3, 16, %g3 95 + 8: lduba [%o2 + 3] %asi, %g1 96 + sll %g7, 8, %g7 97 + or %g2, %g3, %g2 98 + or %g7, %g1, %g7 99 + or %g2, %g7, %g2 100 + brnz,a,pt %o3, 3f 101 + sra %g2, 0, %g2 102 + 3: ba,pt %xcc, 0f 103 + stx %g2, [%o0] 104 + 9: lduba [%o2] %asi, %g2 105 + 10: lduba [%o2 + 1] %asi, %g3 106 + sllx %g2, 56, %g2 107 + 11: lduba [%o2 + 2] %asi, %g7 108 + sllx %g3, 48, %g3 109 + 12: lduba [%o2 + 3] %asi, %g1 110 + sllx %g7, 40, %g7 111 + sllx %g1, 32, %g1 112 + or %g2, %g3, %g2 113 + or %g7, %g1, %g7 114 + 13: lduba [%o2 + 4] %asi, %g3 115 + or %g2, %g7, %g7 116 + 14: lduba [%o2 + 5] %asi, %g1 117 + sllx %g3, 24, %g3 118 + 15: lduba [%o2 + 6] %asi, %g2 119 + sllx %g1, 16, %g1 120 + or %g7, %g3, %g7 121 + 16: lduba [%o2 + 7] %asi, %g3 122 + sllx %g2, 8, %g2 123 + or %g7, %g1, %g7 124 + or %g2, %g3, %g2 125 + or %g7, %g2, %g7 126 + cmp %o1, 8 127 + be,a,pt %icc, 0f 128 + stx %g7, [%o0] 129 + srlx %g7, 32, %g2 130 + sra %g7, 0, %g7 131 + stx %g2, [%o0] 132 + stx %g7, [%o0 + 8] 133 + 0: 134 + wr %o5, 0x0, %asi 135 + retl 136 + nop 137 + .size __do_int_load, .-__do_int_load 138 + 139 + .section __ex_table 140 + .word 4b, kernel_unaligned_trap_fault 141 + .word 5b, kernel_unaligned_trap_fault 142 + .word 6b, kernel_unaligned_trap_fault 143 + .word 7b, kernel_unaligned_trap_fault 144 + .word 8b, kernel_unaligned_trap_fault 145 + .word 9b, kernel_unaligned_trap_fault 146 + .word 10b, kernel_unaligned_trap_fault 147 + .word 11b, kernel_unaligned_trap_fault 148 + .word 12b, kernel_unaligned_trap_fault 149 + .word 13b, kernel_unaligned_trap_fault 150 + .word 14b, kernel_unaligned_trap_fault 151 + .word 15b, kernel_unaligned_trap_fault 152 + .word 16b, kernel_unaligned_trap_fault 153 + .previous
+56 -199
arch/sparc64/kernel/unaligned.c
··· 180 180 die_if_kernel(str, regs); 181 181 } 182 182 183 - #define do_integer_load(dest_reg, size, saddr, is_signed, asi, errh) ({ \ 184 - __asm__ __volatile__ ( \ 185 - "wr %4, 0, %%asi\n\t" \ 186 - "cmp %1, 8\n\t" \ 187 - "bge,pn %%icc, 9f\n\t" \ 188 - " cmp %1, 4\n\t" \ 189 - "be,pt %%icc, 6f\n" \ 190 - "4:\t" " lduba [%2] %%asi, %%l1\n" \ 191 - "5:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ 192 - "sll %%l1, 8, %%l1\n\t" \ 193 - "brz,pt %3, 3f\n\t" \ 194 - " add %%l1, %%l2, %%l1\n\t" \ 195 - "sllx %%l1, 48, %%l1\n\t" \ 196 - "srax %%l1, 48, %%l1\n" \ 197 - "3:\t" "ba,pt %%xcc, 0f\n\t" \ 198 - " stx %%l1, [%0]\n" \ 199 - "6:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ 200 - "sll %%l1, 24, %%l1\n" \ 201 - "7:\t" "lduba [%2 + 2] %%asi, %%g7\n\t" \ 202 - "sll %%l2, 16, %%l2\n" \ 203 - "8:\t" "lduba [%2 + 3] %%asi, %%g1\n\t" \ 204 - "sll %%g7, 8, %%g7\n\t" \ 205 - "or %%l1, %%l2, %%l1\n\t" \ 206 - "or %%g7, %%g1, %%g7\n\t" \ 207 - "or %%l1, %%g7, %%l1\n\t" \ 208 - "brnz,a,pt %3, 3f\n\t" \ 209 - " sra %%l1, 0, %%l1\n" \ 210 - "3:\t" "ba,pt %%xcc, 0f\n\t" \ 211 - " stx %%l1, [%0]\n" \ 212 - "9:\t" "lduba [%2] %%asi, %%l1\n" \ 213 - "10:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ 214 - "sllx %%l1, 56, %%l1\n" \ 215 - "11:\t" "lduba [%2 + 2] %%asi, %%g7\n\t" \ 216 - "sllx %%l2, 48, %%l2\n" \ 217 - "12:\t" "lduba [%2 + 3] %%asi, %%g1\n\t" \ 218 - "sllx %%g7, 40, %%g7\n\t" \ 219 - "sllx %%g1, 32, %%g1\n\t" \ 220 - "or %%l1, %%l2, %%l1\n\t" \ 221 - "or %%g7, %%g1, %%g7\n" \ 222 - "13:\t" "lduba [%2 + 4] %%asi, %%l2\n\t" \ 223 - "or %%l1, %%g7, %%g7\n" \ 224 - "14:\t" "lduba [%2 + 5] %%asi, %%g1\n\t" \ 225 - "sllx %%l2, 24, %%l2\n" \ 226 - "15:\t" "lduba [%2 + 6] %%asi, %%l1\n\t" \ 227 - "sllx %%g1, 16, %%g1\n\t" \ 228 - "or %%g7, %%l2, %%g7\n" \ 229 - "16:\t" "lduba [%2 + 7] %%asi, %%l2\n\t" \ 230 - "sllx %%l1, 8, %%l1\n\t" \ 231 - "or %%g7, %%g1, %%g7\n\t" \ 232 - "or %%l1, %%l2, %%l1\n\t" \ 233 - "or %%g7, %%l1, %%g7\n\t" \ 234 - "cmp %1, 8\n\t" \ 235 - "be,a,pt %%icc, 0f\n\t" \ 236 - " stx %%g7, [%0]\n\t" \ 237 - "srlx %%g7, 32, %%l1\n\t" \ 238 - "sra %%g7, 0, %%g7\n\t" \ 239 - "stx %%l1, [%0]\n\t" \ 240 - "stx %%g7, [%0 + 8]\n" \ 241 - "0:\n\t" \ 242 - "wr %%g0, %5, %%asi\n\n\t" \ 243 - ".section __ex_table\n\t" \ 244 - ".word 4b, " #errh "\n\t" \ 245 - ".word 5b, " #errh "\n\t" \ 246 - ".word 6b, " #errh "\n\t" \ 247 - ".word 7b, " #errh "\n\t" \ 248 - ".word 8b, " #errh "\n\t" \ 249 - ".word 9b, " #errh "\n\t" \ 250 - ".word 10b, " #errh "\n\t" \ 251 - ".word 11b, " #errh "\n\t" \ 252 - ".word 12b, " #errh "\n\t" \ 253 - ".word 13b, " #errh "\n\t" \ 254 - ".word 14b, " #errh "\n\t" \ 255 - ".word 15b, " #errh "\n\t" \ 256 - ".word 16b, " #errh "\n\n\t" \ 257 - ".previous\n\t" \ 258 - : : "r" (dest_reg), "r" (size), "r" (saddr), "r" (is_signed), \ 259 - "r" (asi), "i" (ASI_AIUS) \ 260 - : "l1", "l2", "g7", "g1", "cc"); \ 261 - }) 183 + extern void do_int_load(unsigned long *dest_reg, int size, 184 + unsigned long *saddr, int is_signed, int asi); 262 185 263 - #define store_common(dst_addr, size, src_val, asi, errh) ({ \ 264 - __asm__ __volatile__ ( \ 265 - "wr %3, 0, %%asi\n\t" \ 266 - "ldx [%2], %%l1\n" \ 267 - "cmp %1, 2\n\t" \ 268 - "be,pn %%icc, 2f\n\t" \ 269 - " cmp %1, 4\n\t" \ 270 - "be,pt %%icc, 1f\n\t" \ 271 - " srlx %%l1, 24, %%l2\n\t" \ 272 - "srlx %%l1, 56, %%g1\n\t" \ 273 - "srlx %%l1, 48, %%g7\n" \ 274 - "4:\t" "stba %%g1, [%0] %%asi\n\t" \ 275 - "srlx %%l1, 40, %%g1\n" \ 276 - "5:\t" "stba %%g7, [%0 + 1] %%asi\n\t" \ 277 - "srlx %%l1, 32, %%g7\n" \ 278 - "6:\t" "stba %%g1, [%0 + 2] %%asi\n" \ 279 - "7:\t" "stba %%g7, [%0 + 3] %%asi\n\t" \ 280 - "srlx %%l1, 16, %%g1\n" \ 281 - "8:\t" "stba %%l2, [%0 + 4] %%asi\n\t" \ 282 - "srlx %%l1, 8, %%g7\n" \ 283 - "9:\t" "stba %%g1, [%0 + 5] %%asi\n" \ 284 - "10:\t" "stba %%g7, [%0 + 6] %%asi\n\t" \ 285 - "ba,pt %%xcc, 0f\n" \ 286 - "11:\t" " stba %%l1, [%0 + 7] %%asi\n" \ 287 - "1:\t" "srl %%l1, 16, %%g7\n" \ 288 - "12:\t" "stba %%l2, [%0] %%asi\n\t" \ 289 - "srl %%l1, 8, %%l2\n" \ 290 - "13:\t" "stba %%g7, [%0 + 1] %%asi\n" \ 291 - "14:\t" "stba %%l2, [%0 + 2] %%asi\n\t" \ 292 - "ba,pt %%xcc, 0f\n" \ 293 - "15:\t" " stba %%l1, [%0 + 3] %%asi\n" \ 294 - "2:\t" "srl %%l1, 8, %%l2\n" \ 295 - "16:\t" "stba %%l2, [%0] %%asi\n" \ 296 - "17:\t" "stba %%l1, [%0 + 1] %%asi\n" \ 297 - "0:\n\t" \ 298 - "wr %%g0, %4, %%asi\n\n\t" \ 299 - ".section __ex_table\n\t" \ 300 - ".word 4b, " #errh "\n\t" \ 301 - ".word 5b, " #errh "\n\t" \ 302 - ".word 6b, " #errh "\n\t" \ 303 - ".word 7b, " #errh "\n\t" \ 304 - ".word 8b, " #errh "\n\t" \ 305 - ".word 9b, " #errh "\n\t" \ 306 - ".word 10b, " #errh "\n\t" \ 307 - ".word 11b, " #errh "\n\t" \ 308 - ".word 12b, " #errh "\n\t" \ 309 - ".word 13b, " #errh "\n\t" \ 310 - ".word 14b, " #errh "\n\t" \ 311 - ".word 15b, " #errh "\n\t" \ 312 - ".word 16b, " #errh "\n\t" \ 313 - ".word 17b, " #errh "\n\n\t" \ 314 - ".previous\n\t" \ 315 - : : "r" (dst_addr), "r" (size), "r" (src_val), "r" (asi), "i" (ASI_AIUS)\ 316 - : "l1", "l2", "g7", "g1", "cc"); \ 317 - }) 186 + extern void __do_int_store(unsigned long *dst_addr, int size, 187 + unsigned long *src_val, int asi); 318 188 319 - #define do_integer_store(reg_num, size, dst_addr, regs, asi, errh) ({ \ 320 - unsigned long zero = 0; \ 321 - unsigned long *src_val = &zero; \ 322 - \ 323 - if (size == 16) { \ 324 - size = 8; \ 325 - zero = (((long)(reg_num ? \ 326 - (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) | \ 327 - (unsigned)fetch_reg(reg_num + 1, regs); \ 328 - } else if (reg_num) src_val = fetch_reg_addr(reg_num, regs); \ 329 - store_common(dst_addr, size, src_val, asi, errh); \ 330 - }) 189 + static inline void do_int_store(int reg_num, int size, unsigned long *dst_addr, 190 + struct pt_regs *regs, int asi) 191 + { 192 + unsigned long zero = 0; 193 + unsigned long *src_val = &zero; 331 194 332 - extern void smp_capture(void); 333 - extern void smp_release(void); 334 - 335 - #define do_atomic(srcdest_reg, mem, errh) ({ \ 336 - unsigned long flags, tmp; \ 337 - \ 338 - smp_capture(); \ 339 - local_irq_save(flags); \ 340 - tmp = *srcdest_reg; \ 341 - do_integer_load(srcdest_reg, 4, mem, 0, errh); \ 342 - store_common(mem, 4, &tmp, errh); \ 343 - local_irq_restore(flags); \ 344 - smp_release(); \ 345 - }) 195 + if (size == 16) { 196 + size = 8; 197 + zero = (((long)(reg_num ? 198 + (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) | 199 + (unsigned)fetch_reg(reg_num + 1, regs); 200 + } else if (reg_num) { 201 + src_val = fetch_reg_addr(reg_num, regs); 202 + } 203 + __do_int_store(dst_addr, size, src_val, asi); 204 + } 346 205 347 206 static inline void advance(struct pt_regs *regs) 348 207 { ··· 223 364 return !floating_point_load_or_store_p(insn); 224 365 } 225 366 226 - void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) __asm__ ("kernel_mna_trap_fault"); 227 - 228 - void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) 367 + void kernel_mna_trap_fault(void) 229 368 { 230 - unsigned long g2 = regs->u_regs [UREG_G2]; 369 + struct pt_regs *regs = current_thread_info()->kern_una_regs; 370 + unsigned int insn = current_thread_info()->kern_una_insn; 371 + unsigned long g2 = regs->u_regs[UREG_G2]; 231 372 unsigned long fixup = search_extables_range(regs->tpc, &g2); 232 373 233 374 if (!fixup) { 234 - unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f)); 375 + unsigned long address; 376 + 377 + address = compute_effective_address(regs, insn, 378 + ((insn >> 25) & 0x1f)); 235 379 if (address < PAGE_SIZE) { 236 - printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference in mna handler"); 380 + printk(KERN_ALERT "Unable to handle kernel NULL " 381 + "pointer dereference in mna handler"); 237 382 } else 238 - printk(KERN_ALERT "Unable to handle kernel paging request in mna handler"); 383 + printk(KERN_ALERT "Unable to handle kernel paging " 384 + "request in mna handler"); 239 385 printk(KERN_ALERT " at virtual address %016lx\n",address); 240 - printk(KERN_ALERT "current->{mm,active_mm}->context = %016lx\n", 386 + printk(KERN_ALERT "current->{active_,}mm->context = %016lx\n", 241 387 (current->mm ? CTX_HWBITS(current->mm->context) : 242 388 CTX_HWBITS(current->active_mm->context))); 243 - printk(KERN_ALERT "current->{mm,active_mm}->pgd = %016lx\n", 389 + printk(KERN_ALERT "current->{active_,}mm->pgd = %016lx\n", 244 390 (current->mm ? (unsigned long) current->mm->pgd : 245 391 (unsigned long) current->active_mm->pgd)); 246 392 die_if_kernel("Oops", regs); ··· 264 400 enum direction dir = decode_direction(insn); 265 401 int size = decode_access_size(insn); 266 402 403 + current_thread_info()->kern_una_regs = regs; 404 + current_thread_info()->kern_una_insn = insn; 405 + 267 406 if (!ok_for_kernel(insn) || dir == both) { 268 - printk("Unsupported unaligned load/store trap for kernel at <%016lx>.\n", 269 - regs->tpc); 270 - unaligned_panic("Kernel does fpu/atomic unaligned load/store.", regs); 407 + printk("Unsupported unaligned load/store trap for kernel " 408 + "at <%016lx>.\n", regs->tpc); 409 + unaligned_panic("Kernel does fpu/atomic " 410 + "unaligned load/store.", regs); 271 411 272 - __asm__ __volatile__ ("\n" 273 - "kernel_unaligned_trap_fault:\n\t" 274 - "mov %0, %%o0\n\t" 275 - "call kernel_mna_trap_fault\n\t" 276 - " mov %1, %%o1\n\t" 277 - : 278 - : "r" (regs), "r" (insn) 279 - : "o0", "o1", "o2", "o3", "o4", "o5", "o7", 280 - "g1", "g2", "g3", "g4", "g7", "cc"); 412 + kernel_mna_trap_fault(); 281 413 } else { 282 - unsigned long addr = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f)); 414 + unsigned long addr; 283 415 416 + addr = compute_effective_address(regs, insn, 417 + ((insn >> 25) & 0x1f)); 284 418 #ifdef DEBUG_MNA 285 - printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] retpc[%016lx]\n", 286 - regs->tpc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]); 419 + printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] " 420 + "retpc[%016lx]\n", 421 + regs->tpc, dirstrings[dir], addr, size, 422 + regs->u_regs[UREG_RETPC]); 287 423 #endif 288 424 switch (dir) { 289 425 case load: 290 - do_integer_load(fetch_reg_addr(((insn>>25)&0x1f), regs), 291 - size, (unsigned long *) addr, 292 - decode_signedness(insn), decode_asi(insn, regs), 293 - kernel_unaligned_trap_fault); 426 + do_int_load(fetch_reg_addr(((insn>>25)&0x1f), regs), 427 + size, (unsigned long *) addr, 428 + decode_signedness(insn), 429 + decode_asi(insn, regs)); 294 430 break; 295 431 296 432 case store: 297 - do_integer_store(((insn>>25)&0x1f), size, 298 - (unsigned long *) addr, regs, 299 - decode_asi(insn, regs), 300 - kernel_unaligned_trap_fault); 433 + do_int_store(((insn>>25)&0x1f), size, 434 + (unsigned long *) addr, regs, 435 + decode_asi(insn, regs)); 301 436 break; 302 - #if 0 /* unsupported */ 303 - case both: 304 - do_atomic(fetch_reg_addr(((insn>>25)&0x1f), regs), 305 - (unsigned long *) addr, 306 - kernel_unaligned_trap_fault); 307 - break; 308 - #endif 437 + 309 438 default: 310 439 panic("Impossible kernel unaligned trap."); 311 440 /* Not reached... */
+8 -7
arch/x86_64/kernel/smpboot.c
··· 492 492 */ 493 493 set_cpu_sibling_map(smp_processor_id()); 494 494 495 + /* 496 + * Wait for TSC sync to not schedule things before. 497 + * We still process interrupts, which could see an inconsistent 498 + * time in that window unfortunately. 499 + * Do this here because TSC sync has global unprotected state. 500 + */ 501 + tsc_sync_wait(); 502 + 495 503 /* 496 504 * We need to hold call_lock, so there is no inconsistency 497 505 * between the time smp_call_function() determines number of ··· 516 508 cpu_set(smp_processor_id(), cpu_online_map); 517 509 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 518 510 unlock_ipi_call_lock(); 519 - 520 - mb(); 521 - 522 - /* Wait for TSC sync to not schedule things before. 523 - We still process interrupts, which could see an inconsistent 524 - time in that window unfortunately. */ 525 - tsc_sync_wait(); 526 511 527 512 cpu_idle(); 528 513 }
+1 -3
arch/x86_64/mm/fault.c
··· 211 211 { 212 212 if (tsk->pid == 1) 213 213 return 1; 214 - /* Warn for strace, but not for gdb */ 215 - if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) && 216 - (tsk->ptrace & PT_PTRACED)) 214 + if (tsk->ptrace & PT_PTRACED) 217 215 return 0; 218 216 return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) || 219 217 (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
+11 -2
arch/x86_64/pci/k8-bus.c
··· 47 47 * if there are no busses hanging off of the current 48 48 * ldt link then both the secondary and subordinate 49 49 * bus number fields are set to 0. 50 + * 51 + * RED-PEN 52 + * This is slightly broken because it assumes 53 + * HT node IDs == Linux node ids, which is not always 54 + * true. However it is probably mostly true. 50 55 */ 51 56 if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0 52 57 && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) { 53 58 for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); 54 59 j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); 55 - j++) 56 - pci_bus_to_node[j] = NODE_ID(nid); 60 + j++) { 61 + int node = NODE_ID(nid); 62 + if (!node_online(node)) 63 + node = 0; 64 + pci_bus_to_node[j] = node; 65 + } 57 66 } 58 67 } 59 68 }
+4 -4
drivers/char/Kconfig
··· 80 80 81 81 config COMPUTONE 82 82 tristate "Computone IntelliPort Plus serial support" 83 - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP 83 + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (BROKEN || !SPARC32) 84 84 ---help--- 85 85 This driver supports the entire family of Intelliport II/Plus 86 86 controllers with the exception of the MicroChannel controllers and ··· 138 138 139 139 config DIGIEPCA 140 140 tristate "Digiboard Intelligent Async Support" 141 - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP 141 + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (!64BIT || BROKEN) 142 142 ---help--- 143 143 This is a driver for Digi International's Xx, Xeve, and Xem series 144 144 of cards which provide multiple serial ports. You would need ··· 208 208 209 209 config SYNCLINKMP 210 210 tristate "SyncLink Multiport support" 211 - depends on SERIAL_NONSTANDARD 211 + depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32) 212 212 help 213 213 Enable support for the SyncLink Multiport (2 or 4 ports) 214 214 serial adapter, running asynchronous and HDLC communications up ··· 735 735 736 736 config GEN_RTC 737 737 tristate "Generic /dev/rtc emulation" 738 - depends on RTC!=y && !IA64 && !ARM && !PPC64 738 + depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R && !SPARC32 739 739 ---help--- 740 740 If you say Y here and create a character special file /dev/rtc with 741 741 major number 10 and minor number 135 using mknod ("man mknod"), you
+1
drivers/infiniband/Kconfig
··· 1 1 menu "InfiniBand support" 2 2 3 3 config INFINIBAND 4 + depends on PCI || BROKEN 4 5 tristate "InfiniBand support" 5 6 ---help--- 6 7 Core support for InfiniBand (IB). Make sure to also select
+1
drivers/isdn/hisax/Kconfig
··· 134 134 135 135 config HISAX_FRITZPCI 136 136 bool "AVM PnP/PCI (Fritz!PnP/PCI)" 137 + depends on BROKEN || !PPC64 137 138 help 138 139 This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI". 139 140 See <file:Documentation/isdn/README.HiSax> on how to configure it.
+1 -1
drivers/macintosh/Kconfig
··· 103 103 # on non-powerbook machines (but only on PMU based ones AFAIK) 104 104 config PMAC_BACKLIGHT 105 105 bool "Backlight control for LCD screens" 106 - depends on ADB_PMU 106 + depends on ADB_PMU && (BROKEN || !PPC64) 107 107 help 108 108 Say Y here to build in code to manage the LCD backlight on a 109 109 Macintosh PowerBook. With this code, the backlight will be turned
+3 -4
drivers/md/md.c
··· 256 256 { 257 257 up(&mddev->reconfig_sem); 258 258 259 - if (mddev->thread) 260 - md_wakeup_thread(mddev->thread); 259 + md_wakeup_thread(mddev->thread); 261 260 } 262 261 263 262 mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr) ··· 1713 1714 mddev->in_sync = 1; 1714 1715 1715 1716 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 1717 + md_wakeup_thread(mddev->thread); 1716 1718 1717 1719 if (mddev->sb_dirty) 1718 1720 md_update_sb(mddev); ··· 2236 2236 export_rdev(rdev); 2237 2237 2238 2238 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 2239 - if (mddev->thread) 2240 - md_wakeup_thread(mddev->thread); 2239 + md_wakeup_thread(mddev->thread); 2241 2240 return err; 2242 2241 } 2243 2242
+1 -1
drivers/media/video/Kconfig
··· 356 356 357 357 config VIDEO_M32R_AR_M64278 358 358 tristate "Use Colour AR module M64278(VGA)" 359 - depends on VIDEO_M32R_AR 359 + depends on VIDEO_M32R_AR && PLAT_M32700UT 360 360 ---help--- 361 361 Say Y here to use the Renesas M64278E-800 camera module, 362 362 which supports VGA(640x480 pixcels) size of images.
+2 -2
drivers/net/Kconfig
··· 1147 1147 be called ibmveth. 1148 1148 1149 1149 config IBM_EMAC 1150 - tristate "IBM PPC4xx EMAC driver support" 1150 + bool "IBM PPC4xx EMAC driver support" 1151 1151 depends on 4xx 1152 1152 select CRC32 1153 1153 ---help--- ··· 1156 1156 1157 1157 config IBM_EMAC_ERRMSG 1158 1158 bool "Verbose error messages" 1159 - depends on IBM_EMAC 1159 + depends on IBM_EMAC && BROKEN 1160 1160 1161 1161 config IBM_EMAC_RXB 1162 1162 int "Number of receive buffers"
+1 -2
drivers/net/ibm_emac/ibm_emac_core.c
··· 1712 1712 }; 1713 1713 1714 1714 #ifdef CONFIG_NET_POLL_CONTROLLER 1715 - static int emac_netpoll(struct net_device *ndev) 1715 + static void emac_netpoll(struct net_device *ndev) 1716 1716 { 1717 1717 emac_rxeob_dev((void *)ndev, 0); 1718 1718 emac_txeob_dev((void *)ndev, 0); 1719 - return 0; 1720 1719 } 1721 1720 #endif 1722 1721
+4 -2
drivers/net/tg3.c
··· 66 66 67 67 #define DRV_MODULE_NAME "tg3" 68 68 #define PFX DRV_MODULE_NAME ": " 69 - #define DRV_MODULE_VERSION "3.35" 70 - #define DRV_MODULE_RELDATE "August 6, 2005" 69 + #define DRV_MODULE_VERSION "3.36" 70 + #define DRV_MODULE_RELDATE "August 19, 2005" 71 71 72 72 #define TG3_DEF_MAC_MODE 0 73 73 #define TG3_DEF_RX_MODE 0 ··· 8970 8970 tp->phy_id = hw_phy_id; 8971 8971 if (hw_phy_id_masked == PHY_ID_BCM8002) 8972 8972 tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; 8973 + else 8974 + tp->tg3_flags2 &= ~TG3_FLG2_PHY_SERDES; 8973 8975 } else { 8974 8976 if (tp->phy_id != PHY_ID_INVALID) { 8975 8977 /* Do nothing, phy ID already set up in
+1 -1
drivers/net/tokenring/Kconfig
··· 84 84 85 85 config TMS380TR 86 86 tristate "Generic TMS380 Token Ring ISA/PCI adapter support" 87 - depends on TR && (PCI || ISA || MCA) 87 + depends on TR && (PCI || ISA && ISA_DMA_API || MCA) 88 88 select FW_LOADER 89 89 ---help--- 90 90 This driver provides generic support for token ring adapters
+1 -1
drivers/net/wireless/Kconfig
··· 270 270 271 271 config AIRO_CS 272 272 tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" 273 - depends on NET_RADIO && PCMCIA 273 + depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) 274 274 ---help--- 275 275 This is the standard Linux driver to support Cisco/Aironet PCMCIA 276 276 802.11 wireless cards. This driver is the same as the Aironet
+1 -1
drivers/parport/Kconfig
··· 34 34 35 35 config PARPORT_PC 36 36 tristate "PC-style hardware" 37 - depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 37 + depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R 38 38 ---help--- 39 39 You should say Y here if you have a PC-style parallel port. All 40 40 IBM PC compatible computers and some Alphas have PC-style
+1
drivers/pcmcia/pcmcia_resource.c
··· 41 41 42 42 43 43 #ifdef CONFIG_PCMCIA_PROBE 44 + #include <asm/irq.h> 44 45 /* mask of IRQs already reserved by other cards, we should avoid using them */ 45 46 static u8 pcmcia_used_irq[NR_IRQS]; 46 47 #endif
+1 -1
drivers/s390/cio/qdio.c
··· 230 230 } 231 231 232 232 /* locked by the locks in qdio_activate and qdio_cleanup */ 233 - static __u32 * volatile 233 + static __u32 volatile * 234 234 qdio_get_indicator(void) 235 235 { 236 236 int i;
-9
drivers/s390/crypto/z90crypt.h
··· 36 36 #define z90crypt_VARIANT 2 // 2 = added PCIXCC MCL3 and CEX2C support 37 37 38 38 /** 39 - * If we are not using the sparse checker, __user has no use. 40 - */ 41 - #ifdef __CHECKER__ 42 - # define __user __attribute__((noderef, address_space(1))) 43 - #else 44 - # define __user 45 - #endif 46 - 47 - /** 48 39 * struct ica_rsa_modexpo 49 40 * 50 41 * Requirements:
+3 -3
drivers/scsi/Kconfig
··· 1696 1696 1697 1697 config MAC_SCSI 1698 1698 bool "Macintosh NCR5380 SCSI" 1699 - depends on MAC && SCSI 1699 + depends on MAC && SCSI=y 1700 1700 help 1701 1701 This is the NCR 5380 SCSI controller included on most of the 68030 1702 1702 based Macintoshes. If you have one of these say Y and read the ··· 1717 1717 1718 1718 config MVME147_SCSI 1719 1719 bool "WD33C93 SCSI driver for MVME147" 1720 - depends on MVME147 && SCSI 1720 + depends on MVME147 && SCSI=y 1721 1721 help 1722 1722 Support for the on-board SCSI controller on the Motorola MVME147 1723 1723 single-board computer. ··· 1758 1758 1759 1759 config SUN3X_ESP 1760 1760 bool "Sun3x ESP SCSI" 1761 - depends on SUN3X && SCSI 1761 + depends on SUN3X && SCSI=y 1762 1762 help 1763 1763 The ESP was an on-board SCSI controller used on Sun 3/80 1764 1764 machines. Say Y here to compile in support for it.
+1
drivers/scsi/ahci.c
··· 1105 1105 MODULE_DESCRIPTION("AHCI SATA low-level driver"); 1106 1106 MODULE_LICENSE("GPL"); 1107 1107 MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); 1108 + MODULE_VERSION(DRV_VERSION); 1108 1109 1109 1110 module_init(ahci_init); 1110 1111 module_exit(ahci_exit);
+1 -1
drivers/scsi/arm/Kconfig
··· 3 3 # 4 4 config SCSI_ACORNSCSI_3 5 5 tristate "Acorn SCSI card (aka30) support" 6 - depends on ARCH_ACORN && SCSI 6 + depends on ARCH_ACORN && SCSI && BROKEN 7 7 help 8 8 This enables support for the Acorn SCSI card (aka30). If you have an 9 9 Acorn system with one of these, say Y. If unsure, say N.
+1 -1
drivers/scsi/ata_piix.c
··· 32 32 #include <linux/libata.h> 33 33 34 34 #define DRV_NAME "ata_piix" 35 - #define DRV_VERSION "1.03" 35 + #define DRV_VERSION "1.04" 36 36 37 37 enum { 38 38 PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
-25
drivers/scsi/libata-core.c
··· 2268 2268 * spin_lock_irqsave(host_set lock) 2269 2269 */ 2270 2270 2271 - 2272 - 2273 - /** 2274 - * ata_sg_init_one - Prepare a one-entry scatter-gather list. 2275 - * @qc: Queued command 2276 - * @buf: transfer buffer 2277 - * @buflen: length of buf 2278 - * 2279 - * Builds a single-entry scatter-gather list to initiate a 2280 - * transfer utilizing the specified buffer. 2281 - * 2282 - * LOCKING: 2283 - */ 2284 2271 void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) 2285 2272 { 2286 2273 struct scatterlist *sg; ··· 2297 2310 * 2298 2311 * LOCKING: 2299 2312 * spin_lock_irqsave(host_set lock) 2300 - */ 2301 - 2302 - 2303 - /** 2304 - * ata_sg_init - Assign a scatter gather list to a queued command 2305 - * @qc: Queued command 2306 - * @sg: Scatter-gather list 2307 - * @n_elem: length of sg list 2308 - * 2309 - * Attaches a scatter-gather list to a queued command. 2310 - * 2311 - * LOCKING: 2312 2313 */ 2313 2314 2314 2315 void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
+1 -1
drivers/scsi/libata.h
··· 26 26 #define __LIBATA_H__ 27 27 28 28 #define DRV_NAME "libata" 29 - #define DRV_VERSION "1.11" /* must be exactly four chars */ 29 + #define DRV_VERSION "1.12" /* must be exactly four chars */ 30 30 31 31 struct ata_scsi_args { 32 32 u16 *id;
+1 -1
drivers/scsi/sata_promise.c
··· 40 40 #include "sata_promise.h" 41 41 42 42 #define DRV_NAME "sata_promise" 43 - #define DRV_VERSION "1.01" 43 + #define DRV_VERSION "1.02" 44 44 45 45 46 46 enum {
+2 -2
drivers/serial/Kconfig
··· 211 211 212 212 config SERIAL_AMBA_PL010 213 213 tristate "ARM AMBA PL010 serial port support" 214 - depends on ARM_AMBA 214 + depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) 215 215 select SERIAL_CORE 216 216 help 217 217 This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have ··· 819 819 820 820 config SERIAL_M32R_PLDSIO 821 821 bool "M32R SIO I/F on a PLD" 822 - depends on SERIAL_M32R_SIO=y 822 + depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT) 823 823 default n 824 824 help 825 825 Say Y here if you want to use the M32R serial controller
+1 -1
drivers/serial/m32r_sio.c
··· 1123 1123 return uart_set_options(port, co, baud, parity, bits, flow); 1124 1124 } 1125 1125 1126 - extern struct uart_driver m32r_sio_reg; 1126 + static struct uart_driver m32r_sio_reg; 1127 1127 static struct console m32r_sio_console = { 1128 1128 .name = "ttyS", 1129 1129 .write = m32r_sio_console_write,
+1 -1
drivers/usb/net/usbnet.c
··· 1922 1922 1923 1923 // copy the packet data to the new skb 1924 1924 memcpy(skb_put(gl_skb, size), packet->packet_data, size); 1925 - skb_return (dev, skb); 1925 + skb_return (dev, gl_skb); 1926 1926 } 1927 1927 1928 1928 // advance to the next packet
+1 -2
drivers/usb/net/zd1201.c
··· 346 346 if (datalen<14) 347 347 goto resubmit; 348 348 if ((seq & IEEE802_11_SCTL_FRAG) == 0) { 349 - frag = kmalloc(sizeof(struct zd1201_frag*), 350 - GFP_ATOMIC); 349 + frag = kmalloc(sizeof(*frag), GFP_ATOMIC); 351 350 if (!frag) 352 351 goto resubmit; 353 352 skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2);
+1 -1
drivers/video/console/Kconfig
··· 6 6 7 7 config VGA_CONSOLE 8 8 bool "VGA text console" if EMBEDDED || !X86 9 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC 9 + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE 10 10 default y 11 11 help 12 12 Saying Y here will allow you to use Linux in text mode through a
+4 -4
fs/afs/mntpt.c
··· 30 30 struct dentry *dentry, 31 31 struct nameidata *nd); 32 32 static int afs_mntpt_open(struct inode *inode, struct file *file); 33 - static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd); 33 + static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd); 34 34 35 35 struct file_operations afs_mntpt_file_operations = { 36 36 .open = afs_mntpt_open, ··· 233 233 /* 234 234 * follow a link from a mountpoint directory, thus causing it to be mounted 235 235 */ 236 - static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) 236 + static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) 237 237 { 238 238 struct vfsmount *newmnt; 239 239 struct dentry *old_dentry; ··· 249 249 newmnt = afs_mntpt_do_automount(dentry); 250 250 if (IS_ERR(newmnt)) { 251 251 path_release(nd); 252 - return PTR_ERR(newmnt); 252 + return (void *)newmnt; 253 253 } 254 254 255 255 old_dentry = nd->dentry; ··· 267 267 } 268 268 269 269 kleave(" = %d", err); 270 - return err; 270 + return ERR_PTR(err); 271 271 } /* end afs_mntpt_follow_link() */ 272 272 273 273 /*****************************************************************************/
+3 -2
fs/autofs/symlink.c
··· 12 12 13 13 #include "autofs_i.h" 14 14 15 - static int autofs_follow_link(struct dentry *dentry, struct nameidata *nd) 15 + /* Nothing to release.. */ 16 + static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd) 16 17 { 17 18 char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; 18 19 nd_set_link(nd, s); 19 - return 0; 20 + return NULL; 20 21 } 21 22 22 23 struct inode_operations autofs_symlink_inode_operations = {
+2 -2
fs/autofs4/symlink.c
··· 12 12 13 13 #include "autofs_i.h" 14 14 15 - static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) 15 + static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) 16 16 { 17 17 struct autofs_info *ino = autofs4_dentry_ino(dentry); 18 18 nd_set_link(nd, (char *)ino->u.symlink); 19 - return 0; 19 + return NULL; 20 20 } 21 21 22 22 struct inode_operations autofs4_symlink_inode_operations = {
+5 -5
fs/befs/linuxvfs.c
··· 41 41 static void befs_destroy_inode(struct inode *inode); 42 42 static int befs_init_inodecache(void); 43 43 static void befs_destroy_inodecache(void); 44 - static int befs_follow_link(struct dentry *, struct nameidata *); 45 - static void befs_put_link(struct dentry *, struct nameidata *); 44 + static void *befs_follow_link(struct dentry *, struct nameidata *); 45 + static void befs_put_link(struct dentry *, struct nameidata *, void *); 46 46 static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, 47 47 char **out, int *out_len); 48 48 static int befs_nls2utf(struct super_block *sb, const char *in, int in_len, ··· 461 461 * The data stream become link name. Unless the LONG_SYMLINK 462 462 * flag is set. 463 463 */ 464 - static int 464 + static void * 465 465 befs_follow_link(struct dentry *dentry, struct nameidata *nd) 466 466 { 467 467 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); ··· 487 487 } 488 488 489 489 nd_set_link(nd, link); 490 - return 0; 490 + return NULL; 491 491 } 492 492 493 - static void befs_put_link(struct dentry *dentry, struct nameidata *nd) 493 + static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) 494 494 { 495 495 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); 496 496 if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
+2 -2
fs/cifs/cifsfs.h
··· 83 83 extern struct dentry_operations cifs_dentry_ops; 84 84 85 85 /* Functions related to symlinks */ 86 - extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd); 87 - extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd); 86 + extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd); 87 + extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *); 88 88 extern int cifs_readlink(struct dentry *direntry, char __user *buffer, 89 89 int buflen); 90 90 extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
+3 -3
fs/cifs/link.c
··· 92 92 return rc; 93 93 } 94 94 95 - int 95 + void * 96 96 cifs_follow_link(struct dentry *direntry, struct nameidata *nd) 97 97 { 98 98 struct inode *inode = direntry->d_inode; ··· 148 148 out_no_free: 149 149 FreeXid(xid); 150 150 nd_set_link(nd, target_path); 151 - return 0; 151 + return NULL; /* No cookie */ 152 152 } 153 153 154 154 int ··· 330 330 return rc; 331 331 } 332 332 333 - void cifs_put_link(struct dentry *direntry, struct nameidata *nd) 333 + void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie) 334 334 { 335 335 char *p = nd_get_link(nd); 336 336 if (!IS_ERR(p))
+2 -2
fs/devfs/base.c
··· 2491 2491 return 0; 2492 2492 } /* End Function devfs_mknod */ 2493 2493 2494 - static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd) 2494 + static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd) 2495 2495 { 2496 2496 struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); 2497 2497 nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); 2498 - return 0; 2498 + return NULL; 2499 2499 } /* End Function devfs_follow_link */ 2500 2500 2501 2501 static struct inode_operations devfs_iops = {
+2 -2
fs/ext2/symlink.c
··· 21 21 #include "xattr.h" 22 22 #include <linux/namei.h> 23 23 24 - static int ext2_follow_link(struct dentry *dentry, struct nameidata *nd) 24 + static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd) 25 25 { 26 26 struct ext2_inode_info *ei = EXT2_I(dentry->d_inode); 27 27 nd_set_link(nd, (char *)ei->i_data); 28 - return 0; 28 + return NULL; 29 29 } 30 30 31 31 struct inode_operations ext2_symlink_inode_operations = {
+2 -2
fs/ext3/symlink.c
··· 23 23 #include <linux/namei.h> 24 24 #include "xattr.h" 25 25 26 - static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd) 26 + static void * ext3_follow_link(struct dentry *dentry, struct nameidata *nd) 27 27 { 28 28 struct ext3_inode_info *ei = EXT3_I(dentry->d_inode); 29 29 nd_set_link(nd, (char*)ei->i_data); 30 - return 0; 30 + return NULL; 31 31 } 32 32 33 33 struct inode_operations ext3_symlink_inode_operations = {
+3 -3
fs/freevxfs/vxfs_immed.c
··· 38 38 #include "vxfs_inode.h" 39 39 40 40 41 - static int vxfs_immed_follow_link(struct dentry *, struct nameidata *); 41 + static void * vxfs_immed_follow_link(struct dentry *, struct nameidata *); 42 42 43 43 static int vxfs_immed_readpage(struct file *, struct page *); 44 44 ··· 72 72 * Returns: 73 73 * Zero on success, else a negative error code. 74 74 */ 75 - static int 75 + static void * 76 76 vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np) 77 77 { 78 78 struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode); 79 79 nd_set_link(np, vip->vii_immed.vi_immed); 80 - return 0; 80 + return NULL; 81 81 } 82 82 83 83 /**
+2
fs/ioprio.c
··· 62 62 63 63 break; 64 64 case IOPRIO_CLASS_IDLE: 65 + if (!capable(CAP_SYS_ADMIN)) 66 + return -EPERM; 65 67 break; 66 68 default: 67 69 return -EINVAL;
+9 -7
fs/jffs2/symlink.c
··· 18 18 #include <linux/namei.h> 19 19 #include "nodelist.h" 20 20 21 - static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); 21 + static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); 22 22 23 23 struct inode_operations jffs2_symlink_inode_operations = 24 24 { ··· 27 27 .setattr = jffs2_setattr 28 28 }; 29 29 30 - static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) 30 + static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) 31 31 { 32 32 struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode); 33 + char *p = (char *)f->dents; 33 34 34 35 /* 35 36 * We don't acquire the f->sem mutex here since the only data we ··· 46 45 * nd_set_link() call. 47 46 */ 48 47 49 - if (!f->dents) { 48 + if (!p) { 50 49 printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n"); 51 - return -EIO; 50 + p = ERR_PTR(-EIO); 51 + } else { 52 + D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents)); 52 53 } 53 - D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents)); 54 54 55 - nd_set_link(nd, (char *)f->dents); 55 + nd_set_link(nd, p); 56 56 57 57 /* 58 58 * We unlock the f->sem mutex but VFS will use the f->dents string. This is safe 59 59 * since the only way that may cause f->dents to be changed is iput() operation. 60 60 * But VFS will not use f->dents after iput() has been called. 61 61 */ 62 - return 0; 62 + return NULL; 63 63 } 64 64
+2 -2
fs/jfs/symlink.c
··· 22 22 #include "jfs_inode.h" 23 23 #include "jfs_xattr.h" 24 24 25 - static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) 25 + static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd) 26 26 { 27 27 char *s = JFS_IP(dentry->d_inode)->i_inline; 28 28 nd_set_link(nd, s); 29 - return 0; 29 + return NULL; 30 30 } 31 31 32 32 struct inode_operations jfs_symlink_inode_operations = {
+21 -19
fs/namei.c
··· 501 501 static inline int __do_follow_link(struct path *path, struct nameidata *nd) 502 502 { 503 503 int error; 504 + void *cookie; 504 505 struct dentry *dentry = path->dentry; 505 506 506 507 touch_atime(path->mnt, dentry); ··· 509 508 510 509 if (path->mnt == nd->mnt) 511 510 mntget(path->mnt); 512 - error = dentry->d_inode->i_op->follow_link(dentry, nd); 513 - if (!error) { 511 + cookie = dentry->d_inode->i_op->follow_link(dentry, nd); 512 + error = PTR_ERR(cookie); 513 + if (!IS_ERR(cookie)) { 514 514 char *s = nd_get_link(nd); 515 + error = 0; 515 516 if (s) 516 517 error = __vfs_follow_link(nd, s); 517 518 if (dentry->d_inode->i_op->put_link) 518 - dentry->d_inode->i_op->put_link(dentry, nd); 519 + dentry->d_inode->i_op->put_link(dentry, nd, cookie); 519 520 } 520 521 dput(dentry); 521 522 mntput(path->mnt); ··· 2347 2344 int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) 2348 2345 { 2349 2346 struct nameidata nd; 2350 - int res; 2347 + void *cookie; 2348 + 2351 2349 nd.depth = 0; 2352 - res = dentry->d_inode->i_op->follow_link(dentry, &nd); 2353 - if (!res) { 2354 - res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd)); 2350 + cookie = dentry->d_inode->i_op->follow_link(dentry, &nd); 2351 + if (!IS_ERR(cookie)) { 2352 + int res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd)); 2355 2353 if (dentry->d_inode->i_op->put_link) 2356 - dentry->d_inode->i_op->put_link(dentry, &nd); 2354 + dentry->d_inode->i_op->put_link(dentry, &nd, cookie); 2355 + cookie = ERR_PTR(res); 2357 2356 } 2358 - return res; 2357 + return PTR_ERR(cookie); 2359 2358 } 2360 2359 2361 2360 int vfs_follow_link(struct nameidata *nd, const char *link) ··· 2400 2395 return res; 2401 2396 } 2402 2397 2403 - int page_follow_link_light(struct dentry *dentry, struct nameidata *nd) 2398 + void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd) 2404 2399 { 2405 - struct page *page; 2400 + struct page *page = NULL; 2406 2401 nd_set_link(nd, page_getlink(dentry, &page)); 2407 - return 0; 2402 + return page; 2408 2403 } 2409 2404 2410 - void page_put_link(struct dentry *dentry, struct nameidata *nd) 2405 + void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 2411 2406 { 2412 - if (!IS_ERR(nd_get_link(nd))) { 2413 - struct page *page; 2414 - page = find_get_page(dentry->d_inode->i_mapping, 0); 2415 - if (!page) 2416 - BUG(); 2407 + struct page *page = cookie; 2408 + 2409 + if (page) { 2417 2410 kunmap(page); 2418 - page_cache_release(page); 2419 2411 page_cache_release(page); 2420 2412 } 2421 2413 }
+1
fs/nfs/dir.c
··· 939 939 error = nfs_revalidate_inode(NFS_SERVER(dir), dir); 940 940 if (error < 0) { 941 941 res = ERR_PTR(error); 942 + unlock_kernel(); 942 943 goto out; 943 944 } 944 945
+8 -29
fs/nfs/symlink.c
··· 27 27 28 28 /* Symlink caching in the page cache is even more simplistic 29 29 * and straight-forward than readdir caching. 30 - * 31 - * At the beginning of the page we store pointer to struct page in question, 32 - * simplifying nfs_put_link() (if inode got invalidated we can't find the page 33 - * to be freed via pagecache lookup). 34 - * The NUL-terminated string follows immediately thereafter. 35 30 */ 36 - 37 - struct nfs_symlink { 38 - struct page *page; 39 - char body[0]; 40 - }; 41 31 42 32 static int nfs_symlink_filler(struct inode *inode, struct page *page) 43 33 { 44 - const unsigned int pgbase = offsetof(struct nfs_symlink, body); 45 - const unsigned int pglen = PAGE_SIZE - pgbase; 46 34 int error; 47 35 48 36 lock_kernel(); 49 - error = NFS_PROTO(inode)->readlink(inode, page, pgbase, pglen); 37 + error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE); 50 38 unlock_kernel(); 51 39 if (error < 0) 52 40 goto error; ··· 48 60 return -EIO; 49 61 } 50 62 51 - static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) 63 + static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd) 52 64 { 53 65 struct inode *inode = dentry->d_inode; 54 66 struct page *page; 55 - struct nfs_symlink *p; 56 67 void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); 57 68 if (err) 58 69 goto read_failed; ··· 65 78 err = ERR_PTR(-EIO); 66 79 goto getlink_read_error; 67 80 } 68 - p = kmap(page); 69 - p->page = page; 70 - nd_set_link(nd, p->body); 71 - return 0; 81 + nd_set_link(nd, kmap(page)); 82 + return page; 72 83 73 84 getlink_read_error: 74 85 page_cache_release(page); 75 86 read_failed: 76 87 nd_set_link(nd, err); 77 - return 0; 88 + return NULL; 78 89 } 79 90 80 - static void nfs_put_link(struct dentry *dentry, struct nameidata *nd) 91 + static void nfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 81 92 { 82 - char *s = nd_get_link(nd); 83 - if (!IS_ERR(s)) { 84 - struct nfs_symlink *p; 85 - struct page *page; 86 - 87 - p = container_of(s, struct nfs_symlink, body[0]); 88 - page = p->page; 89 - 93 + if (cookie) { 94 + struct page *page = cookie; 90 95 kunmap(page); 91 96 page_cache_release(page); 92 97 }
+4 -4
fs/proc/base.c
··· 890 890 }; 891 891 #endif /* CONFIG_SECCOMP */ 892 892 893 - static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) 893 + static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) 894 894 { 895 895 struct inode *inode = dentry->d_inode; 896 896 int error = -EACCES; ··· 907 907 error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt); 908 908 nd->last_type = LAST_BIND; 909 909 out: 910 - return error; 910 + return ERR_PTR(error); 911 911 } 912 912 913 913 static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt, ··· 1692 1692 return vfs_readlink(dentry,buffer,buflen,tmp); 1693 1693 } 1694 1694 1695 - static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) 1695 + static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) 1696 1696 { 1697 1697 char tmp[30]; 1698 1698 sprintf(tmp, "%d", current->tgid); 1699 - return vfs_follow_link(nd,tmp); 1699 + return ERR_PTR(vfs_follow_link(nd,tmp)); 1700 1700 } 1701 1701 1702 1702 static struct inode_operations proc_self_inode_operations = {
+2 -2
fs/proc/generic.c
··· 329 329 spin_unlock(&proc_inum_lock); 330 330 } 331 331 332 - static int proc_follow_link(struct dentry *dentry, struct nameidata *nd) 332 + static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd) 333 333 { 334 334 nd_set_link(nd, PDE(dentry->d_inode)->data); 335 - return 0; 335 + return NULL; 336 336 } 337 337 338 338 static struct inode_operations proc_link_inode_operations = {
+3 -3
fs/smbfs/symlink.c
··· 34 34 return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname); 35 35 } 36 36 37 - static int smb_follow_link(struct dentry *dentry, struct nameidata *nd) 37 + static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd) 38 38 { 39 39 char *link = __getname(); 40 40 DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry)); ··· 52 52 } 53 53 } 54 54 nd_set_link(nd, link); 55 - return 0; 55 + return NULL; 56 56 } 57 57 58 - static void smb_put_link(struct dentry *dentry, struct nameidata *nd) 58 + static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p) 59 59 { 60 60 char *s = nd_get_link(nd); 61 61 if (!IS_ERR(s))
+3 -3
fs/sysfs/symlink.c
··· 151 151 152 152 } 153 153 154 - static int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) 154 + static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) 155 155 { 156 156 int error = -ENOMEM; 157 157 unsigned long page = get_zeroed_page(GFP_KERNEL); 158 158 if (page) 159 159 error = sysfs_getlink(dentry, (char *) page); 160 160 nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); 161 - return 0; 161 + return NULL; 162 162 } 163 163 164 - static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd) 164 + static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 165 165 { 166 166 char *page = nd_get_link(nd); 167 167 if (!IS_ERR(page))
+2 -2
fs/sysv/symlink.c
··· 8 8 #include "sysv.h" 9 9 #include <linux/namei.h> 10 10 11 - static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd) 11 + static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd) 12 12 { 13 13 nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data); 14 - return 0; 14 + return NULL; 15 15 } 16 16 17 17 struct inode_operations sysv_fast_symlink_inode_operations = {
+2 -2
fs/ufs/symlink.c
··· 29 29 #include <linux/namei.h> 30 30 #include <linux/ufs_fs.h> 31 31 32 - static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd) 32 + static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd) 33 33 { 34 34 struct ufs_inode_info *p = UFS_I(dentry->d_inode); 35 35 nd_set_link(nd, (char*)p->i_u1.i_symlink); 36 - return 0; 36 + return NULL; 37 37 } 38 38 39 39 struct inode_operations ufs_fast_symlink_inode_operations = {
+5 -5
fs/xfs/linux-2.6/xfs_iops.c
··· 374 374 * we need to be very careful about how much stack we use. 375 375 * uio is kmalloced for this reason... 376 376 */ 377 - STATIC int 377 + STATIC void * 378 378 linvfs_follow_link( 379 379 struct dentry *dentry, 380 380 struct nameidata *nd) ··· 391 391 link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL); 392 392 if (!link) { 393 393 nd_set_link(nd, ERR_PTR(-ENOMEM)); 394 - return 0; 394 + return NULL; 395 395 } 396 396 397 397 uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL); 398 398 if (!uio) { 399 399 kfree(link); 400 400 nd_set_link(nd, ERR_PTR(-ENOMEM)); 401 - return 0; 401 + return NULL; 402 402 } 403 403 404 404 vp = LINVFS_GET_VP(dentry->d_inode); ··· 422 422 kfree(uio); 423 423 424 424 nd_set_link(nd, link); 425 - return 0; 425 + return NULL; 426 426 } 427 427 428 - static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd) 428 + static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) 429 429 { 430 430 char *s = nd_get_link(nd); 431 431 if (!IS_ERR(s))
+13 -16
include/asm-alpha/system.h
··· 443 443 if something tries to do an invalid xchg(). */ 444 444 extern void __xchg_called_with_bad_pointer(void); 445 445 446 - static inline unsigned long 447 - __xchg(volatile void *ptr, unsigned long x, int size) 448 - { 449 - switch (size) { 450 - case 1: 451 - return __xchg_u8(ptr, x); 452 - case 2: 453 - return __xchg_u16(ptr, x); 454 - case 4: 455 - return __xchg_u32(ptr, x); 456 - case 8: 457 - return __xchg_u64(ptr, x); 458 - } 459 - __xchg_called_with_bad_pointer(); 460 - return x; 461 - } 446 + #define __xchg(ptr, x, size) \ 447 + ({ \ 448 + unsigned long __xchg__res; \ 449 + volatile void *__xchg__ptr = (ptr); \ 450 + switch (size) { \ 451 + case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \ 452 + case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \ 453 + case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \ 454 + case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \ 455 + default: __xchg_called_with_bad_pointer(); __xchg__res = x; \ 456 + } \ 457 + __xchg__res; \ 458 + }) 462 459 463 460 #define xchg(ptr,x) \ 464 461 ({ \
+4 -2
include/asm-arm/arch-ixp4xx/timex.h
··· 7 7 8 8 /* 9 9 * We use IXP425 General purpose timer for our timer needs, it runs at 10 - * 66.66... MHz 10 + * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the 11 + * timer register ignores the bottom 2 bits of the LATCH value. 11 12 */ 12 - #define CLOCK_TICK_RATE (66666666) 13 + #define FREQ 66666666 14 + #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) 13 15
+1 -1
include/asm-arm/bug.h
··· 5 5 6 6 #ifdef CONFIG_BUG 7 7 #ifdef CONFIG_DEBUG_BUGVERBOSE 8 - extern volatile void __bug(const char *file, int line, void *data); 8 + extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); 9 9 10 10 /* give file/line information */ 11 11 #define BUG() __bug(__FILE__, __LINE__, NULL)
+1 -1
include/asm-arm/cpu-multi32.h
··· 31 31 /* 32 32 * Special stuff for a reset 33 33 */ 34 - volatile void (*reset)(unsigned long addr); 34 + void (*reset)(unsigned long addr) __attribute__((noreturn)); 35 35 /* 36 36 * Idle the processor 37 37 */
+1 -1
include/asm-arm/cpu-single.h
··· 41 41 extern void cpu_dcache_clean_area(void *, int); 42 42 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 43 43 extern void cpu_set_pte(pte_t *ptep, pte_t pte); 44 - extern volatile void cpu_reset(unsigned long addr); 44 + extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
-8
include/asm-ia64/io.h
··· 120 120 ia64_mfa(); 121 121 } 122 122 123 - static inline const unsigned long 124 - __ia64_get_io_port_base (void) 125 - { 126 - extern unsigned long ia64_iobase; 127 - 128 - return ia64_iobase; 129 - } 130 - 131 123 static inline void* 132 124 __ia64_mk_io_addr (unsigned long port) 133 125 {
-2
include/asm-m32r/smp.h
··· 61 61 * Some lowlevel functions might want to know about 62 62 * the real CPU ID <-> CPU # mapping. 63 63 */ 64 - extern volatile int physid_2_cpu[NR_CPUS]; 65 64 extern volatile int cpu_2_physid[NR_CPUS]; 66 - #define physid_to_cpu(physid) physid_2_cpu[physid] 67 65 #define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id] 68 66 69 67 #define raw_smp_processor_id() (current_thread_info()->cpu)
+1 -1
include/asm-ppc/time.h
··· 58 58 /* Accessor functions for the timebase (RTC on 601) registers. */ 59 59 /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ 60 60 #ifdef CONFIG_6xx 61 - extern __inline__ int const __USE_RTC(void) { 61 + extern __inline__ int __attribute_pure__ __USE_RTC(void) { 62 62 return (mfspr(SPRN_PVR)>>16) == 1; 63 63 } 64 64 #else
+2 -19
include/asm-s390/uaccess.h
··· 149 149 }) 150 150 #endif 151 151 152 - #ifndef __CHECKER__ 153 152 #define __put_user(x, ptr) \ 154 153 ({ \ 155 154 __typeof__(*(ptr)) __x = (x); \ 156 155 int __pu_err; \ 156 + __chk_user_ptr(ptr); \ 157 157 switch (sizeof (*(ptr))) { \ 158 158 case 1: \ 159 159 case 2: \ ··· 167 167 } \ 168 168 __pu_err; \ 169 169 }) 170 - #else 171 - #define __put_user(x, ptr) \ 172 - ({ \ 173 - void __user *p; \ 174 - p = (ptr); \ 175 - 0; \ 176 - }) 177 - #endif 178 170 179 171 #define put_user(x, ptr) \ 180 172 ({ \ ··· 205 213 }) 206 214 #endif 207 215 208 - #ifndef __CHECKER__ 209 216 #define __get_user(x, ptr) \ 210 217 ({ \ 211 218 __typeof__(*(ptr)) __x; \ 212 219 int __gu_err; \ 220 + __chk_user_ptr(ptr); \ 213 221 switch (sizeof(*(ptr))) { \ 214 222 case 1: \ 215 223 case 2: \ ··· 224 232 (x) = __x; \ 225 233 __gu_err; \ 226 234 }) 227 - #else 228 - #define __get_user(x, ptr) \ 229 - ({ \ 230 - void __user *p; \ 231 - p = (ptr); \ 232 - 0; \ 233 - }) 234 - #endif 235 - 236 235 237 236 #define get_user(x, ptr) \ 238 237 ({ \
+5
include/asm-sparc64/thread_info.h
··· 68 68 69 69 struct restart_block restart_block; 70 70 71 + struct pt_regs *kern_una_regs; 72 + unsigned int kern_una_insn; 73 + 71 74 unsigned long fpregs[0] __attribute__ ((aligned(64))); 72 75 }; 73 76 ··· 106 103 #define TI_PCR 0x00000490 107 104 #define TI_CEE_STUFF 0x00000498 108 105 #define TI_RESTART_BLOCK 0x000004a0 106 + #define TI_KUNA_REGS 0x000004c8 107 + #define TI_KUNA_INSN 0x000004d0 109 108 #define TI_FPREGS 0x00000500 110 109 111 110 /* We embed this in the uppermost byte of thread_info->flags */
+4 -4
include/linux/fs.h
··· 993 993 int (*rename) (struct inode *, struct dentry *, 994 994 struct inode *, struct dentry *); 995 995 int (*readlink) (struct dentry *, char __user *,int); 996 - int (*follow_link) (struct dentry *, struct nameidata *); 997 - void (*put_link) (struct dentry *, struct nameidata *); 996 + void * (*follow_link) (struct dentry *, struct nameidata *); 997 + void (*put_link) (struct dentry *, struct nameidata *, void *); 998 998 void (*truncate) (struct inode *); 999 999 int (*permission) (struct inode *, int, struct nameidata *); 1000 1000 int (*setattr) (struct dentry *, struct iattr *); ··· 1602 1602 extern int vfs_readlink(struct dentry *, char __user *, int, const char *); 1603 1603 extern int vfs_follow_link(struct nameidata *, const char *); 1604 1604 extern int page_readlink(struct dentry *, char __user *, int); 1605 - extern int page_follow_link_light(struct dentry *, struct nameidata *); 1606 - extern void page_put_link(struct dentry *, struct nameidata *); 1605 + extern void *page_follow_link_light(struct dentry *, struct nameidata *); 1606 + extern void page_put_link(struct dentry *, struct nameidata *, void *); 1607 1607 extern int page_symlink(struct inode *inode, const char *symname, int len); 1608 1608 extern struct inode_operations page_symlink_inode_operations; 1609 1609 extern int generic_readlink(struct dentry *, char __user *, int);
+16 -2
include/net/ax25.h
··· 139 139 #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ 140 140 141 141 typedef struct ax25_uid_assoc { 142 - struct ax25_uid_assoc *next; 142 + struct hlist_node uid_node; 143 + atomic_t refcount; 143 144 uid_t uid; 144 145 ax25_address call; 145 146 } ax25_uid_assoc; 147 + 148 + #define ax25_uid_for_each(__ax25, node, list) \ 149 + hlist_for_each_entry(__ax25, node, list, uid_node) 150 + 151 + #define ax25_uid_hold(ax25) \ 152 + atomic_inc(&((ax25)->refcount)) 153 + 154 + static inline void ax25_uid_put(ax25_uid_assoc *assoc) 155 + { 156 + if (atomic_dec_and_test(&assoc->refcount)) { 157 + kfree(assoc); 158 + } 159 + } 146 160 147 161 typedef struct { 148 162 ax25_address calls[AX25_MAX_DIGIS]; ··· 390 376 391 377 /* ax25_uid.c */ 392 378 extern int ax25_uid_policy; 393 - extern ax25_address *ax25_findbyuid(uid_t); 379 + extern ax25_uid_assoc *ax25_findbyuid(uid_t); 394 380 extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); 395 381 extern struct file_operations ax25_uid_fops; 396 382 extern void ax25_uid_free(void);
+5
include/net/sock.h
··· 384 384 SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ 385 385 }; 386 386 387 + static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) 388 + { 389 + nsk->sk_flags = osk->sk_flags; 390 + } 391 + 387 392 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) 388 393 { 389 394 __set_bit(flag, &sk->sk_flags);
+2
include/sound/core.h
··· 360 360 361 361 /* isadma.c */ 362 362 363 + #ifdef CONFIG_ISA_DMA_API 363 364 #define DMA_MODE_NO_ENABLE 0x0100 364 365 365 366 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); 366 367 void snd_dma_disable(unsigned long dma); 367 368 unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); 369 + #endif 368 370 369 371 /* misc.c */ 370 372
+17
kernel/cpuset.c
··· 636 636 return; 637 637 638 638 /* 639 + * Hack to avoid 2.6.13 partial node dynamic sched domain bug. 640 + * Require the 'cpu_exclusive' cpuset to include all (or none) 641 + * of the CPUs on each node, or return w/o changing sched domains. 642 + * Remove this hack when dynamic sched domains fixed. 643 + */ 644 + { 645 + int i, j; 646 + 647 + for_each_cpu_mask(i, cur->cpus_allowed) { 648 + for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { 649 + if (!cpu_isset(j, cur->cpus_allowed)) 650 + return; 651 + } 652 + } 653 + } 654 + 655 + /* 639 656 * Get all cpus from parent's cpus_allowed not part of exclusive 640 657 * children 641 658 */
+1 -1
kernel/timer.c
··· 1023 1023 parent = me->group_leader->real_parent; 1024 1024 for (;;) { 1025 1025 pid = parent->tgid; 1026 - #ifdef CONFIG_SMP 1026 + #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) 1027 1027 { 1028 1028 struct task_struct *old = parent; 1029 1029
+4 -1
lib/vsprintf.c
··· 269 269 int qualifier; /* 'h', 'l', or 'L' for integer fields */ 270 270 /* 'z' support added 23/7/1999 S.H. */ 271 271 /* 'z' changed to 'Z' --davidm 1/25/99 */ 272 + /* 't' added for ptrdiff_t */ 272 273 273 274 /* Reject out-of-range values early */ 274 275 if (unlikely((int) size < 0)) { ··· 340 339 /* get the conversion qualifier */ 341 340 qualifier = -1; 342 341 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 343 - *fmt =='Z' || *fmt == 'z') { 342 + *fmt =='Z' || *fmt == 'z' || *fmt == 't') { 344 343 qualifier = *fmt; 345 344 ++fmt; 346 345 if (qualifier == 'l' && *fmt == 'l') { ··· 468 467 num = (signed long) num; 469 468 } else if (qualifier == 'Z' || qualifier == 'z') { 470 469 num = va_arg(args, size_t); 470 + } else if (qualifier == 't') { 471 + num = va_arg(args, ptrdiff_t); 471 472 } else if (qualifier == 'h') { 472 473 num = (unsigned short) va_arg(args, int); 473 474 if (flags & SIGN)
+6 -11
mm/shmem.c
··· 1773 1773 return 0; 1774 1774 } 1775 1775 1776 - static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) 1776 + static void *shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) 1777 1777 { 1778 1778 nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode)); 1779 - return 0; 1779 + return NULL; 1780 1780 } 1781 1781 1782 - static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd) 1782 + static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) 1783 1783 { 1784 1784 struct page *page = NULL; 1785 1785 int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); 1786 1786 nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); 1787 - return 0; 1787 + return page; 1788 1788 } 1789 1789 1790 - static void shmem_put_link(struct dentry *dentry, struct nameidata *nd) 1790 + static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 1791 1791 { 1792 1792 if (!IS_ERR(nd_get_link(nd))) { 1793 - struct page *page; 1794 - 1795 - page = find_get_page(dentry->d_inode->i_mapping, 0); 1796 - if (!page) 1797 - BUG(); 1793 + struct page *page = cookie; 1798 1794 kunmap(page); 1799 1795 mark_page_accessed(page); 1800 - page_cache_release(page); 1801 1796 page_cache_release(page); 1802 1797 } 1803 1798 }
+13 -14
net/ax25/af_ax25.c
··· 875 875 sk->sk_sndbuf = osk->sk_sndbuf; 876 876 sk->sk_state = TCP_ESTABLISHED; 877 877 sk->sk_sleep = osk->sk_sleep; 878 - 879 - if (sock_flag(osk, SOCK_DBG)) 880 - sock_set_flag(sk, SOCK_DBG); 881 - 882 - if (sock_flag(osk, SOCK_ZAPPED)) 883 - sock_set_flag(sk, SOCK_ZAPPED); 878 + sock_copy_flags(sk, osk); 884 879 885 880 oax25 = ax25_sk(osk); 886 881 ··· 1002 1007 struct sock *sk = sock->sk; 1003 1008 struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; 1004 1009 ax25_dev *ax25_dev = NULL; 1005 - ax25_address *call; 1010 + ax25_uid_assoc *user; 1011 + ax25_address call; 1006 1012 ax25_cb *ax25; 1007 1013 int err = 0; 1008 1014 ··· 1022 1026 if (addr->fsa_ax25.sax25_family != AF_AX25) 1023 1027 return -EINVAL; 1024 1028 1025 - call = ax25_findbyuid(current->euid); 1026 - if (call == NULL && ax25_uid_policy && !capable(CAP_NET_ADMIN)) { 1027 - return -EACCES; 1029 + user = ax25_findbyuid(current->euid); 1030 + if (user) { 1031 + call = user->call; 1032 + ax25_uid_put(user); 1033 + } else { 1034 + if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) 1035 + return -EACCES; 1036 + 1037 + call = addr->fsa_ax25.sax25_call; 1028 1038 } 1029 1039 1030 1040 lock_sock(sk); ··· 1041 1039 goto out; 1042 1040 } 1043 1041 1044 - if (call == NULL) 1045 - ax25->source_addr = addr->fsa_ax25.sax25_call; 1046 - else 1047 - ax25->source_addr = *call; 1042 + ax25->source_addr = call; 1048 1043 1049 1044 /* 1050 1045 * User already set interface with SO_BINDTODEVICE
+7 -5
net/ax25/ax25_route.c
··· 422 422 */ 423 423 int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) 424 424 { 425 + ax25_uid_assoc *user; 425 426 ax25_route *ax25_rt; 426 - ax25_address *call; 427 427 int err; 428 428 429 429 if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL) ··· 434 434 goto put; 435 435 } 436 436 437 - if ((call = ax25_findbyuid(current->euid)) == NULL) { 437 + user = ax25_findbyuid(current->euid); 438 + if (user) { 439 + ax25->source_addr = user->call; 440 + ax25_uid_put(user); 441 + } else { 438 442 if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { 439 443 err = -EPERM; 440 444 goto put; 441 445 } 442 - call = (ax25_address *)ax25->ax25_dev->dev->dev_addr; 446 + ax25->source_addr = *(ax25_address *)ax25->ax25_dev->dev->dev_addr; 443 447 } 444 - 445 - ax25->source_addr = *call; 446 448 447 449 if (ax25_rt->digipeat != NULL) { 448 450 if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
+36 -47
net/ax25/ax25_uid.c
··· 28 28 #include <linux/fcntl.h> 29 29 #include <linux/mm.h> 30 30 #include <linux/interrupt.h> 31 + #include <linux/list.h> 31 32 #include <linux/notifier.h> 32 33 #include <linux/proc_fs.h> 33 34 #include <linux/seq_file.h> ··· 42 41 * Callsign/UID mapper. This is in kernel space for security on multi-amateur machines. 43 42 */ 44 43 45 - static ax25_uid_assoc *ax25_uid_list; 44 + HLIST_HEAD(ax25_uid_list); 46 45 static DEFINE_RWLOCK(ax25_uid_lock); 47 46 48 47 int ax25_uid_policy = 0; 49 48 50 - ax25_address *ax25_findbyuid(uid_t uid) 49 + ax25_uid_assoc *ax25_findbyuid(uid_t uid) 51 50 { 52 - ax25_uid_assoc *ax25_uid; 53 - ax25_address *res = NULL; 51 + ax25_uid_assoc *ax25_uid, *res = NULL; 52 + struct hlist_node *node; 54 53 55 54 read_lock(&ax25_uid_lock); 56 - for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { 55 + ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { 57 56 if (ax25_uid->uid == uid) { 58 - res = &ax25_uid->call; 57 + ax25_uid_hold(ax25_uid); 58 + res = ax25_uid; 59 59 break; 60 60 } 61 61 } 62 62 read_unlock(&ax25_uid_lock); 63 63 64 - return NULL; 64 + return res; 65 65 } 66 66 67 67 int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) 68 68 { 69 - ax25_uid_assoc *s, *ax25_uid; 69 + ax25_uid_assoc *ax25_uid; 70 + struct hlist_node *node; 71 + ax25_uid_assoc *user; 70 72 unsigned long res; 71 73 72 74 switch (cmd) { 73 75 case SIOCAX25GETUID: 74 76 res = -ENOENT; 75 77 read_lock(&ax25_uid_lock); 76 - for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { 78 + ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { 77 79 if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) { 78 80 res = ax25_uid->uid; 79 81 break; ··· 89 85 case SIOCAX25ADDUID: 90 86 if (!capable(CAP_NET_ADMIN)) 91 87 return -EPERM; 92 - if (ax25_findbyuid(sax->sax25_uid)) 88 + user = ax25_findbyuid(sax->sax25_uid); 89 + if (user) { 90 + ax25_uid_put(user); 93 91 return -EEXIST; 92 + } 94 93 if (sax->sax25_uid == 0) 95 94 return -EINVAL; 96 95 if ((ax25_uid = kmalloc(sizeof(*ax25_uid), GFP_KERNEL)) == NULL) 97 96 return -ENOMEM; 98 97 98 + atomic_set(&ax25_uid->refcount, 1); 99 99 ax25_uid->uid = sax->sax25_uid; 100 100 ax25_uid->call = sax->sax25_call; 101 101 102 102 write_lock(&ax25_uid_lock); 103 - ax25_uid->next = ax25_uid_list; 104 - ax25_uid_list = ax25_uid; 103 + hlist_add_head(&ax25_uid->uid_node, &ax25_uid_list); 105 104 write_unlock(&ax25_uid_lock); 106 105 107 106 return 0; ··· 113 106 if (!capable(CAP_NET_ADMIN)) 114 107 return -EPERM; 115 108 109 + ax25_uid = NULL; 116 110 write_lock(&ax25_uid_lock); 117 - for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { 118 - if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) { 111 + ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { 112 + if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) 119 113 break; 120 - } 121 114 } 122 115 if (ax25_uid == NULL) { 123 116 write_unlock(&ax25_uid_lock); 124 117 return -ENOENT; 125 118 } 126 - if ((s = ax25_uid_list) == ax25_uid) { 127 - ax25_uid_list = s->next; 128 - write_unlock(&ax25_uid_lock); 129 - kfree(ax25_uid); 130 - return 0; 131 - } 132 - while (s != NULL && s->next != NULL) { 133 - if (s->next == ax25_uid) { 134 - s->next = ax25_uid->next; 135 - write_unlock(&ax25_uid_lock); 136 - kfree(ax25_uid); 137 - return 0; 138 - } 139 - s = s->next; 140 - } 119 + hlist_del_init(&ax25_uid->uid_node); 120 + ax25_uid_put(ax25_uid); 141 121 write_unlock(&ax25_uid_lock); 142 122 143 - return -ENOENT; 123 + return 0; 144 124 145 125 default: 146 126 return -EINVAL; ··· 141 147 static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) 142 148 { 143 149 struct ax25_uid_assoc *pt; 144 - int i = 1; 150 + struct hlist_node *node; 151 + int i = 0; 145 152 146 153 read_lock(&ax25_uid_lock); 147 - if (*pos == 0) 148 - return SEQ_START_TOKEN; 149 - 150 - for (pt = ax25_uid_list; pt != NULL; pt = pt->next) { 154 + ax25_uid_for_each(pt, node, &ax25_uid_list) { 151 155 if (i == *pos) 152 156 return pt; 153 157 ++i; ··· 156 164 static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) 157 165 { 158 166 ++*pos; 159 - return (v == SEQ_START_TOKEN) ? ax25_uid_list : 160 - ((struct ax25_uid_assoc *) v)->next; 167 + 168 + return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next, 169 + ax25_uid_assoc, uid_node); 161 170 } 162 171 163 172 static void ax25_uid_seq_stop(struct seq_file *seq, void *v) ··· 172 179 seq_printf(seq, "Policy: %d\n", ax25_uid_policy); 173 180 else { 174 181 struct ax25_uid_assoc *pt = v; 175 - 176 182 177 183 seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call)); 178 184 } ··· 205 213 */ 206 214 void __exit ax25_uid_free(void) 207 215 { 208 - ax25_uid_assoc *s, *ax25_uid; 216 + ax25_uid_assoc *ax25_uid; 217 + struct hlist_node *node; 209 218 210 219 write_lock(&ax25_uid_lock); 211 - ax25_uid = ax25_uid_list; 212 - while (ax25_uid != NULL) { 213 - s = ax25_uid; 214 - ax25_uid = ax25_uid->next; 215 - 216 - kfree(s); 220 + ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { 221 + hlist_del_init(&ax25_uid->uid_node); 222 + ax25_uid_put(ax25_uid); 217 223 } 218 - ax25_uid_list = NULL; 219 224 write_unlock(&ax25_uid_lock); 220 225 }
+7 -4
net/ipv4/inetpeer.c
··· 450 450 /* Trigger the timer after inet_peer_gc_mintime .. inet_peer_gc_maxtime 451 451 * interval depending on the total number of entries (more entries, 452 452 * less interval). */ 453 - peer_periodic_timer.expires = jiffies 454 - + inet_peer_gc_maxtime 455 - - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ * 456 - peer_total / inet_peer_threshold * HZ; 453 + if (peer_total >= inet_peer_threshold) 454 + peer_periodic_timer.expires = jiffies + inet_peer_gc_mintime; 455 + else 456 + peer_periodic_timer.expires = jiffies 457 + + inet_peer_gc_maxtime 458 + - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ * 459 + peer_total / inet_peer_threshold * HZ; 457 460 add_timer(&peer_periodic_timer); 458 461 } 459 462
+7
net/ipv4/netfilter/ip_queue.c
··· 214 214 break; 215 215 216 216 case IPQ_COPY_PACKET: 217 + if (entry->skb->ip_summed == CHECKSUM_HW && 218 + (*errp = skb_checksum_help(entry->skb, 219 + entry->info->outdev == NULL))) { 220 + read_unlock_bh(&queue_lock); 221 + return NULL; 222 + } 217 223 if (copy_range == 0 || copy_range > entry->skb->len) 218 224 data_len = entry->skb->len; 219 225 else ··· 391 385 if (!skb_ip_make_writable(&e->skb, v->data_len)) 392 386 return -ENOMEM; 393 387 memcpy(e->skb->data, v->payload, v->data_len); 388 + e->skb->ip_summed = CHECKSUM_NONE; 394 389 e->skb->nfcache |= NFC_ALTERED; 395 390 396 391 /*
+9 -8
net/ipv4/netfilter/ipt_ECN.c
··· 61 61 if (!tcph) 62 62 return 0; 63 63 64 - if (!(einfo->operation & IPT_ECN_OP_SET_ECE 65 - || tcph->ece == einfo->proto.tcp.ece) 66 - && (!(einfo->operation & IPT_ECN_OP_SET_CWR 67 - || tcph->cwr == einfo->proto.tcp.cwr))) 64 + if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) || 65 + tcph->ece == einfo->proto.tcp.ece) && 66 + ((!(einfo->operation & IPT_ECN_OP_SET_CWR) || 67 + tcph->cwr == einfo->proto.tcp.cwr))) 68 68 return 1; 69 69 70 70 if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph))) 71 71 return 0; 72 72 tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4; 73 + 74 + if ((*pskb)->ip_summed == CHECKSUM_HW && 75 + skb_checksum_help(*pskb, inward)) 76 + return 0; 73 77 74 78 diffs[0] = ((u_int16_t *)tcph)[6]; 75 79 if (einfo->operation & IPT_ECN_OP_SET_ECE) ··· 83 79 diffs[1] = ((u_int16_t *)tcph)[6]; 84 80 diffs[0] = diffs[0] ^ 0xFFFF; 85 81 86 - if ((*pskb)->ip_summed != CHECKSUM_HW) 82 + if ((*pskb)->ip_summed != CHECKSUM_UNNECESSARY) 87 83 tcph->check = csum_fold(csum_partial((char *)diffs, 88 84 sizeof(diffs), 89 85 tcph->check^0xFFFF)); 90 - else 91 - if (skb_checksum_help(*pskb, inward)) 92 - return 0; 93 86 (*pskb)->nfcache |= NFC_ALTERED; 94 87 return 1; 95 88 }
+4 -3
net/ipv4/netfilter/ipt_TCPMSS.c
··· 61 61 if (!skb_ip_make_writable(pskb, (*pskb)->len)) 62 62 return NF_DROP; 63 63 64 + if ((*pskb)->ip_summed == CHECKSUM_HW && 65 + skb_checksum_help(*pskb, out == NULL)) 66 + return NF_DROP; 67 + 64 68 iph = (*pskb)->nh.iph; 65 69 tcplen = (*pskb)->len - iph->ihl*4; 66 70 ··· 190 186 newmss); 191 187 192 188 retmodified: 193 - /* We never hw checksum SYN packets. */ 194 - BUG_ON((*pskb)->ip_summed == CHECKSUM_HW); 195 - 196 189 (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED; 197 190 return IPT_CONTINUE; 198 191 }
+1 -1
net/ipv4/tcp.c
··· 584 584 sk_charge_skb(sk, skb); 585 585 if (!sk->sk_send_head) 586 586 sk->sk_send_head = skb; 587 - else if (tp->nonagle&TCP_NAGLE_PUSH) 587 + if (tp->nonagle & TCP_NAGLE_PUSH) 588 588 tp->nonagle &= ~TCP_NAGLE_PUSH; 589 589 } 590 590
+7 -2
net/ipv4/tcp_ipv4.c
··· 242 242 tcp_port_rover = rover; 243 243 spin_unlock(&tcp_portalloc_lock); 244 244 245 - /* Exhausted local port range during search? */ 245 + /* Exhausted local port range during search? It is not 246 + * possible for us to be holding one of the bind hash 247 + * locks if this test triggers, because if 'remaining' 248 + * drops to zero, we broke out of the do/while loop at 249 + * the top level, not from the 'break;' statement. 250 + */ 246 251 ret = 1; 247 - if (remaining <= 0) 252 + if (unlikely(remaining <= 0)) 248 253 goto fail; 249 254 250 255 /* OK, here is the one we will use. HEAD is
-4
net/ipv4/tcp_output.c
··· 925 925 926 926 limit = min(send_win, cong_win); 927 927 928 - /* If sk_send_head can be sent fully now, just do it. */ 929 - if (skb->len <= limit) 930 - return 0; 931 - 932 928 if (sysctl_tcp_tso_win_divisor) { 933 929 u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); 934 930
+7
net/ipv6/netfilter/ip6_queue.c
··· 211 211 break; 212 212 213 213 case IPQ_COPY_PACKET: 214 + if (entry->skb->ip_summed == CHECKSUM_HW && 215 + (*errp = skb_checksum_help(entry->skb, 216 + entry->info->outdev == NULL))) { 217 + read_unlock_bh(&queue_lock); 218 + return NULL; 219 + } 214 220 if (copy_range == 0 || copy_range > entry->skb->len) 215 221 data_len = entry->skb->len; 216 222 else ··· 387 381 if (!skb_ip_make_writable(&e->skb, v->data_len)) 388 382 return -ENOMEM; 389 383 memcpy(e->skb->data, v->payload, v->data_len); 384 + e->skb->ip_summed = CHECKSUM_NONE; 390 385 e->skb->nfcache |= NFC_ALTERED; 391 386 392 387 /*
+7 -2
net/ipv6/tcp_ipv6.c
··· 158 158 tcp_port_rover = rover; 159 159 spin_unlock(&tcp_portalloc_lock); 160 160 161 - /* Exhausted local port range during search? */ 161 + /* Exhausted local port range during search? It is not 162 + * possible for us to be holding one of the bind hash 163 + * locks if this test triggers, because if 'remaining' 164 + * drops to zero, we broke out of the do/while loop at 165 + * the top level, not from the 'break;' statement. 166 + */ 162 167 ret = 1; 163 - if (remaining <= 0) 168 + if (unlikely(remaining <= 0)) 164 169 goto fail; 165 170 166 171 /* OK, here is the one we will use. */
+17 -14
net/netrom/af_netrom.c
··· 459 459 sk->sk_sndbuf = osk->sk_sndbuf; 460 460 sk->sk_state = TCP_ESTABLISHED; 461 461 sk->sk_sleep = osk->sk_sleep; 462 - 463 - if (sock_flag(osk, SOCK_ZAPPED)) 464 - sock_set_flag(sk, SOCK_ZAPPED); 465 - 466 - if (sock_flag(osk, SOCK_DBG)) 467 - sock_set_flag(sk, SOCK_DBG); 462 + sock_copy_flags(sk, osk); 468 463 469 464 skb_queue_head_init(&nr->ack_queue); 470 465 skb_queue_head_init(&nr->reseq_queue); ··· 536 541 struct nr_sock *nr = nr_sk(sk); 537 542 struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; 538 543 struct net_device *dev; 539 - ax25_address *user, *source; 544 + ax25_uid_assoc *user; 545 + ax25_address *source; 540 546 541 547 lock_sock(sk); 542 548 if (!sock_flag(sk, SOCK_ZAPPED)) { ··· 576 580 } else { 577 581 source = &addr->fsa_ax25.sax25_call; 578 582 579 - if ((user = ax25_findbyuid(current->euid)) == NULL) { 583 + user = ax25_findbyuid(current->euid); 584 + if (user) { 585 + nr->user_addr = user->call; 586 + ax25_uid_put(user); 587 + } else { 580 588 if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { 581 589 release_sock(sk); 582 590 dev_put(dev); 583 591 return -EPERM; 584 592 } 585 - user = source; 593 + nr->user_addr = *source; 586 594 } 587 595 588 - nr->user_addr = *user; 589 596 nr->source_addr = *source; 590 597 } 591 598 ··· 608 609 struct sock *sk = sock->sk; 609 610 struct nr_sock *nr = nr_sk(sk); 610 611 struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr; 611 - ax25_address *user, *source = NULL; 612 + ax25_address *source = NULL; 613 + ax25_uid_assoc *user; 612 614 struct net_device *dev; 613 615 614 616 lock_sock(sk); ··· 650 650 } 651 651 source = (ax25_address *)dev->dev_addr; 652 652 653 - if ((user = ax25_findbyuid(current->euid)) == NULL) { 653 + user = ax25_findbyuid(current->euid); 654 + if (user) { 655 + nr->user_addr = user->call; 656 + ax25_uid_put(user); 657 + } else { 654 658 if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) { 655 659 dev_put(dev); 656 660 release_sock(sk); 657 661 return -EPERM; 658 662 } 659 - user = source; 663 + nr->user_addr = *source; 660 664 } 661 665 662 - nr->user_addr = *user; 663 666 nr->source_addr = *source; 664 667 nr->device = dev; 665 668
+14 -13
net/rose/af_rose.c
··· 556 556 sk->sk_sndbuf = osk->sk_sndbuf; 557 557 sk->sk_state = TCP_ESTABLISHED; 558 558 sk->sk_sleep = osk->sk_sleep; 559 - 560 - if (sock_flag(osk, SOCK_ZAPPED)) 561 - sock_set_flag(sk, SOCK_ZAPPED); 562 - 563 - if (sock_flag(osk, SOCK_DBG)) 564 - sock_set_flag(sk, SOCK_DBG); 559 + sock_copy_flags(sk, osk); 565 560 566 561 init_timer(&rose->timer); 567 562 init_timer(&rose->idletimer); ··· 626 631 struct rose_sock *rose = rose_sk(sk); 627 632 struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; 628 633 struct net_device *dev; 629 - ax25_address *user, *source; 634 + ax25_address *source; 635 + ax25_uid_assoc *user; 630 636 int n; 631 637 632 638 if (!sock_flag(sk, SOCK_ZAPPED)) ··· 652 656 653 657 source = &addr->srose_call; 654 658 655 - if ((user = ax25_findbyuid(current->euid)) == NULL) { 659 + user = ax25_findbyuid(current->euid); 660 + if (user) { 661 + rose->source_call = user->call; 662 + ax25_uid_put(user); 663 + } else { 656 664 if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) 657 665 return -EACCES; 658 - user = source; 666 + rose->source_call = *source; 659 667 } 660 668 661 669 rose->source_addr = addr->srose_addr; 662 - rose->source_call = *user; 663 670 rose->device = dev; 664 671 rose->source_ndigis = addr->srose_ndigis; 665 672 ··· 689 690 struct rose_sock *rose = rose_sk(sk); 690 691 struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; 691 692 unsigned char cause, diagnostic; 692 - ax25_address *user; 693 693 struct net_device *dev; 694 + ax25_uid_assoc *user; 694 695 int n; 695 696 696 697 if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { ··· 740 741 if ((dev = rose_dev_first()) == NULL) 741 742 return -ENETUNREACH; 742 743 743 - if ((user = ax25_findbyuid(current->euid)) == NULL) 744 + user = ax25_findbyuid(current->euid); 745 + if (!user) 744 746 return -EINVAL; 745 747 746 748 memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN); 747 - rose->source_call = *user; 749 + rose->source_call = user->call; 748 750 rose->device = dev; 751 + ax25_uid_put(user); 749 752 750 753 rose_insert_socket(sk); /* Finish the bind */ 751 754 }
+4 -2
net/rose/rose_route.c
··· 994 994 * 1. The frame isn't for us, 995 995 * 2. It isn't "owned" by any existing route. 996 996 */ 997 - if (frametype != ROSE_CALL_REQUEST) /* XXX */ 998 - return 0; 997 + if (frametype != ROSE_CALL_REQUEST) { /* XXX */ 998 + res = 0; 999 + goto out; 1000 + } 999 1001 1000 1002 len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2; 1001 1003 len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2;
+1
net/sched/sch_generic.c
··· 438 438 if (!ops->init || ops->init(sch, NULL) == 0) 439 439 return sch; 440 440 441 + qdisc_destroy(sch); 441 442 errout: 442 443 return NULL; 443 444 }
+1
net/sctp/proc.c
··· 57 57 SNMP_MIB_ITEM("SctpReasmUsrMsgs", SCTP_MIB_REASMUSRMSGS), 58 58 SNMP_MIB_ITEM("SctpOutSCTPPacks", SCTP_MIB_OUTSCTPPACKS), 59 59 SNMP_MIB_ITEM("SctpInSCTPPacks", SCTP_MIB_INSCTPPACKS), 60 + SNMP_MIB_SENTINEL 60 61 }; 61 62 62 63 /* Return the current value of a particular entry in the mib by adding its
-2
net/sunrpc/auth_gss/gss_krb5_crypto.c
··· 185 185 sg->page = body->pages[i]; 186 186 sg->offset = offset; 187 187 sg->length = thislen; 188 - kmap(sg->page); /* XXX kmap_atomic? */ 189 188 crypto_digest_update(tfm, sg, 1); 190 - kunmap(sg->page); 191 189 len -= thislen; 192 190 i++; 193 191 offset = 0;
+7 -2
scripts/mod/modpost.c
··· 359 359 /* ignore __this_module, it will be resolved shortly */ 360 360 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) 361 361 break; 362 - #ifdef STT_REGISTER 362 + /* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ 363 + #if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) 364 + /* add compatibility with older glibc */ 365 + #ifndef STT_SPARC_REGISTER 366 + #define STT_SPARC_REGISTER STT_REGISTER 367 + #endif 363 368 if (info->hdr->e_machine == EM_SPARC || 364 369 info->hdr->e_machine == EM_SPARCV9) { 365 370 /* Ignore register directives. */ 366 - if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER) 371 + if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) 367 372 break; 368 373 } 369 374 #endif
+1 -1
sound/Kconfig
··· 77 77 endmenu 78 78 79 79 menu "Open Sound System" 80 - depends on SOUND!=n && (BROKEN || (!SPARC32 && !SPARC64)) 80 + depends on SOUND!=n 81 81 82 82 config SOUND_PRIME 83 83 tristate "Open Sound System (DEPRECATED)"
+1 -1
sound/core/Makefile
··· 5 5 6 6 snd-objs := sound.o init.o memory.o info.o control.o misc.o \ 7 7 device.o wrappers.o 8 - ifeq ($(CONFIG_ISA),y) 8 + ifeq ($(CONFIG_ISA_DMA_API),y) 9 9 snd-objs += isadma.o 10 10 endif 11 11 ifeq ($(CONFIG_SND_OSSEMUL),y)
+1 -1
sound/core/sound.c
··· 432 432 EXPORT_SYMBOL(snd_device_register); 433 433 EXPORT_SYMBOL(snd_device_free); 434 434 /* isadma.c */ 435 - #ifdef CONFIG_ISA 435 + #ifdef CONFIG_ISA_DMA_API 436 436 EXPORT_SYMBOL(snd_dma_program); 437 437 EXPORT_SYMBOL(snd_dma_disable); 438 438 EXPORT_SYMBOL(snd_dma_pointer);
+1 -1
sound/isa/Kconfig
··· 1 1 # ALSA ISA drivers 2 2 3 3 menu "ISA devices" 4 - depends on SND!=n && ISA 4 + depends on SND!=n && ISA && ISA_DMA_API 5 5 6 6 config SND_AD1848_LIB 7 7 tristate
+8 -8
sound/oss/Kconfig
··· 6 6 # Prompt user for primary drivers. 7 7 config SOUND_BT878 8 8 tristate "BT878 audio dma" 9 - depends on SOUND_PRIME 9 + depends on SOUND_PRIME && PCI 10 10 ---help--- 11 11 Audio DMA support for bt878 based grabber boards. As you might have 12 12 already noticed, bt878 is listed with two functions in /proc/pci. ··· 80 80 81 81 config MIDI_EMU10K1 82 82 bool "Creative SBLive! MIDI (EXPERIMENTAL)" 83 - depends on SOUND_EMU10K1 && EXPERIMENTAL 83 + depends on SOUND_EMU10K1 && EXPERIMENTAL && ISA_DMA_API 84 84 help 85 85 Say Y if you want to be able to use the OSS /dev/sequencer 86 86 interface. This code is still experimental. 87 87 88 88 config SOUND_FUSION 89 89 tristate "Crystal SoundFusion (CS4280/461x)" 90 - depends on SOUND_PRIME 90 + depends on SOUND_PRIME && PCI 91 91 help 92 92 This module drives the Crystal SoundFusion devices (CS4280/46xx 93 93 series) when wired as native sound drivers with AC97 codecs. If ··· 95 95 96 96 config SOUND_CS4281 97 97 tristate "Crystal Sound CS4281" 98 - depends on SOUND_PRIME 98 + depends on SOUND_PRIME && PCI 99 99 help 100 100 Picture and feature list at 101 101 <http://www.pcbroker.com/crystal4281.html>. ··· 179 179 180 180 config SOUND_SONICVIBES 181 181 tristate "S3 SonicVibes" 182 - depends on SOUND_PRIME 182 + depends on SOUND_PRIME && PCI 183 183 help 184 184 Say Y or M if you have a PCI sound card utilizing the S3 185 185 SonicVibes chipset. To find out if your sound card uses a ··· 226 226 227 227 config SOUND_TRIDENT 228 228 tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" 229 - depends on SOUND_PRIME 229 + depends on SOUND_PRIME && PCI 230 230 ---help--- 231 231 Say Y or M if you have a PCI sound card utilizing the Trident 232 232 4DWave-DX/NX chipset or your mother board chipset has SiS 7018 ··· 503 503 504 504 config MIDI_VIA82CXXX 505 505 bool "VIA 82C686 MIDI" 506 - depends on SOUND_VIA82CXXX 506 + depends on SOUND_VIA82CXXX && ISA_DMA_API 507 507 help 508 508 Answer Y to use the MIDI interface of the Via686. You may need to 509 509 enable this in the BIOS before it will work. This is for connection ··· 512 512 513 513 config SOUND_OSS 514 514 tristate "OSS sound modules" 515 - depends on SOUND_PRIME 515 + depends on SOUND_PRIME && ISA_DMA_API 516 516 help 517 517 OSS is the Open Sound System suite of sound card drivers. They make 518 518 sound programming easier since they provide a common API. Say Y or
+1 -1
sound/oss/Makefile
··· 80 80 obj-$(CONFIG_SOUND_IT8172) += ite8172.o ac97_codec.o 81 81 obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o 82 82 83 - obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o 83 + obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o 84 84 obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o 85 85 86 86 ifeq ($(CONFIG_MIDI_EMU10K1),y)
+2 -2
sound/oss/i810_audio.c
··· 3430 3430 release_mem_region(card->iobase_mmio_phys, 256); 3431 3431 } 3432 3432 out_pio: 3433 - release_region(card->iobase, 64); 3434 - out_region2: 3435 3433 release_region(card->ac97base, 256); 3434 + out_region2: 3435 + release_region(card->iobase, 64); 3436 3436 out_region1: 3437 3437 pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH, 3438 3438 card->channel, card->chandma);
-4
sound/oss/vidc.h
··· 10 10 * VIDC sound function prototypes 11 11 */ 12 12 13 - /* vidc.c */ 14 - 15 - extern int vidc_busy; 16 - 17 13 /* vidc_fill.S */ 18 14 19 15 /*
+1 -1
sound/pci/Kconfig
··· 314 314 315 315 config SND_ALS4000 316 316 tristate "Avance Logic ALS4000" 317 - depends on SND 317 + depends on SND && ISA_DMA_API 318 318 select SND_OPL3_LIB 319 319 select SND_MPU401_UART 320 320 select SND_PCM