···614614/*615615 * Reference prototype:616616 *617617+ * void __kernel_memory_barrier(void)618618+ *619619+ * Input:620620+ *621621+ * lr = return address622622+ *623623+ * Output:624624+ *625625+ * none626626+ *627627+ * Clobbered:628628+ *629629+ * the Z flag might be lost630630+ *631631+ * Definition and user space usage example:632632+ *633633+ * typedef void (__kernel_dmb_t)(void);634634+ * #define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0)635635+ *636636+ * Apply any needed memory barrier to preserve consistency with data modified637637+ * manually and __kuser_cmpxchg usage.638638+ *639639+ * This could be used as follows:640640+ *641641+ * #define __kernel_dmb() \642642+ * asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \643643+ * : : : "lr","cc" )644644+ */645645+646646+__kuser_memory_barrier: @ 0xffff0fa0647647+648648+#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP)649649+ mcr p15, 0, r0, c7, c10, 5 @ dmb650650+#endif651651+ mov pc, lr652652+653653+ .align 5654654+655655+/*656656+ * Reference prototype:657657+ *617658 * int __kernel_cmpxchg(int oldval, int newval, int *ptr)618659 *619660 * Input:···682641 * Return zero if *ptr was changed or non-zero if no exchange happened.683642 * The C flag is also set if *ptr was changed to allow for assembly684643 * optimization in the calling code.644644+ *645645+ * Note: this routine already includes memory barriers as needed.685646 *686647 * For example, a user space atomic_add implementation could look like this:687648 *···741698742699#else743700701701+#ifdef CONFIG_SMP702702+ mcr p15, 0, r0, c7, c10, 5 @ dmb703703+#endif744704 ldrex r3, [r2]745705 subs r3, r3, r0746706 strexeq r3, r1, [r2]747707 rsbs r0, r3, #0708708+#ifdef CONFIG_SMP709709+ mcr p15, 0, r0, c7, c10, 5 @ dmb710710+#endif748711 mov pc, lr749712750713#endif
+2-18
arch/arm/kernel/entry-common.S
···145145#endif146146 enable_irq147147148148- str r4, [sp, #-S_OFF]! @ push fifth arg148148+ stmdb sp!, {r4, r5} @ push fifth and sixth args149149150150 get_thread_info tsk151151 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing···204204 * Special system call wrappers205205 */206206@ r0 = syscall number207207-@ r5 = syscall table207207+@ r8 = syscall table208208 .type sys_syscall, #function209209sys_syscall:210210 eor scno, r0, #__NR_SYSCALL_BASE···254254sys_sigaltstack_wrapper:255255 ldr r2, [sp, #S_OFF + S_SP]256256 b do_sigaltstack257257-258258-sys_futex_wrapper:259259- str r5, [sp, #4] @ push sixth arg260260- b sys_futex261261-262262-sys_arm_fadvise64_64_wrapper:263263- str r5, [sp, #4] @ push r5 to stack264264- b sys_arm_fadvise64_64265265-266266-sys_mbind_wrapper:267267- str r5, [sp, #4]268268- b sys_mbind269269-270270-sys_ipc_wrapper:271271- str r5, [sp, #4] @ push sixth arg272272- b sys_ipc273257274258/*275259 * Note: off_4k (r5) is always units of 4K. If we can't do the requested
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Tue Nov 15 14:36:20 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:26 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5353# CONFIG_IKCONFIG is not set5454# CONFIG_CPUSETS is not set5555CONFIG_INITRAMFS_SOURCE=""5656+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5657# CONFIG_EMBEDDED is not set5758CONFIG_KALLSYMS=y5859# CONFIG_KALLSYMS_ALL is not set···152151CONFIG_FLATMEM=y153152CONFIG_FLAT_NODE_MEM_MAP=y154153# CONFIG_SPARSEMEM_STATIC is not set155155-CONFIG_SPLIT_PTLOCK_CPUS=4096154154+CONFIG_SPLIT_PTLOCK_CPUS=4156155# CONFIG_PPC_64K_PAGES is not set157156CONFIG_SCHED_SMT=y158157CONFIG_PROC_DEVICETREE=y
+5-4
arch/powerpc/configs/g5_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Tue Nov 15 14:39:20 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:30 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5353CONFIG_IKCONFIG_PROC=y5454# CONFIG_CPUSETS is not set5555CONFIG_INITRAMFS_SOURCE=""5656+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5657# CONFIG_EMBEDDED is not set5758CONFIG_KALLSYMS=y5859# CONFIG_KALLSYMS_ALL is not set···163162CONFIG_FLATMEM=y164163CONFIG_FLAT_NODE_MEM_MAP=y165164# CONFIG_SPARSEMEM_STATIC is not set166166-CONFIG_SPLIT_PTLOCK_CPUS=4096165165+CONFIG_SPLIT_PTLOCK_CPUS=4167166# CONFIG_PPC_64K_PAGES is not set168167# CONFIG_SCHED_SMT is not set169168CONFIG_PROC_DEVICETREE=y···12041203CONFIG_USB_SERIAL=m12051204CONFIG_USB_SERIAL_GENERIC=y12061205# CONFIG_USB_SERIAL_AIRPRIME is not set12061206+# CONFIG_USB_SERIAL_ANYDATA is not set12071207CONFIG_USB_SERIAL_BELKIN=m12081208CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m12091209# CONFIG_USB_SERIAL_CP2101 is not set···12351233CONFIG_USB_SERIAL_KLSI=m12361234CONFIG_USB_SERIAL_KOBIL_SCT=m12371235CONFIG_USB_SERIAL_MCT_U232=m12381238-# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set12391236CONFIG_USB_SERIAL_PL2303=m12401237# CONFIG_USB_SERIAL_HP4X is not set12411238CONFIG_USB_SERIAL_SAFE=m
+4-3
arch/powerpc/configs/iseries_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Tue Nov 15 14:38:09 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:32 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5555CONFIG_IKCONFIG_PROC=y5656# CONFIG_CPUSETS is not set5757CONFIG_INITRAMFS_SOURCE=""5858+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5859# CONFIG_EMBEDDED is not set5960CONFIG_KALLSYMS=y6061# CONFIG_KALLSYMS_ALL is not set···145144CONFIG_FLATMEM=y146145CONFIG_FLAT_NODE_MEM_MAP=y147146# CONFIG_SPARSEMEM_STATIC is not set148148-CONFIG_SPLIT_PTLOCK_CPUS=4096147147+CONFIG_SPLIT_PTLOCK_CPUS=4149148# CONFIG_PPC_64K_PAGES is not set150149# CONFIG_SCHED_SMT is not set151150CONFIG_PROC_DEVICETREE=y
+5-5
arch/powerpc/configs/maple_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Tue Nov 15 14:38:58 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:36 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5353CONFIG_IKCONFIG_PROC=y5454# CONFIG_CPUSETS is not set5555CONFIG_INITRAMFS_SOURCE=""5656+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5657# CONFIG_EMBEDDED is not set5758CONFIG_KALLSYMS=y5859CONFIG_KALLSYMS_ALL=y···150149CONFIG_FLATMEM=y151150CONFIG_FLAT_NODE_MEM_MAP=y152151# CONFIG_SPARSEMEM_STATIC is not set153153-CONFIG_SPLIT_PTLOCK_CPUS=4096152152+CONFIG_SPLIT_PTLOCK_CPUS=4154153# CONFIG_PPC_64K_PAGES is not set155154# CONFIG_SCHED_SMT is not set156155CONFIG_PROC_DEVICETREE=y···243242# QoS and/or fair queueing244243#245244# CONFIG_NET_SCHED is not set246246-# CONFIG_NET_CLS_ROUTE is not set247245248246#249247# Network testing···794794# CONFIG_USB_SERIAL_CONSOLE is not set795795CONFIG_USB_SERIAL_GENERIC=y796796# CONFIG_USB_SERIAL_AIRPRIME is not set797797+# CONFIG_USB_SERIAL_ANYDATA is not set797798# CONFIG_USB_SERIAL_BELKIN is not set798799# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set799800# CONFIG_USB_SERIAL_CP2101 is not set···825824# CONFIG_USB_SERIAL_KLSI is not set826825# CONFIG_USB_SERIAL_KOBIL_SCT is not set827826# CONFIG_USB_SERIAL_MCT_U232 is not set828828-# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set829827# CONFIG_USB_SERIAL_PL2303 is not set830828# CONFIG_USB_SERIAL_HP4X is not set831829# CONFIG_USB_SERIAL_SAFE is not set
+4-3
arch/powerpc/configs/ppc64_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Fri Nov 18 16:23:24 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:38 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5454CONFIG_IKCONFIG_PROC=y5555CONFIG_CPUSETS=y5656CONFIG_INITRAMFS_SOURCE=""5757+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5758# CONFIG_EMBEDDED is not set5859CONFIG_KALLSYMS=y5960CONFIG_KALLSYMS_ALL=y···177176# CONFIG_SPARSEMEM_STATIC is not set178177CONFIG_SPARSEMEM_EXTREME=y179178# CONFIG_MEMORY_HOTPLUG is not set180180-CONFIG_SPLIT_PTLOCK_CPUS=4096179179+CONFIG_SPLIT_PTLOCK_CPUS=4181180# CONFIG_PPC_64K_PAGES is not set182181# CONFIG_SCHED_SMT is not set183182CONFIG_PROC_DEVICETREE=y
+4-3
arch/powerpc/configs/pseries_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.15-rc144-# Tue Nov 15 14:36:55 200533+# Linux kernel version: 2.6.15-rc544+# Tue Dec 20 15:59:40 200555#66CONFIG_PPC64=y77CONFIG_64BIT=y···5555CONFIG_IKCONFIG_PROC=y5656CONFIG_CPUSETS=y5757CONFIG_INITRAMFS_SOURCE=""5858+CONFIG_CC_OPTIMIZE_FOR_SIZE=y5859# CONFIG_EMBEDDED is not set5960CONFIG_KALLSYMS=y6061CONFIG_KALLSYMS_ALL=y···164163# CONFIG_SPARSEMEM_STATIC is not set165164CONFIG_SPARSEMEM_EXTREME=y166165# CONFIG_MEMORY_HOTPLUG is not set167167-CONFIG_SPLIT_PTLOCK_CPUS=4096166166+CONFIG_SPLIT_PTLOCK_CPUS=4168167CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y169168# CONFIG_PPC_64K_PAGES is not set170169CONFIG_SCHED_SMT=y
···5555 depends on SMP5656 default "32"57575858+config SPARC5959+ bool6060+ default y6161+5862# Identify this as a Sparc32 build5963config SPARC326064 bool
+1-1
arch/sparc/kernel/sys_sunos.c
···894894 ret = ARG_MAX;895895 break;896896 case _SC_CHILD_MAX:897897- ret = CHILD_MAX;897897+ ret = -1; /* no limit */898898 break;899899 case _SC_CLK_TCK:900900 ret = HZ;
···854854 ret = ARG_MAX;855855 break;856856 case _SC_CHILD_MAX:857857- ret = CHILD_MAX;857857+ ret = -1; /* no limit */858858 break;859859 case _SC_CLK_TCK:860860 ret = HZ;
···353353{354354 switch (id) {355355 case SOLARIS_CONFIG_NGROUPS: return NGROUPS_MAX;356356- case SOLARIS_CONFIG_CHILD_MAX: return CHILD_MAX;356356+ case SOLARIS_CONFIG_CHILD_MAX: return -1; /* no limit */357357 case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX;358358 case SOLARIS_CONFIG_POSIX_VER: return 199309;359359 case SOLARIS_CONFIG_PAGESIZE: return PAGE_SIZE;
+12-10
arch/um/os-Linux/start_up.c
···116116 if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {117117 int exit_with = WEXITSTATUS(status);118118 if (exit_with == 2)119119- printk("check_ptrace : child exited with status 2. "119119+ printf("check_ptrace : child exited with status 2. "120120 "Serious trouble happening! Try updating your "121121 "host skas patch!\nDisabling SYSEMU support.");122122- printk("check_ptrace : child exited with exitcode %d, while "122122+ printf("check_ptrace : child exited with exitcode %d, while "123123 "expecting %d; status 0x%x", exit_with,124124 exitcode, status);125125 if (mustpanic)126126 panic("\n");127127 else128128- printk("\n");128128+ printf("\n");129129 ret = -1;130130 }131131···183183 void *stack;184184 int pid, n, status, count=0;185185186186- printk("Checking syscall emulation patch for ptrace...");186186+ printf("Checking syscall emulation patch for ptrace...");187187 sysemu_supported = 0;188188 pid = start_ptraced_child(&stack);189189···207207 goto fail_stopped;208208209209 sysemu_supported = 1;210210- printk("OK\n");210210+ printf("OK\n");211211 set_using_sysemu(!force_sysemu_disabled);212212213213- printk("Checking advanced syscall emulation patch for ptrace...");213213+ printf("Checking advanced syscall emulation patch for ptrace...");214214 pid = start_ptraced_child(&stack);215215216216 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0,···246246 goto fail_stopped;247247248248 sysemu_supported = 2;249249- printk("OK\n");249249+ printf("OK\n");250250251251 if ( !force_sysemu_disabled )252252 set_using_sysemu(sysemu_supported);···255255fail:256256 stop_ptraced_child(pid, stack, 1, 0);257257fail_stopped:258258- printk("missing\n");258258+ printf("missing\n");259259}260260261261static void __init check_ptrace(void)···263263 void *stack;264264 int pid, syscall, n, status;265265266266- printk("Checking that ptrace can change system call numbers...");266266+ printf("Checking that ptrace can change system call numbers...");267267 pid = start_ptraced_child(&stack);268268269269 if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)···292292 }293293 }294294 stop_ptraced_child(pid, stack, 0, 1);295295- printk("OK\n");295295+ printf("OK\n");296296 check_sysemu();297297}298298···471471#endif472472473473int have_devanon = 0;474474+475475+/* Runs on boot kernel stack - already safe to use printk. */474476475477void check_devanon(void)476478{
···274274 }275275 }276276277277- cx->usage++;278278-279277#ifdef CONFIG_HOTPLUG_CPU280278 /*281279 * Check for P_LVL2_UP flag before entering C2 and above on···281283 * detection phase, to work cleanly with logical CPU hotplug.282284 */283285 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 284284- !pr->flags.has_cst && acpi_fadt.plvl2_up)285285- cx->type = ACPI_STATE_C1;286286+ !pr->flags.has_cst && !acpi_fadt.plvl2_up)287287+ cx = &pr->power.states[ACPI_STATE_C1];286288#endif289289+290290+ cx->usage++;291291+287292 /*288293 * Sleep:289294 * ------···386385 }387386388387 next_state = pr->power.state;388388+389389+#ifdef CONFIG_HOTPLUG_CPU390390+ /* Don't do promotion/demotion */391391+ if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&392392+ !pr->flags.has_cst && !acpi_fadt.plvl2_up) {393393+ next_state = cx;394394+ goto end;395395+ }396396+#endif389397390398 /*391399 * Promotion?···567557 * Check for P_LVL2_UP flag before entering C2 and above on568558 * an SMP system. 569559 */570570- if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up)560560+ if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)571561 return_VALUE(-ENODEV);572562#endif573563
+2-2
drivers/acpi/processor_thermal.c
···102102{103103 struct cpufreq_policy policy;104104 if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu))105105- return -ENODEV;106106- return 0;105105+ return 0;106106+ return 1;107107}108108109109static int acpi_thermal_cpufreq_increase(unsigned int cpu)
+9-9
drivers/acpi/utilities/utmisc.c
···84848585 /* Find a free owner ID */86868787- for (i = 0; i < 32; i++) {8888- if (!(acpi_gbl_owner_id_mask & (1 << i))) {8787+ for (i = 0; i < 64; i++) {8888+ if (!(acpi_gbl_owner_id_mask & (1ULL << i))) {8989 ACPI_DEBUG_PRINT((ACPI_DB_VALUES,9090- "Current owner_id mask: %8.8X New ID: %2.2X\n",9090+ "Current owner_id mask: %16.16LX New ID: %2.2X\n",9191 acpi_gbl_owner_id_mask,9292 (unsigned int)(i + 1)));93939494- acpi_gbl_owner_id_mask |= (1 << i);9494+ acpi_gbl_owner_id_mask |= (1ULL << i);9595 *owner_id = (acpi_owner_id) (i + 1);9696 goto exit;9797 }···106106 */107107 *owner_id = 0;108108 status = AE_OWNER_ID_LIMIT;109109- ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n"));109109+ ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n"));110110111111 exit:112112 (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);···123123 * control method or unloading a table. Either way, we would124124 * ignore any error anyway.125125 *126126- * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 32126126+ * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 64127127 *128128 ******************************************************************************/129129···140140141141 /* Zero is not a valid owner_iD */142142143143- if ((owner_id == 0) || (owner_id > 32)) {143143+ if ((owner_id == 0) || (owner_id > 64)) {144144 ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id));145145 return_VOID;146146 }···158158159159 /* Free the owner ID only if it is valid */160160161161- if (acpi_gbl_owner_id_mask & (1 << owner_id)) {162162- acpi_gbl_owner_id_mask ^= (1 << owner_id);161161+ if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) {162162+ acpi_gbl_owner_id_mask ^= (1ULL << owner_id);163163 }164164165165 (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
+2-2
drivers/char/Kconfig
···687687688688config RTC689689 tristate "Enhanced Real Time Clock Support"690690- depends on !PPC32 && !PARISC && !IA64 && !M68K690690+ depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI)691691 ---help---692692 If you say Y here and create a character special file /dev/rtc with693693 major number 10 and minor number 135 using mknod ("man mknod"), you···735735736736config GEN_RTC737737 tristate "Generic /dev/rtc emulation"738738- depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64738738+ depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC739739 ---help---740740 If you say Y here and create a character special file /dev/rtc with741741 major number 10 and minor number 135 using mknod ("man mknod"), you
···419419 while (this_round > 1) {420420 unsigned short w;421421422422- w = get_unaligned(((const unsigned short *)con_buf0));422422+ w = get_unaligned(((unsigned short *)con_buf0));423423 vcs_scr_writew(vc, w, org++);424424 con_buf0 += 2;425425 this_round -= 2;
+4-4
drivers/fc4/Kconfig
···26262727config FC4_SOC2828 tristate "Sun SOC/Sbus"2929- depends on FC4!=n && (SPARC32 || SPARC64)2929+ depends on FC4!=n && SPARC3030 help3131 Serial Optical Channel is an interface card with one or two Fibre3232 Optic ports, each of which can be connected to a disk array. Note···38383939config FC4_SOCAL4040 tristate "Sun SOC+ (aka SOCAL)"4141- depends on FC4!=n && (SPARC32 || SPARC64)4141+ depends on FC4!=n && SPARC4242 ---help---4343 Serial Optical Channel Plus is an interface card with up to two4444 Fibre Optic ports. This card supports FC Arbitrated Loop (usually···6262 be called pluto.63636464config SCSI_FCAL6565- tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC646565+ tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC6666 depends on FC4!=n && SCSI6767 help6868 This driver drives FC-AL disks connected through a Fibre Channel···75757676config SCSI_FCAL7777 prompt "Generic FC-AL disk driver"7878- depends on FC4!=n && SCSI && !SPARC32 && !SPARC647878+ depends on FC4!=n && SCSI && !SPARC79798080endmenu8181
···26262727config INPUT_SPARCSPKR2828 tristate "SPARC Speaker support"2929- depends on PCI && (SPARC32 || SPARC64)2929+ depends on PCI && SPARC3030 help3131 Say Y here if you want the standard Speaker on Sparc PCI systems3232 to be used for bells and whistles.
+1-1
drivers/input/mouse/sermouse.c
···95959696 input_sync(dev);97979898- if (++sermouse->count == (5 - ((sermouse->type == SERIO_SUN) << 1)))9898+ if (++sermouse->count == 5)9999 sermouse->count = 0;100100}101101
···11config VIDEO_SAA713422 tristate "Philips SAA7134 support"33- depends on VIDEO_DEV && PCI && I2C && SOUND && SND33+ depends on VIDEO_DEV && PCI && I2C44 select VIDEO_BUF55 select VIDEO_IR66 select VIDEO_TUNER77 select CRC3288- select SND_PCM_OSS98 ---help---109 This is a video4linux driver for Philips SAA713x based1110 TV cards.12111312 To compile this driver as a module, choose M here: the1413 module will be called saa7134.1414+1515+config VIDEO_SAA7134_ALSA1616+ tristate "Philips SAA7134 DMA audio support"1717+ depends on VIDEO_SAA7134 && SND1818+ select SND_PCM_OSS1919+ ---help---2020+ This is a video4linux driver for direct (DMA) audio in2121+ Philips SAA713x based TV cards using ALSA2222+2323+ To compile this driver as a module, choose M here: the2424+ module will be called saa7134-alsa.2525+2626+config VIDEO_SAA7134_OSS2727+ tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)"2828+ depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA2929+ ---help---3030+ This is a video4linux driver for direct (DMA) audio in3131+ Philips SAA713x based TV cards using OSS3232+3333+ This is deprecated in favor of the ALSA module3434+3535+ To compile this driver as a module, choose M here: the3636+ module will be called saa7134-oss.15371638config VIDEO_SAA7134_DVB1739 tristate "DVB/ATSC Support for saa7134 based TV cards"
···62626363config MTD_SUN_UFLASH6464 tristate "Sun Microsystems userflash support"6565- depends on (SPARC32 || SPARC64) && MTD_CFI6565+ depends on SPARC && MTD_CFI6666 help6767 This provides a 'mapping' driver which supports the way in6868 which user-programmable flash chips are connected on various
+8-7
drivers/net/forcedeth.c
···1010 * trademarks of NVIDIA Corporation in the United States and other1111 * countries.1212 *1313- * Copyright (C) 2003,4 Manfred Spraul1313+ * Copyright (C) 2003,4,5 Manfred Spraul1414 * Copyright (C) 2004 Andrew de Quincey (wol support)1515 * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane1616 * IRQ rate fixes, bigendian fixes, cleanups, verification)···100100 * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check101101 * 0.46: 20 Oct 2005: Add irq optimization modes.102102 * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan.103103+ * 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single103104 *104105 * Known bugs:105106 * We suspect that on some hardware no TX done interrupts are generated.···112111 * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few113112 * superfluous timer interrupts from the nic.114113 */115115-#define FORCEDETH_VERSION "0.47"114114+#define FORCEDETH_VERSION "0.48"116115#define DRV_NAME "forcedeth"117116118117#include <linux/module.h>···872871 } else {873872 skb = np->rx_skbuff[nr];874873 }875875- np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len,876876- PCI_DMA_FROMDEVICE);874874+ np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data,875875+ skb->end-skb->data, PCI_DMA_FROMDEVICE);877876 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {878877 np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]);879878 wmb();···1000999 wmb();10011000 if (np->rx_skbuff[i]) {10021001 pci_unmap_single(np->pci_dev, np->rx_dma[i],10031003- np->rx_skbuff[i]->len,10021002+ np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,10041003 PCI_DMA_FROMDEVICE);10051004 dev_kfree_skb(np->rx_skbuff[i]);10061005 np->rx_skbuff[i] = NULL;···13351334 * the performance.13361335 */13371336 pci_unmap_single(np->pci_dev, np->rx_dma[i],13381338- np->rx_skbuff[i]->len,13371337+ np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,13391338 PCI_DMA_FROMDEVICE);1340133913411340 {···24562455 np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;24572456 dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;24582457#ifdef NETIF_F_TSO24592459- dev->features |= NETIF_F_TSO;24582458+ /* disabled dev->features |= NETIF_F_TSO; */24602459#endif24612460 }24622461
···11/* orinoco_nortel.c22 * 33 * Driver for Prism II devices which would usually be driven by orinoco_cs,44+ * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in55+ * Nortel emobility, Symbol LA-4113 and Symbol LA-4123.46 * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. 57 *68 * Copyright (C) 2002 Tobias Hoffmann···167165 goto fail_resources;168166 }169167170170- iomem = pci_iomap(pdev, 3, 0);168168+ iomem = pci_iomap(pdev, 2, 0);171169 if (!iomem) {172170 err = -ENOMEM;173171 goto fail_map_io;···267265static struct pci_device_id nortel_pci_id_table[] = {268266 /* Nortel emobility PCI */269267 {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,},268268+ /* Symbol LA-4123 PCI */269269+ {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,},270270 {0,},271271};272272
+2-1
drivers/s390/net/qeth_eddp.c
···6262 for (i = 0; i < ctx->num_pages; ++i)6363 free_page((unsigned long)ctx->pages[i]);6464 kfree(ctx->pages);6565- kfree(ctx->elements);6565+ if (ctx->elements != NULL)6666+ kfree(ctx->elements);6667 kfree(ctx);6768}6869
+29-32
drivers/s390/net/qeth_main.c
···11/*22 *33- * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $)33+ * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $)44 *55 * Linux on zSeries OSA Express and HiperSockets support66 *···1212 * Frank Pavlic (fpavlic@de.ibm.com) and1313 * Thomas Spatzier <tspat@de.ibm.com>1414 *1515- * $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $1515+ * $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $1616 *1717 * This program is free software; you can redistribute it and/or modify1818 * it under the terms of the GNU General Public License as published by···7272#include "qeth_eddp.h"7373#include "qeth_tso.h"74747575-#define VERSION_QETH_C "$Revision: 1.242 $"7575+#define VERSION_QETH_C "$Revision: 1.251 $"7676static const char *version = "qeth S/390 OSA-Express driver";77777878/**···518518519519 QETH_DBF_TEXT(setup, 3, "setoffl");520520 QETH_DBF_HEX(setup, 3, &card, sizeof(void *));521521-521521+522522+ netif_carrier_off(card->dev);522523 recover_flag = card->state;523524 if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){524525 PRINT_WARN("Stopping card %s interrupted by user!\n",···10211020qeth_schedule_recovery(struct qeth_card *card)10221021{10231022 QETH_DBF_TEXT(trace,2,"startrec");10241024-10251023 if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)10261024 schedule_work(&card->kernel_thread_starter);10271025}···17101710 "IP address reset.\n",17111711 QETH_CARD_IFNAME(card),17121712 card->info.chpid);17131713- netif_carrier_on(card->dev);17141713 qeth_schedule_recovery(card);17151714 return NULL;17161715 case IPA_CMD_MODCCID:···19581959{19591960 u16 s1, s2;1960196119611961-QETH_DBF_TEXT(trace,4,"osndipa");19621962+ QETH_DBF_TEXT(trace,4,"osndipa");1962196319631964 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);19641965 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);···22022203}2203220422042205static inline int22052205-qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf,22062206- unsigned int qdio_error,22072207- unsigned int siga_error)22062206+qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error,22072207+ unsigned int siga_error, const char *dbftext)22082208{22092209- int rc = 0;22102210-22112209 if (qdio_error || siga_error) {22122212- QETH_DBF_TEXT(trace, 2, "qdinerr");22132213- QETH_DBF_TEXT(qerr, 2, "qdinerr");22102210+ QETH_DBF_TEXT(trace, 2, dbftext);22112211+ QETH_DBF_TEXT(qerr, 2, dbftext);22142212 QETH_DBF_TEXT_(qerr, 2, " F15=%02X",22152215- buf->buffer->element[15].flags & 0xff);22132213+ buf->element[15].flags & 0xff);22162214 QETH_DBF_TEXT_(qerr, 2, " F14=%02X",22172217- buf->buffer->element[14].flags & 0xff);22152215+ buf->element[14].flags & 0xff);22182216 QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error);22192217 QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error);22202220- rc = 1;22182218+ return 1;22212219 }22222222- return rc;22202220+ return 0;22232221}2224222222252223static inline struct sk_buff *···27652769 for (i = first_element; i < (first_element + count); ++i) {27662770 index = i % QDIO_MAX_BUFFERS_PER_Q;27672771 buffer = &card->qdio.in_q->bufs[index];27682768- if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) &&27692769- qeth_check_for_inbound_error(buffer, qdio_err, siga_err)))27722772+ if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) &&27732773+ qeth_check_qdio_errors(buffer->buffer, 27742774+ qdio_err, siga_err,"qinerr")))27702775 qeth_process_inbound_buffer(card, buffer, index);27712776 /* clear buffer and give back to hardware */27722777 qeth_put_buffer_pool_entry(card, buffer->pool_entry);···27822785static inline int27832786qeth_handle_send_error(struct qeth_card *card,27842787 struct qeth_qdio_out_buffer *buffer,27852785- int qdio_err, int siga_err)27882788+ unsigned int qdio_err, unsigned int siga_err)27862789{27872790 int sbalf15 = buffer->buffer->element[15].flags & 0xff;27882791 int cc = siga_err & 3;2789279227902793 QETH_DBF_TEXT(trace, 6, "hdsnderr");27942794+ qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr");27912795 switch (cc) {27922796 case 0:27932797 if (qdio_err){···30453047 for(i = first_element; i < (first_element + count); ++i){30463048 buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];30473049 /*we only handle the KICK_IT error by doing a recovery */30483048- if (qeth_handle_send_error(card, buffer, qdio_error, siga_error)30503050+ if (qeth_handle_send_error(card, buffer,30513051+ qdio_error, siga_error)30493052 == QETH_SEND_ERROR_KICK_IT){30503053 netif_stop_queue(card->dev);30513054 qeth_schedule_recovery(card);···32883289 card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count;32893290 INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list);32903291 INIT_LIST_HEAD(&card->qdio.init_pool.entry_list);32913291- /* outbound */32923292}3293329332943294static int···37293731 break;37303732 }37313733 }37343734+ if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card))37353735+ return 0;37363736+37323737#endif37333738 return rc;37343739}···38083807 card->data.state = CH_STATE_UP;38093808 card->state = CARD_STATE_UP;3810380938113811- if (!card->lan_online){38123812- if (netif_carrier_ok(dev))38133813- netif_carrier_off(dev);38143814- }38103810+ if (!card->lan_online && netif_carrier_ok(dev))38113811+ netif_carrier_off(dev);38153812 return 0;38163813}38173814···58695870 struct inet6_dev *in6_dev;5870587158715872 QETH_DBF_TEXT(trace,4,"chkmcv6");58725872- if ((card->options.layer2 == 0) &&58735873- (!qeth_is_supported(card, IPA_IPV6)) )58735873+ if (!qeth_is_supported(card, IPA_IPV6)) 58745874 return ;58755875-58765875 in6_dev = in6_dev_get(card->dev);58775876 if (in6_dev == NULL)58785877 return;···79337936 QETH_DBF_TEXT_(setup, 2, "6err%d", rc);79347937 goto out_remove;79357938 }79367936-/*maybe it was set offline without ifconfig down79377937- * we can also use this state for recovery purposes*/79397939+ netif_carrier_on(card->dev);79407940+79387941 qeth_set_allowed_threads(card, 0xffffffff, 0);79397942 if (recover_flag == CARD_STATE_RECOVER)79407943 qeth_start_again(card, recovery_mode);
···20442044 else {20452045 u8 *scsicmd = cmd->cmnd;2046204620472047- if (scsicmd[0] == INQUIRY) {20472047+ if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) {20482048 u8 *buf = NULL;20492049 unsigned int buflen;20502050···20572057 * to indicate to the Linux scsi midlayer this is a modern20582058 * device. 2) Ensure response data format / ATAPI information20592059 * are always correct.20602060- */20612061- /* FIXME: do we ever override EVPD pages and the like, with20622062- * this code?20632060 */20642061 if (buf[2] == 0) {20652062 buf[2] = 0x5;
+39-10
drivers/scsi/scsi_scan.c
···400400 return found_target;401401}402402403403+struct work_queue_wrapper {404404+ struct work_struct work;405405+ struct scsi_target *starget;406406+};407407+408408+static void scsi_target_reap_work(void *data) {409409+ struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data;410410+ struct scsi_target *starget = wqw->starget;411411+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);412412+ unsigned long flags;413413+414414+ kfree(wqw);415415+416416+ spin_lock_irqsave(shost->host_lock, flags);417417+418418+ if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {419419+ list_del_init(&starget->siblings);420420+ spin_unlock_irqrestore(shost->host_lock, flags);421421+ transport_remove_device(&starget->dev);422422+ device_del(&starget->dev);423423+ transport_destroy_device(&starget->dev);424424+ put_device(&starget->dev);425425+ return;426426+427427+ }428428+ spin_unlock_irqrestore(shost->host_lock, flags);429429+430430+ return;431431+}432432+403433/**404434 * scsi_target_reap - check to see if target is in use and destroy if not405435 *···441411 */442412void scsi_target_reap(struct scsi_target *starget)443413{444444- struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);445445- unsigned long flags;446446- spin_lock_irqsave(shost->host_lock, flags);414414+ struct work_queue_wrapper *wqw = 415415+ kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC);447416448448- if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {449449- list_del_init(&starget->siblings);450450- spin_unlock_irqrestore(shost->host_lock, flags);451451- device_del(&starget->dev);452452- transport_unregister_device(&starget->dev);453453- put_device(&starget->dev);417417+ if (!wqw) {418418+ starget_printk(KERN_ERR, starget,419419+ "Failed to allocate memory in scsi_reap_target()\n");454420 return;455421 }456456- spin_unlock_irqrestore(shost->host_lock, flags);422422+423423+ INIT_WORK(&wqw->work, scsi_target_reap_work, wqw);424424+ wqw->starget = starget;425425+ schedule_work(&wqw->work);457426}458427459428/**
+55-4
drivers/scsi/scsi_transport_fc.c
···105105 { FC_PORTSTATE_LINKDOWN, "Linkdown" },106106 { FC_PORTSTATE_ERROR, "Error" },107107 { FC_PORTSTATE_LOOPBACK, "Loopback" },108108+ { FC_PORTSTATE_DELETED, "Deleted" },108109};109110fc_enum_name_search(port_state, fc_port_state, fc_port_state_names)110111#define FC_PORTSTATE_MAX_NAMELEN 20···212211#define FC_MGMTSRVR_PORTID 0x00000a213212214213214214+static void fc_shost_remove_rports(void *data);215215static void fc_timeout_deleted_rport(void *data);216216static void fc_scsi_scan_rport(void *data);217217static void fc_rport_terminate(struct fc_rport *rport);···320318 fc_host_next_rport_number(shost) = 0;321319 fc_host_next_target_id(shost) = 0;322320321321+ fc_host_flags(shost) = 0;322322+ INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost);323323 return 0;324324}325325···391387 struct fc_internal *i = to_fc_internal(shost->transportt); \392388 if ((i->f->get_rport_##field) && \393389 !((rport->port_state == FC_PORTSTATE_BLOCKED) || \390390+ (rport->port_state == FC_PORTSTATE_DELETED) || \394391 (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \395392 i->f->get_rport_##field(rport); \396393 return snprintf(buf, sz, format_string, cast rport->field); \···407402 struct Scsi_Host *shost = rport_to_shost(rport); \408403 struct fc_internal *i = to_fc_internal(shost->transportt); \409404 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \405405+ (rport->port_state == FC_PORTSTATE_DELETED) || \410406 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \411407 return -EBUSY; \412408 val = simple_strtoul(buf, NULL, 0); \···525519 struct Scsi_Host *shost = rport_to_shost(rport);526520 struct fc_internal *i = to_fc_internal(shost->transportt);527521 if ((rport->port_state == FC_PORTSTATE_BLOCKED) ||522522+ (rport->port_state == FC_PORTSTATE_DELETED) ||528523 (rport->port_state == FC_PORTSTATE_NOTPRESENT))529524 return -EBUSY;530525 val = simple_strtoul(buf, NULL, 0);···17761769 rport->maxframe_size = -1;17771770 rport->supported_classes = FC_COS_UNSPECIFIED;17781771 rport->roles = FC_RPORT_ROLE_UNKNOWN;17791779- rport->port_state = FC_PORTSTATE_NOTPRESENT;17721772+ rport->port_state = FC_PORTSTATE_DELETED;1780177317811774 /* remove the identifiers that aren't used in the consisting binding */17821775 switch (fc_host_tgtid_bind_type(shost)) {···17961789 break;17971790 }1798179117991799- spin_unlock_irqrestore(shost->host_lock, flags);18001800-18011792 /*18021793 * As this only occurs if the remote port (scsi target)18031794 * went away and didn't come back - we'll remove18041795 * all attached scsi devices.17961796+ *17971797+ * We'll schedule the shost work item to perform the actual removal17981798+ * to avoid recursion in the different flush calls if we perform17991799+ * the removal in each target - and there are lots of targets18001800+ * whose timeouts fire at the same time.18051801 */18061806- fc_rport_tgt_remove(rport);18021802+18031803+ if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) {18041804+ fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED;18051805+ scsi_queue_work(shost, &fc_host_rport_del_work(shost));18061806+ }18071807+18081808+ spin_unlock_irqrestore(shost->host_lock, flags);18071809}1808181018091811/**···18311815 scsi_target_unblock(&rport->dev);18321816 scsi_scan_target(&rport->dev, rport->channel, rport->scsi_target_id,18331817 SCAN_WILD_CARD, 1);18181818+}18191819+18201820+18211821+/**18221822+ * fc_shost_remove_rports - called to remove all rports that are marked18231823+ * as in a deleted (not connected) state.18241824+ * 18251825+ * @data: shost whose rports are to be looked at18261826+ **/18271827+static void18281828+fc_shost_remove_rports(void *data)18291829+{18301830+ struct Scsi_Host *shost = (struct Scsi_Host *)data;18311831+ struct fc_rport *rport, *next_rport;18321832+ unsigned long flags;18331833+18341834+ spin_lock_irqsave(shost->host_lock, flags);18351835+ while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) {18361836+18371837+ fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED;18381838+18391839+restart_search:18401840+ list_for_each_entry_safe(rport, next_rport,18411841+ &fc_host_rport_bindings(shost), peers) {18421842+ if (rport->port_state == FC_PORTSTATE_DELETED) {18431843+ rport->port_state = FC_PORTSTATE_NOTPRESENT;18441844+ spin_unlock_irqrestore(shost->host_lock, flags);18451845+ fc_rport_tgt_remove(rport);18461846+ spin_lock_irqsave(shost->host_lock, flags);18471847+ goto restart_search;18481848+ }18491849+ }18501850+18511851+ }18521852+ spin_unlock_irqrestore(shost->host_lock, flags);18341853}1835185418361855
+5-5
drivers/serial/Kconfig
···1010# The new 8250/16550 serial drivers1111config SERIAL_82501212 tristate "8250/16550 and compatible serial support"1313- depends on (BROKEN || !(SPARC64 || SPARC32))1313+ depends on (BROKEN || !SPARC)1414 select SERIAL_CORE1515 ---help---1616 This selects whether you want to include the driver for the standard···469469470470config SERIAL_SUNCORE471471 bool472472- depends on SPARC32 || SPARC64472472+ depends on SPARC473473 select SERIAL_CORE474474 select SERIAL_CORE_CONSOLE475475 default y476476477477config SERIAL_SUNZILOG478478 tristate "Sun Zilog8530 serial support"479479- depends on SPARC32 || SPARC64479479+ depends on SPARC480480 help481481 This driver supports the Zilog8530 serial ports found on many Sparc482482 systems. Say Y or M if you want to be able to these serial ports.···491491492492config SERIAL_SUNSU493493 tristate "Sun SU serial support"494494- depends on (SPARC32 || SPARC64) && PCI494494+ depends on SPARC && PCI495495 help496496 This driver supports the 8250 serial ports that run the keyboard and497497 mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able···547547548548config SERIAL_SUNSAB549549 tristate "Sun Siemens SAB82532 serial support"550550- depends on (SPARC32 || SPARC64) && PCI550550+ depends on SPARC && PCI551551 help552552 This driver supports the Siemens SAB82532 DUSCC serial ports on newer553553 (PCI) UltraSPARC systems. Say Y or M if you want to be able to these
+1-1
drivers/serial/amba-pl011.c
···160160 flag = TTY_FRAME;161161 }162162163163- if (uart_handle_sysrq_char(&uap->port, ch, regs))163163+ if (uart_handle_sysrq_char(&uap->port, ch & 255, regs))164164 goto ignore_char;165165166166 uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag);
+2-2
drivers/serial/pxa.c
···361361 if (port->line == 3) /* HWUART */362362 up->mcr |= UART_MCR_AFE;363363 else364364- up->mcr = 0;364364+ up->mcr = 0;365365366366 /*367367 * Allocate the IRQ···641641 int i;642642643643 /*644644- * First save the UER then disable the interrupts644644+ * First save the IER then disable the interrupts645645 */646646 ier = serial_in(up, UART_IER);647647 serial_out(up, UART_IER, UART_IER_UUE);
+6-3
drivers/usb/core/usb.c
···14321432 mark_quiesced(intf);14331433 } else {14341434 // FIXME else if there's no suspend method, disconnect...14351435- dev_warn(dev, "no %s?\n", "suspend");14351435+ dev_warn(dev, "no suspend for driver %s?\n", driver->name);14361436+ mark_quiesced(intf);14361437 status = 0;14371438 }14381439 return status;···14611460 }1462146114631462 if ((dev->driver == NULL) ||14641464- (dev->driver_data == &usb_generic_driver_data))14631463+ (dev->driver_data == &usb_generic_driver_data)) {14641464+ dev->power.power_state.event = PM_EVENT_FREEZE;14651465 return 0;14661466+ }1466146714671468 intf = to_usb_interface(dev);14681469 driver = to_usb_driver(dev->driver);···14841481 mark_quiesced(intf);14851482 }14861483 } else14871487- dev_warn(dev, "no %s?\n", "resume");14841484+ dev_warn(dev, "no resume for driver %s?\n", driver->name);14881485 return 0;14891486}14901487
···109109 * data comes from.110110 */111111 if (sdev->scsi_level < SCSI_2)112112- sdev->scsi_level = SCSI_2;112112+ sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;113113114114 /* According to the technical support people at Genesys Logic,115115 * devices using their chips have problems transferring more than···162162 * a Get-Max-LUN request, we won't lose much by setting the163163 * revision level down to 2. The only devices that would be164164 * affected are those with sparse LUNs. */165165- sdev->scsi_level = SCSI_2;165165+ sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;166166167167 /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable168168 * Hardware Error) when any low-level error occurs,
···6677config VGA_CONSOLE88 bool "VGA text console" if EMBEDDED || !X8699- depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE99+ depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE1010 default y1111 help1212 Saying Y here will allow you to use Linux in text mode through a···68686969config PROM_CONSOLE7070 bool "PROM console"7171- depends on SPARC32 || SPARC647171+ depends on SPARC7272 help7373 Say Y to build a console driver for Sun machines that uses the7474 terminal emulation built into their console PROMS.···136136config FONT_8x8137137 bool "VGA 8x8 font" if FONTS138138 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE139139- default y if !SPARC32 && !SPARC64 && !FONTS139139+ default y if !SPARC && !FONTS140140 help141141 This is the "high resolution" font for the VGA frame buffer (the one142142 provided by the text console 80x50 (and higher) modes).···150150config FONT_8x16151151 bool "VGA 8x16 font" if FONTS152152 depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON 153153- default y if !SPARC32 && !SPARC64 && !FONTS153153+ default y if !SPARC && !FONTS154154 help155155 This is the "high resolution" font for the VGA frame buffer (the one156156 provided by the VGA text console 80x25 mode.···160160config FONT_6x11161161 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS162162 depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE163163- default y if !SPARC32 && !SPARC64 && !FONTS && MAC163163+ default y if !SPARC && !FONTS && MAC164164 help165165 Small console font with Macintosh-style high-half glyphs. Some Mac166166 framebuffer drivers don't support this one at all.···176176config FONT_PEARL_8x8177177 bool "Pearl (old m68k) console 8x8 font" if FONTS178178 depends on FRAMEBUFFER_CONSOLE179179- default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA179179+ default y if !SPARC && !FONTS && AMIGA180180 help181181 Small console font with PC-style control-character and high-half182182 glyphs.···184184config FONT_ACORN_8x8185185 bool "Acorn console 8x8 font" if FONTS186186 depends on FRAMEBUFFER_CONSOLE187187- default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN187187+ default y if !SPARC && !FONTS && ARM && ARCH_ACORN188188 help189189 Small console font with PC-style control characters and high-half190190 glyphs.191191192192config FONT_MINI_4x6193193 bool "Mini 4x6 font"194194- depends on !SPARC32 && !SPARC64 && FONTS194194+ depends on !SPARC && FONTS195195196196config FONT_SUN8x16197197 bool "Sparc console 8x16 font"198198- depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)198198+ depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)199199 help200200 This is the high resolution console font for Sun machines. Say Y.201201202202config FONT_SUN12x22203203 bool "Sparc console 12x22 font (not supported by all drivers)"204204- depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)204204+ depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)205205 help206206 This is the high resolution console font for Sun machines with very207207 big letters (like the letters used in the SPARC PROM). If the
···47474848config LOGO_SUN_CLUT2244949 bool "224-color Sun Linux logo"5050- depends on LOGO && (SPARC32 || SPARC64)5050+ depends on LOGO && SPARC5151 default y52525353config LOGO_SUPERH_MONO
+3
drivers/video/sbuslib.c
···4646 unsigned long off;4747 int i;48484949+ if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE)))5050+ return -EINVAL;5151+4952 size = vma->vm_end - vma->vm_start;5053 if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))5154 return -EINVAL;
+6-3
fs/hostfs/hostfs_kern.c
···501501 long long start;502502 int err = 0;503503504504- start = (long long) (page->index << PAGE_CACHE_SHIFT) + from;504504+ start = (((long long) page->index) << PAGE_CACHE_SHIFT) + from;505505 buffer = kmap(page);506506 err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from,507507 to - from);508508 if(err > 0) err = 0;509509+510510+ /* Actually, if !err, write_file has added to-from to start, so, despite511511+ * the appearance, we are comparing i_size against the _last_ written512512+ * location, as we should. */513513+509514 if(!err && (start > inode->i_size))510515 inode->i_size = start;511516···915910int hostfs_link_readpage(struct file *file, struct page *page)916911{917912 char *buffer, *name;918918- long long start;919913 int err;920914921921- start = page->index << PAGE_CACHE_SHIFT;922915 buffer = kmap(page);923916 name = inode_name(page->mapping->host, 0);924917 if(name == NULL) return(-ENOMEM);
+4
fs/lockd/clntlock.c
···157157 inode = fl->fl_file->f_dentry->d_inode;158158 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC)159159 continue;160160+ if (fl->fl_u.nfs_fl.owner == NULL)161161+ continue;160162 if (fl->fl_u.nfs_fl.owner->host != host)161163 continue;162164 if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED))···227225228226 inode = fl->fl_file->f_dentry->d_inode;229227 if (inode->i_sb->s_magic != NFS_SUPER_MAGIC)228228+ continue;229229+ if (fl->fl_u.nfs_fl.owner == NULL)230230 continue;231231 if (fl->fl_u.nfs_fl.owner->host != host)232232 continue;
+6-18
fs/nfs/direct.c
···678678 if (!count)679679 goto out;680680681681- if (mapping->nrpages) {682682- retval = filemap_fdatawrite(mapping);683683- if (retval == 0)684684- retval = nfs_wb_all(inode);685685- if (retval == 0)686686- retval = filemap_fdatawait(mapping);687687- if (retval)688688- goto out;689689- }681681+ retval = nfs_sync_mapping(mapping);682682+ if (retval)683683+ goto out;690684691685 retval = nfs_direct_read(inode, ctx, &iov, pos, 1);692686 if (retval > 0)···758764 if (!count)759765 goto out;760766761761- if (mapping->nrpages) {762762- retval = filemap_fdatawrite(mapping);763763- if (retval == 0)764764- retval = nfs_wb_all(inode);765765- if (retval == 0)766766- retval = filemap_fdatawait(mapping);767767- if (retval)768768- goto out;769769- }767767+ retval = nfs_sync_mapping(mapping);768768+ if (retval)769769+ goto out;770770771771 retval = nfs_direct_write(inode, ctx, &iov, pos, 1);772772 if (mapping->nrpages)
+6-20
fs/nfs/file.c
···433433 * Flush all pending writes before doing anything434434 * with locks..435435 */436436- filemap_fdatawrite(filp->f_mapping);437437- down(&inode->i_sem);438438- nfs_wb_all(inode);439439- up(&inode->i_sem);440440- filemap_fdatawait(filp->f_mapping);436436+ nfs_sync_mapping(filp->f_mapping);441437442438 /* NOTE: special case443439 * If we're signalled while cleaning up locks on process exit, we···461465 * Flush all pending writes before doing anything462466 * with locks..463467 */464464- status = filemap_fdatawrite(filp->f_mapping);465465- if (status == 0) {466466- down(&inode->i_sem);467467- status = nfs_wb_all(inode);468468- up(&inode->i_sem);469469- if (status == 0)470470- status = filemap_fdatawait(filp->f_mapping);471471- }472472- if (status < 0)468468+ status = nfs_sync_mapping(filp->f_mapping);469469+ if (status != 0)473470 goto out;474471475472 lock_kernel();···486497 * Make sure we clear the cache whenever we try to get the lock.487498 * This makes locking act as a cache coherency point.488499 */489489- filemap_fdatawrite(filp->f_mapping);490490- down(&inode->i_sem);491491- nfs_wb_all(inode); /* we may have slept */492492- up(&inode->i_sem);493493- filemap_fdatawait(filp->f_mapping);500500+ nfs_sync_mapping(filp->f_mapping);494501 nfs_zap_caches(inode);495502out:496503 rpc_clnt_sigunmask(NFS_CLIENT(inode), &oldset);···509524 return -EINVAL;510525511526 /* No mandatory locks over NFS */512512- if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)527527+ if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID &&528528+ fl->fl_type != F_UNLCK)513529 return -ENOLCK;514530515531 if (IS_GETLK(cmd))
+23-5
fs/nfs/inode.c
···640640 return 0;641641}642642643643+/**644644+ * nfs_sync_mapping - helper to flush all mmapped dirty data to disk645645+ */646646+int nfs_sync_mapping(struct address_space *mapping)647647+{648648+ int ret;649649+650650+ if (mapping->nrpages == 0)651651+ return 0;652652+ unmap_mapping_range(mapping, 0, 0, 0);653653+ ret = filemap_fdatawrite(mapping);654654+ if (ret != 0)655655+ goto out;656656+ ret = filemap_fdatawait(mapping);657657+ if (ret != 0)658658+ goto out;659659+ ret = nfs_wb_all(mapping->host);660660+out:661661+ return ret;662662+}663663+643664/*644665 * Invalidate the local caches645666 */···12001179 struct nfs_inode *nfsi = NFS_I(inode);1201118012021181 if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {12031203- if (S_ISREG(inode->i_mode)) {12041204- if (filemap_fdatawrite(mapping) == 0)12051205- filemap_fdatawait(mapping);12061206- nfs_wb_all(inode);12071207- }11821182+ if (S_ISREG(inode->i_mode))11831183+ nfs_sync_mapping(mapping);12081184 invalidate_inode_pages2(mapping);1209118512101186 spin_lock(&inode->i_lock);
···203203204204config SUN_PARTITION205205 bool "Sun partition tables support" if PARTITION_ADVANCED206206- default y if (SPARC32 || SPARC64 || SUN3 || SUN3X)206206+ default y if (SPARC || SUN3 || SUN3X)207207 ---help---208208 Like most systems, SunOS uses its own hard disk partition table209209 format, incompatible with all others. Saying Y here allows you to
+23-24
fs/proc/generic.c
···5454 ssize_t n, count;5555 char *start;5656 struct proc_dir_entry * dp;5757+ unsigned long long pos;5858+5959+ /*6060+ * Gaah, please just use "seq_file" instead. The legacy /proc6161+ * interfaces cut loff_t down to off_t for reads, and ignore6262+ * the offset entirely for writes..6363+ */6464+ pos = *ppos;6565+ if (pos > MAX_NON_LFS)6666+ return 0;6767+ if (nbytes > MAX_NON_LFS - pos)6868+ nbytes = MAX_NON_LFS - pos;57695870 dp = PDE(inode);5971 if (!(page = (char*) __get_free_page(GFP_KERNEL)))···214202static loff_t215203proc_file_lseek(struct file *file, loff_t offset, int orig)216204{217217- lock_kernel();218218-219219- switch (orig) {220220- case 0:221221- if (offset < 0)222222- goto out;223223- file->f_pos = offset;224224- unlock_kernel();225225- return(file->f_pos);226226- case 1:227227- if (offset + file->f_pos < 0)228228- goto out;229229- file->f_pos += offset;230230- unlock_kernel();231231- return(file->f_pos);232232- case 2:233233- goto out;234234- default:235235- goto out;236236- }237237-238238-out:239239- unlock_kernel();240240- return -EINVAL;205205+ loff_t retval = -EINVAL;206206+ switch (orig) {207207+ case 1:208208+ offset += file->f_pos;209209+ /* fallthrough */210210+ case 0:211211+ if (offset < 0 || offset > MAX_NON_LFS)212212+ break;213213+ file->f_pos = retval = offset;214214+ }215215+ return retval;241216}242217243218static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
+6-2
fs/relayfs/relay.c
···333333 return length;334334335335toobig:336336- printk(KERN_WARNING "relayfs: event too large (%Zd)\n", length);337337- WARN_ON(1);336336+ buf->chan->last_toobig = length;338337 return 0;339338}340339···397398 continue;398399 relay_close_buf(chan->buf[i]);399400 }401401+402402+ if (chan->last_toobig)403403+ printk(KERN_WARNING "relayfs: one or more items not logged "404404+ "[item size (%Zd) > sub-buffer size (%Zd)]\n",405405+ chan->last_toobig, chan->subbuf_size);400406401407 kref_put(&chan->kref, relay_destroy_channel);402408}
···11-#include <linux/config.h>22-31#ifndef _ASMi386_PARAM_H42#define _ASMi386_PARAM_H5364#ifdef __KERNEL__55+# include <linux/config.h>76# define HZ CONFIG_HZ /* Internal kernel timer frequency */87# define USER_HZ 100 /* .. some user interfaces are in "ticks" */98# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
+1-1
include/asm-ia64/topology.h
···3838/*3939 * Returns the number of the first CPU on Node 'node'.4040 */4141-#define node_to_first_cpu(node) (__ffs(node_to_cpumask(node)))4141+#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node)))42424343/*4444 * Determines the node for a given pci bus
+1-2
include/asm-x86_64/param.h
···11-#include <linux/config.h>22-31#ifndef _ASMx86_64_PARAM_H42#define _ASMx86_64_PARAM_H5364#ifdef __KERNEL__55+# include <linux/config.h>76# define HZ CONFIG_HZ /* Internal kernel timer frequency */87# define USER_HZ 100 /* .. some user interfaces are in "ticks */98#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
···1818 fallback, no routers on link */1919#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */2020#define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */2121+#define RTF_ANYCAST 0x00100000 /* Anycast */21222223#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */2324#define RTF_EXPIRES 0x00400000
···890890extern void xfrm_policy_flush(void);891891extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);892892extern int xfrm_flush_bundles(void);893893+extern void xfrm_flush_all_bundles(void);893894extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family);894895extern void xfrm_init_pmtu(struct dst_entry *dst);895896
+11
include/scsi/scsi_transport_fc.h
···7979 FC_PORTSTATE_LINKDOWN,8080 FC_PORTSTATE_ERROR,8181 FC_PORTSTATE_LOOPBACK,8282+ FC_PORTSTATE_DELETED,8283};83848485···326325 struct list_head rport_bindings;327326 u32 next_rport_number;328327 u32 next_target_id;328328+ u8 flags;329329+ struct work_struct rport_del_work;329330};331331+332332+/* values for struct fc_host_attrs "flags" field: */333333+#define FC_SHOST_RPORT_DEL_SCHEDULED 0x01334334+330335331336#define fc_host_node_name(x) \332337 (((struct fc_host_attrs *)(x)->shost_data)->node_name)···372365 (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number)373366#define fc_host_next_target_id(x) \374367 (((struct fc_host_attrs *)(x)->shost_data)->next_target_id)368368+#define fc_host_flags(x) \369369+ (((struct fc_host_attrs *)(x)->shost_data)->flags)370370+#define fc_host_rport_del_work(x) \371371+ (((struct fc_host_attrs *)(x)->shost_data)->rport_del_work)375372376373377374/* The functions by which the transport class and the driver communicate */
-1
init/Kconfig
···260260 bool "Optimize for size (Look out for broken compilers!)"261261 default y262262 depends on ARM || H8300 || EXPERIMENTAL263263- depends on !SPARC64264263 help265264 Enabling this option will pass "-Os" instead of "-O2" to gcc266265 resulting in a smaller kernel.
···270270 /*271271 * The waiting task can free the futex_q as soon as this is written,272272 * without taking any locks. This must come last.273273+ *274274+ * A memory barrier is required here to prevent the following store275275+ * to lock_ptr from getting ahead of the wakeup. Clearing the lock276276+ * at the end of wake_up_all() does not prevent this store from277277+ * moving.273278 */279279+ wmb();274280 q->lock_ptr = NULL;275281}276282
···704704 addr = SG_ENT_VIRT_ADDRESS(sg);705705 dev_addr = virt_to_phys(addr);706706 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {707707- sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir));708708- if (!sg->dma_address) {707707+ void *map = map_single(hwdev, addr, sg->length, dir);708708+ sg->dma_address = virt_to_bus(map);709709+ if (!map) {709710 /* Don't panic here, we expect map_sg users710711 to do proper error handling. */711712 swiotlb_full(hwdev, sg->length, dir, 0);
+4
mm/mempolicy.c
···161161 switch (mode) {162162 case MPOL_INTERLEAVE:163163 policy->v.nodes = *nodes;164164+ if (nodes_weight(*nodes) == 0) {165165+ kmem_cache_free(policy_cache, policy);166166+ return ERR_PTR(-EINVAL);167167+ }164168 break;165169 case MPOL_PREFERRED:166170 policy->v.preferred_node = first_node(*nodes);
+5-1
net/8021q/vlan.c
···753753 break;754754 case GET_VLAN_REALDEV_NAME_CMD:755755 err = vlan_dev_get_realdev_name(args.device1, args.u.device2);756756+ if (err)757757+ goto out;756758 if (copy_to_user(arg, &args,757759 sizeof(struct vlan_ioctl_args))) {758760 err = -EFAULT;···763761764762 case GET_VLAN_VID_CMD:765763 err = vlan_dev_get_vid(args.device1, &vid);764764+ if (err)765765+ goto out;766766 args.u.VID = vid;767767 if (copy_to_user(arg, &args,768768 sizeof(struct vlan_ioctl_args))) {···778774 __FUNCTION__, args.cmd);779775 return -EINVAL;780776 };781781-777777+out:782778 return err;783779}784780
+9-10
net/bridge/br_netfilter.c
···295295 len -= 2;296296297297 while (len > 0) {298298- int optlen = raw[off+1]+2;298298+ int optlen = skb->nh.raw[off+1]+2;299299300300 switch (skb->nh.raw[off]) {301301 case IPV6_TLV_PAD0:···308308 case IPV6_TLV_JUMBO:309309 if (skb->nh.raw[off+1] != 4 || (off&3) != 2)310310 goto bad;311311-312311 pkt_len = ntohl(*(u32*)(skb->nh.raw+off+2));313313-312312+ if (pkt_len <= IPV6_MAXPLEN ||313313+ skb->nh.ipv6h->payload_len)314314+ goto bad;314315 if (pkt_len > skb->len - sizeof(struct ipv6hdr))315316 goto bad;316316- if (pkt_len + sizeof(struct ipv6hdr) < skb->len) {317317- if (__pskb_trim(skb,318318- pkt_len + sizeof(struct ipv6hdr)))319319- goto bad;320320- if (skb->ip_summed == CHECKSUM_HW)321321- skb->ip_summed = CHECKSUM_NONE;322322- }317317+ if (pskb_trim_rcsum(skb,318318+ pkt_len+sizeof(struct ipv6hdr)))319319+ goto bad;323320 break;324321 default:325322 if (optlen > len)···369372 if (hdr->nexthdr == NEXTHDR_HOP && check_hbh_len(skb))370373 goto inhdr_error;371374375375+ nf_bridge_put(skb->nf_bridge);372376 if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)373377 return NF_DROP;374378 setup_pre_routing(skb);···453455 skb->ip_summed = CHECKSUM_NONE;454456 }455457458458+ nf_bridge_put(skb->nf_bridge);456459 if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)457460 return NF_DROP;458461 setup_pre_routing(skb);
+2-2
net/core/filter.c
···293293 struct sock_filter *ftest;294294 int pc;295295296296- if (((unsigned int)flen >= (~0U / sizeof(struct sock_filter))) || flen == 0)296296+ if (flen == 0 || flen > BPF_MAXINSNS)297297 return -EINVAL;298298299299 /* check the filter code now */···360360 int err;361361362362 /* Make sure new filter is there and in the right amounts. */363363- if (fprog->filter == NULL || fprog->len > BPF_MAXINSNS)363363+ if (fprog->filter == NULL)364364 return -EINVAL;365365366366 fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL);
+1-1
net/dccp/ipv4.c
···12511251 struct dccp_sock *dp = dccp_sk(sk);1252125212531253 /*12541254- * DCCP doesn't use sk_qrite_queue, just sk_send_head12541254+ * DCCP doesn't use sk_write_queue, just sk_send_head12551255 * for retransmissions12561256 */12571257 if (sk->sk_send_head != NULL) {
+2-1
net/ipv4/netfilter/Makefile
···12121313# connection tracking1414obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o1515+obj-$(CONFIG_IP_NF_NAT) += ip_nat.o15161617# conntrack netlink interface1718obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o···4241# the three instances of ip_tables4342obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o4443obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o4545-obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o ip_nat.o4444+obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o4645obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o47464847# matches
+1
net/ipv4/xfrm4_policy.c
···182182 case IPPROTO_UDP:183183 case IPPROTO_TCP:184184 case IPPROTO_SCTP:185185+ case IPPROTO_DCCP:185186 if (pskb_may_pull(skb, xprth + 4 - skb->data)) {186187 u16 *ports = (u16 *)xprth;187188
+115-18
net/ipv6/addrconf.c
···137137static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);138138static void addrconf_dad_timer(unsigned long data);139139static void addrconf_dad_completed(struct inet6_ifaddr *ifp);140140+static void addrconf_dad_run(struct inet6_dev *idev);140141static void addrconf_rs_timer(unsigned long data);141142static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);142143static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);···389388 }390389#endif391390391391+ if (netif_carrier_ok(dev))392392+ ndev->if_flags |= IF_READY;393393+392394 write_lock_bh(&addrconf_lock);393395 dev->ip6_ptr = ndev;394396 write_unlock_bh(&addrconf_lock);···419415 if ((idev = ipv6_add_dev(dev)) == NULL)420416 return NULL;421417 }418418+422419 if (dev->flags&IFF_UP)423420 ipv6_mc_up(idev);424421 return idev;···639634 }640635#endif641636642642- for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;643643- ifap = &ifa->if_next) {637637+ for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) {644638 if (ifa == ifp) {645639 *ifap = ifa->if_next;646640 __in6_ifa_put(ifp);···647643 if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0)648644 break;649645 deleted = 1;646646+ continue;650647 } else if (ifp->flags & IFA_F_PERMANENT) {651648 if (ipv6_prefix_equal(&ifa->addr, &ifp->addr,652649 ifp->prefix_len)) {···671666 }672667 }673668 }669669+ ifap = &ifa->if_next;674670 }675671 write_unlock_bh(&idev->lock);676672···909903910904 score.addr_type = __ipv6_addr_type(&ifa->addr);911905912912- /* Rule 0: Candidate Source Address (section 4)906906+ /* Rule 0:907907+ * - Tentative Address (RFC2462 section 5.4)908908+ * - A tentative address is not considered909909+ * "assigned to an interface" in the traditional910910+ * sense.911911+ * - Candidate Source Address (section 4)913912 * - In any case, anycast addresses, multicast914913 * addresses, and the unspecified address MUST915914 * NOT be included in a candidate set.916915 */916916+ if (ifa->flags & IFA_F_TENTATIVE)917917+ continue;917918 if (unlikely(score.addr_type == IPV6_ADDR_ANY ||918919 score.addr_type & IPV6_ADDR_MULTICAST)) {919920 LIMIT_NETDEBUG(KERN_DEBUG···1228121512291216/* Gets referenced address, destroys ifaddr */1230121712311231-void addrconf_dad_failure(struct inet6_ifaddr *ifp)12181218+void addrconf_dad_stop(struct inet6_ifaddr *ifp)12321219{12331233- if (net_ratelimit())12341234- printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name);12351220 if (ifp->flags&IFA_F_PERMANENT) {12361221 spin_lock_bh(&ifp->lock);12371222 addrconf_del_timer(ifp);···12551244 ipv6_del_addr(ifp);12561245}1257124612471247+void addrconf_dad_failure(struct inet6_ifaddr *ifp)12481248+{12491249+ if (net_ratelimit())12501250+ printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name);12511251+ addrconf_dad_stop(ifp);12521252+}1258125312591254/* Join to solicited addr multicast group. */12601255···16131596 not good.16141597 */16151598 if (valid_lft >= 0x7FFFFFFF/HZ)16161616- rt_expires = 0;15991599+ rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ);16171600 else16181618- rt_expires = jiffies + valid_lft * HZ;16011601+ rt_expires = valid_lft * HZ;16021602+16031603+ /*16041604+ * We convert this (in jiffies) to clock_t later.16051605+ * Avoid arithmetic overflow there as well.16061606+ * Overflow can happen only if HZ < USER_HZ.16071607+ */16081608+ if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ)16091609+ rt_expires = 0x7FFFFFFF / USER_HZ;1619161016201611 if (pinfo->onlink) {16211612 struct rt6_info *rt;···16351610 ip6_del_rt(rt, NULL, NULL, NULL);16361611 rt = NULL;16371612 } else {16381638- rt->rt6i_expires = rt_expires;16131613+ rt->rt6i_expires = jiffies + rt_expires;16391614 }16401615 }16411616 } else if (valid_lft) {16421617 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len,16431643- dev, rt_expires, RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT);16181618+ dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT);16441619 }16451620 if (rt)16461621 dst_release(&rt->u.dst);···21502125{21512126 struct net_device *dev = (struct net_device *) data;21522127 struct inet6_dev *idev = __in6_dev_get(dev);21282128+ int run_pending = 0;2153212921542130 switch(event) {21552131 case NETDEV_UP:21322132+ case NETDEV_CHANGE:21332133+ if (event == NETDEV_UP) {21342134+ if (!netif_carrier_ok(dev)) {21352135+ /* device is not ready yet. */21362136+ printk(KERN_INFO21372137+ "ADDRCONF(NETDEV_UP): %s: "21382138+ "link is not ready\n",21392139+ dev->name);21402140+ break;21412141+ }21422142+ } else {21432143+ if (!netif_carrier_ok(dev)) {21442144+ /* device is still not ready. */21452145+ break;21462146+ }21472147+21482148+ if (idev) {21492149+ if (idev->if_flags & IF_READY) {21502150+ /* device is already configured. */21512151+ break;21522152+ }21532153+ idev->if_flags |= IF_READY;21542154+ }21552155+21562156+ printk(KERN_INFO21572157+ "ADDRCONF(NETDEV_CHANGE): %s: "21582158+ "link becomes ready\n",21592159+ dev->name);21602160+21612161+ run_pending = 1;21622162+ }21632163+21562164 switch(dev->type) {21572165 case ARPHRD_SIT:21582166 addrconf_sit_config(dev);···22022144 break;22032145 };22042146 if (idev) {21472147+ if (run_pending)21482148+ addrconf_dad_run(idev);21492149+22052150 /* If the MTU changed during the interface down, when the22062151 interface up, the changed MTU must be reflected in the22072152 idev as well as routers.···22392178 */22402179 addrconf_ifdown(dev, event != NETDEV_DOWN);22412180 break;22422242- case NETDEV_CHANGE:22432243- break;21812181+22442182 case NETDEV_CHANGENAME:22452183#ifdef CONFIG_SYSCTL22462184 if (idev) {···2320226023212261 /* Step 3: clear flags for stateless addrconf */23222262 if (how != 1)23232323- idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD);22632263+ idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);2324226423252265 /* Step 4: clear address list */23262266#ifdef CONFIG_IPV6_PRIVACY···24292369/*24302370 * Duplicate Address Detection24312371 */23722372+static void addrconf_dad_kick(struct inet6_ifaddr *ifp)23732373+{23742374+ unsigned long rand_num;23752375+ struct inet6_dev *idev = ifp->idev;23762376+23772377+ rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1);23782378+ ifp->probes = idev->cnf.dad_transmits;23792379+ addrconf_mod_timer(ifp, AC_DAD, rand_num);23802380+}23812381+24322382static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)24332383{24342384 struct inet6_dev *idev = ifp->idev;24352385 struct net_device *dev = idev->dev;24362436- unsigned long rand_num;2437238624382387 addrconf_join_solict(dev, &ifp->addr);24392388···24512382 flags);2452238324532384 net_srandom(ifp->addr.s6_addr32[3]);24542454- rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1);2455238524562386 read_lock_bh(&idev->lock);24572387 if (ifp->dead)···24672399 return;24682400 }2469240124702470- ifp->probes = idev->cnf.dad_transmits;24712471- addrconf_mod_timer(ifp, AC_DAD, rand_num);24722472-24022402+ if (!(idev->if_flags & IF_READY)) {24032403+ spin_unlock_bh(&ifp->lock);24042404+ read_unlock_bh(&idev->lock);24052405+ /*24062406+ * If the defice is not ready:24072407+ * - keep it tentative if it is a permanent address.24082408+ * - otherwise, kill it.24092409+ */24102410+ in6_ifa_hold(ifp);24112411+ addrconf_dad_stop(ifp);24122412+ return;24132413+ }24142414+ addrconf_dad_kick(ifp);24732415 spin_unlock_bh(&ifp->lock);24742416out:24752417 read_unlock_bh(&idev->lock);···25602482 addrconf_mod_timer(ifp, AC_RS, ifp->idev->cnf.rtr_solicit_interval);25612483 spin_unlock_bh(&ifp->lock);25622484 }24852485+}24862486+24872487+static void addrconf_dad_run(struct inet6_dev *idev) {24882488+ struct inet6_ifaddr *ifp;24892489+24902490+ read_lock_bh(&idev->lock);24912491+ for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) {24922492+ spin_lock_bh(&ifp->lock);24932493+ if (!(ifp->flags & IFA_F_TENTATIVE)) {24942494+ spin_unlock_bh(&ifp->lock);24952495+ continue;24962496+ }24972497+ spin_unlock_bh(&ifp->lock);24982498+ addrconf_dad_kick(ifp);24992499+ }25002500+ read_unlock_bh(&idev->lock);25632501}2564250225652503#ifdef CONFIG_PROC_FS···27832689 in6_ifa_hold(ifpub);27842690 spin_unlock(&ifp->lock);27852691 read_unlock(&addrconf_hash_lock);26922692+ spin_lock(&ifpub->lock);26932693+ ifpub->regen_count = 0;26942694+ spin_unlock(&ifpub->lock);27862695 ipv6_create_tempaddr(ifpub, ifp);27872696 in6_ifa_put(ifpub);27882697 in6_ifa_put(ifp);
+14-2
net/ipv6/icmp.c
···328328 iif = skb->dev->ifindex;329329330330 /*331331- * Must not send if we know that source is Anycast also.332332- * for now we don't know that.331331+ * Must not send error if the source does not uniquely332332+ * identify a single node (RFC2463 Section 2.4).333333+ * We check unspecified / multicast addresses here,334334+ * and anycast addresses will be checked later.333335 */334336 if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) {335337 LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n");···375373 err = ip6_dst_lookup(sk, &dst, &fl);376374 if (err)377375 goto out;376376+377377+ /*378378+ * We won't send icmp if the destination is known379379+ * anycast.380380+ */381381+ if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) {382382+ LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n");383383+ goto out_dst_release;384384+ }385385+378386 if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)379387 goto out;380388
+111-31
net/ipv6/mcast.c
···170170#define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value)171171#define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value)172172173173-#define IPV6_MLD_MAX_MSF 10173173+#define IPV6_MLD_MAX_MSF 64174174175175int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF;176176···224224225225 mc_lst->ifindex = dev->ifindex;226226 mc_lst->sfmode = MCAST_EXCLUDE;227227+ mc_lst->sflock = RW_LOCK_UNLOCKED;227228 mc_lst->sflist = NULL;228229229230 /*···361360 struct ip6_sf_socklist *psl;362361 int i, j, rv;363362 int leavegroup = 0;363363+ int pmclocked = 0;364364 int err;365365366366 if (pgsr->gsr_group.ss_family != AF_INET6 ||···404402 ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0);405403 pmc->sfmode = omode;406404 }405405+406406+ write_lock_bh(&pmc->sflock);407407+ pmclocked = 1;407408408409 psl = pmc->sflist;409410 if (!add) {···480475 /* update the interface list */481476 ip6_mc_add_src(idev, group, omode, 1, source, 1);482477done:478478+ if (pmclocked)479479+ write_unlock_bh(&pmc->sflock);483480 read_unlock_bh(&ipv6_sk_mc_lock);484481 read_unlock_bh(&idev->lock);485482 in6_dev_put(idev);···517510 dev = idev->dev;518511519512 err = 0;513513+ read_lock_bh(&ipv6_sk_mc_lock);514514+520515 if (gsf->gf_fmode == MCAST_INCLUDE && gsf->gf_numsrc == 0) {521516 leavegroup = 1;522517 goto done;···558549 newpsl = NULL;559550 (void) ip6_mc_add_src(idev, group, gsf->gf_fmode, 0, NULL, 0);560551 }552552+553553+ write_lock_bh(&pmc->sflock);561554 psl = pmc->sflist;562555 if (psl) {563556 (void) ip6_mc_del_src(idev, group, pmc->sfmode,···569558 (void) ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0);570559 pmc->sflist = newpsl;571560 pmc->sfmode = gsf->gf_fmode;561561+ write_unlock_bh(&pmc->sflock);572562 err = 0;573563done:564564+ read_unlock_bh(&ipv6_sk_mc_lock);574565 read_unlock_bh(&idev->lock);575566 in6_dev_put(idev);576567 dev_put(dev);···605592 dev = idev->dev;606593607594 err = -EADDRNOTAVAIL;595595+ /*596596+ * changes to the ipv6_mc_list require the socket lock and597597+ * a read lock on ip6_sk_mc_lock. We have the socket lock,598598+ * so reading the list is safe.599599+ */608600609601 for (pmc=inet6->ipv6_mc_list; pmc; pmc=pmc->next) {610602 if (pmc->ifindex != gsf->gf_interface)···632614 copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) {633615 return -EFAULT;634616 }617617+ /* changes to psl require the socket lock, a read lock on618618+ * on ipv6_sk_mc_lock and a write lock on pmc->sflock. We619619+ * have the socket lock, so reading here is safe.620620+ */635621 for (i=0; i<copycount; i++) {636622 struct sockaddr_in6 *psin6;637623 struct sockaddr_storage ss;···672650 read_unlock(&ipv6_sk_mc_lock);673651 return 1;674652 }653653+ read_lock(&mc->sflock);675654 psl = mc->sflist;676655 if (!psl) {677656 rv = mc->sfmode == MCAST_EXCLUDE;···688665 if (mc->sfmode == MCAST_EXCLUDE && i < psl->sl_count)689666 rv = 0;690667 }668668+ read_unlock(&mc->sflock);691669 read_unlock(&ipv6_sk_mc_lock);692670693671 return rv;···10921068 ma->mca_flags |= MAF_TIMER_RUNNING;10931069}1094107010951095-static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,10711071+/* mark EXCLUDE-mode sources */10721072+static int mld_xmarksources(struct ifmcaddr6 *pmc, int nsrcs,10961073 struct in6_addr *srcs)10971074{10981075 struct ip6_sf_list *psf;···11031078 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {11041079 if (scount == nsrcs)11051080 break;11061106- for (i=0; i<nsrcs; i++)10811081+ for (i=0; i<nsrcs; i++) {10821082+ /* skip inactive filters */10831083+ if (pmc->mca_sfcount[MCAST_INCLUDE] ||10841084+ pmc->mca_sfcount[MCAST_EXCLUDE] !=10851085+ psf->sf_count[MCAST_EXCLUDE])10861086+ continue;10871087+ if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) {10881088+ scount++;10891089+ break;10901090+ }10911091+ }10921092+ }10931093+ pmc->mca_flags &= ~MAF_GSQUERY;10941094+ if (scount == nsrcs) /* all sources excluded */10951095+ return 0;10961096+ return 1;10971097+}10981098+10991099+static int mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,11001100+ struct in6_addr *srcs)11011101+{11021102+ struct ip6_sf_list *psf;11031103+ int i, scount;11041104+11051105+ if (pmc->mca_sfmode == MCAST_EXCLUDE)11061106+ return mld_xmarksources(pmc, nsrcs, srcs);11071107+11081108+ /* mark INCLUDE-mode sources */11091109+11101110+ scount = 0;11111111+ for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {11121112+ if (scount == nsrcs)11131113+ break;11141114+ for (i=0; i<nsrcs; i++) {11071115 if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) {11081116 psf->sf_gsresp = 1;11091117 scount++;11101118 break;11111119 }11201120+ }11121121 }11221122+ if (!scount) {11231123+ pmc->mca_flags &= ~MAF_GSQUERY;11241124+ return 0;11251125+ }11261126+ pmc->mca_flags |= MAF_GSQUERY;11271127+ return 1;11131128}1114112911151130int igmp6_event_query(struct sk_buff *skb)···12321167 /* mark sources to include, if group & source-specific */12331168 if (mlh2->nsrcs != 0) {12341169 if (!pskb_may_pull(skb, srcs_offset + 12351235- mlh2->nsrcs * sizeof(struct in6_addr))) {11701170+ ntohs(mlh2->nsrcs) * sizeof(struct in6_addr))) {12361171 in6_dev_put(idev);12371172 return -EINVAL;12381173 }···12681203 else12691204 ma->mca_flags &= ~MAF_GSQUERY;12701205 }12711271- if (ma->mca_flags & MAF_GSQUERY)12721272- mld_marksources(ma, ntohs(mlh2->nsrcs),12731273- mlh2->srcs);12741274- igmp6_group_queried(ma, max_delay);12061206+ if (!(ma->mca_flags & MAF_GSQUERY) ||12071207+ mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs))12081208+ igmp6_group_queried(ma, max_delay);12751209 spin_unlock_bh(&ma->mca_lock);12761210 if (group_type != IPV6_ADDR_ANY)12771211 break;···13451281 case MLD2_MODE_IS_EXCLUDE:13461282 if (gdeleted || sdeleted)13471283 return 0;13481348- return !((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp);12841284+ if (!((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp)) {12851285+ if (pmc->mca_sfmode == MCAST_INCLUDE)12861286+ return 1;12871287+ /* don't include if this source is excluded12881288+ * in all filters12891289+ */12901290+ if (psf->sf_count[MCAST_INCLUDE])12911291+ return 0;12921292+ return pmc->mca_sfcount[MCAST_EXCLUDE] ==12931293+ psf->sf_count[MCAST_EXCLUDE];12941294+ }12951295+ return 0;13491296 case MLD2_CHANGE_TO_INCLUDE:13501297 if (gdeleted || sdeleted)13511298 return 0;···15251450 struct mld2_report *pmr;15261451 struct mld2_grec *pgr = NULL;15271452 struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list;15281528- int scount, first, isquery, truncate;14531453+ int scount, stotal, first, isquery, truncate;1529145415301455 if (pmc->mca_flags & MAF_NOREPORT)15311456 return skb;···15351460 truncate = type == MLD2_MODE_IS_EXCLUDE ||15361461 type == MLD2_CHANGE_TO_EXCLUDE;1537146214631463+ stotal = scount = 0;14641464+15381465 psf_list = sdeleted ? &pmc->mca_tomb : &pmc->mca_sources;1539146615401540- if (!*psf_list) {15411541- if (type == MLD2_ALLOW_NEW_SOURCES ||15421542- type == MLD2_BLOCK_OLD_SOURCES)15431543- return skb;15441544- if (pmc->mca_crcount || isquery) {15451545- /* make sure we have room for group header and at15461546- * least one source.15471547- */15481548- if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+15491549- sizeof(struct in6_addr)) {15501550- mld_sendpack(skb);15511551- skb = NULL; /* add_grhead will get a new one */15521552- }15531553- skb = add_grhead(skb, pmc, type, &pgr);15541554- }15551555- return skb;15561556- }14671467+ if (!*psf_list)14681468+ goto empty_source;14691469+15571470 pmr = skb ? (struct mld2_report *)skb->h.raw : NULL;1558147115591472 /* EX and TO_EX get a fresh packet, if needed */···15541491 }15551492 }15561493 first = 1;15571557- scount = 0;15581494 psf_prev = NULL;15591495 for (psf=*psf_list; psf; psf=psf_next) {15601496 struct in6_addr *psrc;···15871525 }15881526 psrc = (struct in6_addr *)skb_put(skb, sizeof(*psrc));15891527 *psrc = psf->sf_addr;15901590- scount++;15281528+ scount++; stotal++;15911529 if ((type == MLD2_ALLOW_NEW_SOURCES ||15921530 type == MLD2_BLOCK_OLD_SOURCES) && psf->sf_crcount) {15931531 psf->sf_crcount--;···16011539 }16021540 }16031541 psf_prev = psf;15421542+ }15431543+15441544+empty_source:15451545+ if (!stotal) {15461546+ if (type == MLD2_ALLOW_NEW_SOURCES ||15471547+ type == MLD2_BLOCK_OLD_SOURCES)15481548+ return skb;15491549+ if (pmc->mca_crcount || isquery) {15501550+ /* make sure we have room for group header */15511551+ if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)) {15521552+ mld_sendpack(skb);15531553+ skb = NULL; /* add_grhead will get a new one */15541554+ }15551555+ skb = add_grhead(skb, pmc, type, &pgr);15561556+ }16041557 }16051558 if (pgr)16061559 pgr->grec_nsrcs = htons(scount);···16981621 skb = add_grec(skb, pmc, dtype, 1, 1);16991622 }17001623 if (pmc->mca_crcount) {17011701- pmc->mca_crcount--;17021624 if (pmc->mca_sfmode == MCAST_EXCLUDE) {17031625 type = MLD2_CHANGE_TO_INCLUDE;17041626 skb = add_grec(skb, pmc, type, 1, 0);17051627 }16281628+ pmc->mca_crcount--;17061629 if (pmc->mca_crcount == 0) {17071630 mld_clear_zeros(&pmc->mca_tomb);17081631 mld_clear_zeros(&pmc->mca_sources);···1736165917371660 /* filter mode changes */17381661 if (pmc->mca_crcount) {17391739- pmc->mca_crcount--;17401662 if (pmc->mca_sfmode == MCAST_EXCLUDE)17411663 type = MLD2_CHANGE_TO_EXCLUDE;17421664 else17431665 type = MLD2_CHANGE_TO_INCLUDE;17441666 skb = add_grec(skb, pmc, type, 0, 0);16671667+ pmc->mca_crcount--;17451668 }17461669 spin_unlock_bh(&pmc->mca_lock);17471670 }···21002023{21012024 int err;2102202520262026+ /* callers have the socket lock and a write lock on ipv6_sk_mc_lock,20272027+ * so no other readers or writers of iml or its sflist20282028+ */21032029 if (iml->sflist == 0) {21042030 /* any-source empty exclude case */21052031 return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
+1-1
net/ipv6/netfilter/Kconfig
···211211212212config IP6_NF_TARGET_NFQUEUE213213 tristate "NFQUEUE Target Support"214214- depends on IP_NF_IPTABLES214214+ depends on IP6_NF_IPTABLES215215 help216216 This Target replaced the old obsolete QUEUE target.217217
···214214 case IPPROTO_UDP:215215 case IPPROTO_TCP:216216 case IPPROTO_SCTP:217217+ case IPPROTO_DCCP:217218 if (pskb_may_pull(skb, skb->nh.raw + offset + 4 - skb->data)) {218219 u16 *ports = (u16 *)exthdr;219220
+3-3
net/netrom/nr_in.c
···9999 break;100100101101 case NR_RESET:102102- if (sysctl_netrom_reset_circuit);102102+ if (sysctl_netrom_reset_circuit)103103 nr_disconnect(sk, ECONNRESET);104104 break;105105···130130 break;131131132132 case NR_RESET:133133- if (sysctl_netrom_reset_circuit);133133+ if (sysctl_netrom_reset_circuit)134134 nr_disconnect(sk, ECONNRESET);135135 break;136136···265265 break;266266267267 case NR_RESET:268268- if (sysctl_netrom_reset_circuit);268268+ if (sysctl_netrom_reset_circuit)269269 nr_disconnect(sk, ECONNRESET);270270 break;271271
+3-11
net/sctp/socket.c
···156156 sizeof(struct sk_buff) +157157 sizeof(struct sctp_chunk);158158159159- sk->sk_wmem_queued += SCTP_DATA_SNDSIZE(chunk) +160160- sizeof(struct sk_buff) +161161- sizeof(struct sctp_chunk);162162-163159 atomic_add(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc);164160}165161···44224426 * tcp_poll(). Note that, based on these implementations, we don't44234427 * lock the socket in this function, even though it seems that,44244428 * ideally, locking or some other mechanisms can be used to ensure44254425- * the integrity of the counters (sndbuf and wmem_queued) used44294429+ * the integrity of the counters (sndbuf and wmem_alloc) used44264430 * in this place. We assume that we don't need locks either until proven44274431 * otherwise.44284432 *···48294833 sizeof(struct sk_buff) +48304834 sizeof(struct sctp_chunk);4831483548324832- sk->sk_wmem_queued -= SCTP_DATA_SNDSIZE(chunk) +48334833- sizeof(struct sk_buff) +48344834- sizeof(struct sctp_chunk);48354835-48364836 atomic_sub(sizeof(struct sctp_chunk), &sk->sk_wmem_alloc);4837483748384838 sock_wfree(skb);···4912492049134921/* Is there any sndbuf space available on the socket?49144922 *49154915- * Note that wmem_queued is the sum of the send buffers on all of the49234923+ * Note that sk_wmem_alloc is the sum of the send buffers on all of the49164924 * associations on the same socket. For a UDP-style socket with49174925 * multiple associations, it is possible for it to be "unwriteable"49184926 * prematurely. I assume that this is acceptable because···49254933{49264934 int amt = 0;4927493549284928- amt = sk->sk_sndbuf - sk->sk_wmem_queued;49364936+ amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);49294937 if (amt < 0)49304938 amt = 0;49314939 return amt;
+4-2
net/sunrpc/auth_gss/auth_gss.c
···638638 gss_msg);639639 atomic_inc(&gss_msg->count);640640 gss_unhash_msg(gss_msg);641641- if (msg->errno == -ETIMEDOUT || msg->errno == -EPIPE) {641641+ if (msg->errno == -ETIMEDOUT) {642642 unsigned long now = jiffies;643643 if (time_after(now, ratelimit)) {644644 printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n"···786786 cred->gc_flags = 0;787787 cred->gc_base.cr_ops = &gss_credops;788788 cred->gc_service = gss_auth->service;789789- err = gss_create_upcall(gss_auth, cred);789789+ do {790790+ err = gss_create_upcall(gss_auth, cred);791791+ } while (err == -EAGAIN);790792 if (err < 0)791793 goto out_err;792794
+2-2
net/sunrpc/rpc_pipe.c
···174174 goto out;175175 msg = (struct rpc_pipe_msg *)filp->private_data;176176 if (msg != NULL) {177177- msg->errno = -EPIPE;177177+ msg->errno = -EAGAIN;178178 list_del_init(&msg->list);179179 rpci->ops->destroy_msg(msg);180180 }···183183 if (filp->f_mode & FMODE_READ)184184 rpci->nreaders --;185185 if (!rpci->nreaders)186186- __rpc_purge_upcall(inode, -EPIPE);186186+ __rpc_purge_upcall(inode, -EAGAIN);187187 if (rpci->ops->release_pipe)188188 rpci->ops->release_pipe(inode);189189out:
···346346 struct xfrm_policy *pol, **p;347347 struct xfrm_policy *delpol = NULL;348348 struct xfrm_policy **newpos = NULL;349349+ struct dst_entry *gc_list;349350350351 write_lock_bh(&xfrm_policy_lock);351352 for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) {···382381 xfrm_pol_hold(policy);383382 write_unlock_bh(&xfrm_policy_lock);384383385385- if (delpol) {384384+ if (delpol)386385 xfrm_policy_kill(delpol);386386+387387+ read_lock_bh(&xfrm_policy_lock);388388+ gc_list = NULL;389389+ for (policy = policy->next; policy; policy = policy->next) {390390+ struct dst_entry *dst;391391+392392+ write_lock(&policy->lock);393393+ dst = policy->bundles;394394+ if (dst) {395395+ struct dst_entry *tail = dst;396396+ while (tail->next)397397+ tail = tail->next;398398+ tail->next = gc_list;399399+ gc_list = dst;400400+401401+ policy->bundles = NULL;402402+ }403403+ write_unlock(&policy->lock);387404 }405405+ read_unlock_bh(&xfrm_policy_lock);406406+407407+ while (gc_list) {408408+ struct dst_entry *dst = gc_list;409409+410410+ gc_list = dst->next;411411+ dst_free(dst);412412+ }413413+388414 return 0;389415}390416EXPORT_SYMBOL(xfrm_policy_insert);···10421014}10431015EXPORT_SYMBOL(__xfrm_route_forward);1044101610451045-/* Optimize later using cookies and generation ids. */10461046-10471017static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie)10481018{10491049- if (!stale_bundle(dst))10501050- return dst;10511051-10191019+ /* If it is marked obsolete, which is how we even get here,10201020+ * then we have purged it from the policy bundle list and we10211021+ * did that for a good reason.10221022+ */10521023 return NULL;10531024}10541025···11291102{11301103 xfrm_prune_bundles(stale_bundle);11311104 return 0;11051105+}11061106+11071107+static int always_true(struct dst_entry *dst)11081108+{11091109+ return 1;11101110+}11111111+11121112+void xfrm_flush_all_bundles(void)11131113+{11141114+ xfrm_prune_bundles(always_true);11321115}1133111611341117void xfrm_init_pmtu(struct dst_entry *dst)
+5
net/xfrm/xfrm_state.c
···431431 spin_lock_bh(&xfrm_state_lock);432432 __xfrm_state_insert(x);433433 spin_unlock_bh(&xfrm_state_lock);434434+435435+ xfrm_flush_all_bundles();434436}435437EXPORT_SYMBOL(xfrm_state_insert);436438···479477out:480478 spin_unlock_bh(&xfrm_state_lock);481479 xfrm_state_put_afinfo(afinfo);480480+481481+ if (!err)482482+ xfrm_flush_all_bundles();482483483484 if (x1) {484485 xfrm_state_delete(x1);