···11VERSION = 222PATCHLEVEL = 633SUBLEVEL = 1544-EXTRAVERSION =-rc555-NAME=Affluent Albatross44+EXTRAVERSION =-rc655+NAME=Sliding Snow Leopard6677# *DOCUMENTATION*88# To see a list of typical targets execute "make help"
···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
+1-1
arch/i386/mm/ioremap.c
···245245 addr < phys_to_virt(ISA_END_ADDRESS))246246 return;247247248248- addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);248248+ addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr);249249250250 /* Use the vm area unlocked, assuming the caller251251 ensures there isn't another iounmap for the same address
···113113CONFIG_IA64_SGI_SN_XP=m114114CONFIG_FORCE_MAX_ZONEORDER=17115115CONFIG_SMP=y116116-CONFIG_NR_CPUS=512116116+CONFIG_NR_CPUS=1024117117# CONFIG_HOTPLUG_CPU is not set118118CONFIG_SCHED_SMT=y119119CONFIG_PREEMPT=y
+29
arch/ia64/kernel/time.c
···249249 */250250 set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);251251}252252+253253+#define SMALLUSECS 100254254+255255+void256256+udelay (unsigned long usecs)257257+{258258+ unsigned long start;259259+ unsigned long cycles;260260+ unsigned long smallusecs;261261+262262+ /*263263+ * Execute the non-preemptible delay loop (because the ITC might264264+ * not be synchronized between CPUS) in relatively short time265265+ * chunks, allowing preemption between the chunks.266266+ */267267+ while (usecs > 0) {268268+ smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs;269269+ preempt_disable();270270+ cycles = smallusecs*local_cpu_data->cyc_per_usec;271271+ start = ia64_get_itc();272272+273273+ while (ia64_get_itc() - start < cycles)274274+ cpu_relax();275275+276276+ preempt_enable();277277+ usecs -= smallusecs;278278+ }279279+}280280+EXPORT_SYMBOL(udelay);
+3-3
arch/ia64/kernel/uncached.c
···5353 if ((status != PAL_VISIBILITY_OK) &&5454 (status != PAL_VISIBILITY_OK_REMOTE_NEEDED))5555 printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "5656- "CPU %i\n", status, get_cpu());5656+ "CPU %i\n", status, raw_smp_processor_id());5757}58585959···6363 status = ia64_pal_mc_drain();6464 if (status)6565 printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "6666- "CPU %i\n", status, get_cpu());6666+ "CPU %i\n", status, raw_smp_processor_id());6767}68686969···105105 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);106106107107 dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",108108- status, get_cpu());108108+ status, raw_smp_processor_id());109109110110 if (!status) {111111 status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
···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 return len;5656}57575858-static int led_write_proc(struct file *file, const char *buffer,5858+static int led_write_proc(struct file *file, const char __user *buffer,5959 unsigned long count, void *data)6060{6161 char *buf = NULL;
+1-1
arch/sparc/kernel/pcic.c
···161161static int pcic0_up;162162static struct linux_pcic pcic0;163163164164-void * __iomem pcic_regs;164164+void __iomem *pcic_regs;165165volatile int pcic_speculative;166166volatile int pcic_trapped;167167
···12121313ELF_ARCH := i386:x86-641414ELF_FORMAT := elf64-x86-641515+1616+# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.1717+1818+LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
···1818 * on some systems.1919 */20202121-#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field)2222-2321void __attribute__ ((__section__ (".__syscall_stub")))2422stub_clone_handler(void)2523{2424+ struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA;2625 long err;27262827 err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,···3435 if(err)3536 goto out;36373737- err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,3838- (long) &STUB_DATA(timer), 0);3838+ err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, 3939+ (long) &data->timer, 0);3940 if(err)4041 goto out;41424242- err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA,4343- UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,4444- MAP_FIXED | MAP_SHARED, STUB_DATA(fd),4545- STUB_DATA(offset));4343+ remap_stack(data->fd, data->offset);4444+ goto done;4545+4646 out:4747- /* save current result. Parent: pid; child: retcode of mmap */4848- STUB_DATA(err) = err;4747+ /* save current result. 4848+ * Parent: pid; 4949+ * child: retcode of mmap already saved and it jumps around this 5050+ * assignment5151+ */5252+ data->err = err;5353+ done:4954 trap_myself();5055}
-5
arch/um/scripts/Makefile.rules
···2121endef222223232424-# The stubs and unmap.o can't try to call mcount or update basic block data2525-define unprofile2626- $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))2727-endef2828-2924# cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If3025# so, it's considered to be a path relative to $(srcdir) rather than3126# $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from
+1-1
arch/x86_64/mm/ioremap.c
···263263 addr < phys_to_virt(ISA_END_ADDRESS))264264 return;265265266266- addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);266266+ addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr);267267 /* Use the vm area unlocked, assuming the caller268268 ensures there isn't another iounmap for the same address269269 in parallel. Reuse of the virtual address is prevented by
+1-1
arch/x86_64/pci/Makefile
···1111obj-$(CONFIG_ACPI) += acpi.o1212obj-y += legacy.o irq.o common.o1313# mmconfig has a 64bit special1414-obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o1414+obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o15151616obj-$(CONFIG_NUMA) += k8-bus.o1717
+7-7
arch/x86_64/pci/mmconfig.c
···1818/* Static virtual mapping of the MMCONFIG aperture */1919struct mmcfg_virt {2020 struct acpi_table_mcfg_config *cfg;2121- char *virt;2121+ char __iomem *virt;2222};2323static struct mmcfg_virt *pci_mmcfg_virt;24242525-static char *get_virt(unsigned int seg, unsigned bus)2525+static char __iomem *get_virt(unsigned int seg, unsigned bus)2626{2727 int cfg_num = -1;2828 struct acpi_table_mcfg_config *cfg;···4343 }4444}45454646-static char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)4646+static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)4747{4848- char *addr;4848+ char __iomem *addr;4949 if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))5050 return NULL;5151 addr = get_virt(seg, bus);···5757static int pci_mmcfg_read(unsigned int seg, unsigned int bus,5858 unsigned int devfn, int reg, int len, u32 *value)5959{6060- char *addr;6060+ char __iomem *addr;61616262 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */6363 if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))···8585static int pci_mmcfg_write(unsigned int seg, unsigned int bus,8686 unsigned int devfn, int reg, int len, u32 value)8787{8888- char *addr;8888+ char __iomem *addr;89899090 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */9191 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))···127127 int i;128128 for (i = 0; i < 32; i++) {129129 u32 val1;130130- char *addr;130130+ char __iomem *addr;131131132132 pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1);133133 if (val1 == 0xffffffff)
···687687688688config RTC689689 tristate "Enhanced Real Time Clock Support"690690- depends on !PPC32 && !PARISC && !IA64 && !M68K690690+ depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || 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
···6969typedef struct _MW_READWRITE {7070 unsigned short usDspAddress; /* The dsp address */7171 unsigned long ulDataLength; /* The size in bytes of the data or user buffer */7272- void *pBuf; /* Input:variable sized buffer */7272+ void __user *pBuf; /* Input:variable sized buffer */7373} MW_READWRITE, *pMW_READWRITE;74747575#define IOCTL_MW_RESET _IO(MWAVE_MINOR,1)
+7-6
drivers/char/pcmcia/cm4000_cs.c
···14441444 dev_link_t *link;14451445 int size;14461446 int rc;14471447+ void __user *argp = (void __user *)arg;14471448#ifdef PCMCIA_DEBUG14481449 char *ioctl_names[CM_IOC_MAXNR + 1] = {14491450 [_IOC_NR(CM_IOCGSTATUS)] "CM_IOCGSTATUS",···14821481 _IOC_DIR(cmd), _IOC_READ, _IOC_WRITE, size, cmd);1483148214841483 if (_IOC_DIR(cmd) & _IOC_READ) {14851485- if (!access_ok(VERIFY_WRITE, (void *)arg, size))14841484+ if (!access_ok(VERIFY_WRITE, argp, size))14861485 return -EFAULT;14871486 }14881487 if (_IOC_DIR(cmd) & _IOC_WRITE) {14891489- if (!access_ok(VERIFY_READ, (void *)arg, size))14881488+ if (!access_ok(VERIFY_READ, argp, size))14901489 return -EFAULT;14911490 }14921491···15071506 status |= CM_NO_READER;15081507 if (test_bit(IS_BAD_CARD, &dev->flags))15091508 status |= CM_BAD_CARD;15101510- if (copy_to_user((int *)arg, &status, sizeof(int)))15091509+ if (copy_to_user(argp, &status, sizeof(int)))15111510 return -EFAULT;15121511 }15131512 return 0;15141513 case CM_IOCGATR:15151514 DEBUGP(4, dev, "... in CM_IOCGATR\n");15161515 {15171517- struct atreq *atreq = (struct atreq *) arg;15161516+ struct atreq __user *atreq = argp;15181517 int tmp;15191518 /* allow nonblocking io and being interrupted */15201519 if (wait_event_interruptible···15981597 {15991598 struct ptsreq krnptsreq;1600159916011601- if (copy_from_user(&krnptsreq, (struct ptsreq *) arg,16001600+ if (copy_from_user(&krnptsreq, argp,16021601 sizeof(struct ptsreq)))16031602 return -EFAULT;16041603···16421641 int old_pc_debug = 0;1643164216441643 old_pc_debug = pc_debug;16451645- if (copy_from_user(&pc_debug, (int *)arg, sizeof(int)))16441644+ if (copy_from_user(&pc_debug, argp, sizeof(int)))16461645 return -EFAULT;1647164616481647 if (old_pc_debug != pc_debug)
+8-7
drivers/char/watchdog/booke_wdt.c
···7272/*7373 * booke_wdt_write:7474 */7575-static ssize_t booke_wdt_write (struct file *file, const char *buf,7575+static ssize_t booke_wdt_write (struct file *file, const char __user *buf,7676 size_t count, loff_t *ppos)7777{7878 booke_wdt_ping();···9292 unsigned int cmd, unsigned long arg)9393{9494 u32 tmp = 0;9595+ u32 __user *p = (u32 __user *)arg;95969697 switch (cmd) {9798 case WDIOC_GETSUPPORT:9898- if (copy_to_user ((struct watchdog_info *) arg, &ident,9999+ if (copy_to_user ((struct watchdog_info __user *) arg, &ident,99100 sizeof(struct watchdog_info)))100101 return -EFAULT;101102 case WDIOC_GETSTATUS:102102- return put_user(ident.options, (u32 *) arg);103103+ return put_user(ident.options, p);103104 case WDIOC_GETBOOTSTATUS:104105 /* XXX: something is clearing TSR */105106 tmp = mfspr(SPRN_TSR) & TSR_WRS(3);···110109 booke_wdt_ping();111110 return 0;112111 case WDIOC_SETTIMEOUT:113113- if (get_user(booke_wdt_period, (u32 *) arg))112112+ if (get_user(booke_wdt_period, p))114113 return -EFAULT;115114 mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period));116115 return 0;117116 case WDIOC_GETTIMEOUT:118118- return put_user(booke_wdt_period, (u32 *) arg);117117+ return put_user(booke_wdt_period, p);119118 case WDIOC_SETOPTIONS:120120- if (get_user(tmp, (u32 *) arg))119119+ if (get_user(tmp, p))121120 return -EINVAL;122121 if (tmp == WDIOS_ENABLECARD) {123122 booke_wdt_ping();···173172 int ret = 0;174173175174 printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");176176- ident.firmware_version = cpu_specs[0].pvr_value;175175+ ident.firmware_version = cur_cpu_spec->pvr_value;177176178177 ret = misc_register(&booke_wdt_miscdev);179178 if (ret) {
+1-1
drivers/char/watchdog/wdrtas.c
···320320wdrtas_ioctl(struct inode *inode, struct file *file,321321 unsigned int cmd, unsigned long arg)322322{323323- int __user *argp = (void *)arg;323323+ int __user *argp = (void __user *)arg;324324 int i;325325 static struct watchdog_info wdinfo = {326326 .options = WDRTAS_SUPPORTED_MASK,
···4141 /* this nodes state */4242 unsigned in_bus_reset:1;4343 unsigned is_shutdown:1;4444+ unsigned resume_packet_sent:1;44454546 /* this nodes' duties on the bus */4647 unsigned is_root:1;
+57-10
drivers/ieee1394/nodemgr.c
···13491349}135013501351135113521352+/* Write the BROADCAST_CHANNEL as per IEEE1394a 8.3.2.3.11 and 8.4.2.3. This13531353+ * seems like an optional service but in the end it is practically mandatory13541354+ * as a consequence of these clauses.13551355+ *13561356+ * Note that we cannot do a broadcast write to all nodes at once because some13571357+ * pre-1394a devices would hang. */13581358+static void nodemgr_irm_write_bc(struct node_entry *ne, int generation)13591359+{13601360+ const u64 bc_addr = (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL);13611361+ quadlet_t bc_remote, bc_local;13621362+ int ret;13631363+13641364+ if (!ne->host->is_irm || ne->generation != generation ||13651365+ ne->nodeid == ne->host->node_id)13661366+ return;13671367+13681368+ bc_local = cpu_to_be32(ne->host->csr.broadcast_channel);13691369+13701370+ /* Check if the register is implemented and 1394a compliant. */13711371+ ret = hpsb_read(ne->host, ne->nodeid, generation, bc_addr, &bc_remote,13721372+ sizeof(bc_remote));13731373+ if (!ret && bc_remote & cpu_to_be32(0x80000000) &&13741374+ bc_remote != bc_local)13751375+ hpsb_node_write(ne, bc_addr, &bc_local, sizeof(bc_local));13761376+}13771377+13781378+13521379static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation)13531380{13541381 struct device *dev;···13861359 dev = get_device(&ne->device);13871360 if (!dev)13881361 return;13621362+13631363+ nodemgr_irm_write_bc(ne, generation);1389136413901365 /* If "needs_probe", then this is either a new or changed node we13911366 * rescan totally. If the generation matches for an existing node···14421413 return;14431414}1444141514451445-/* Because we are a 1394a-2000 compliant IRM, we need to inform all the other14461446- * nodes of the broadcast channel. (Really we're only setting the validity14471447- * bit). Other IRM responsibilities go in here as well. */14161416+static int nodemgr_send_resume_packet(struct hpsb_host *host)14171417+{14181418+ struct hpsb_packet *packet;14191419+ int ret = 1;14201420+14211421+ packet = hpsb_make_phypacket(host,14221422+ 0x003c0000 | NODEID_TO_NODE(host->node_id) << 24);14231423+ if (packet) {14241424+ packet->no_waiter = 1;14251425+ packet->generation = get_hpsb_generation(host);14261426+ ret = hpsb_send_packet(packet);14271427+ }14281428+ if (ret)14291429+ HPSB_WARN("fw-host%d: Failed to broadcast resume packet",14301430+ host->id);14311431+ return ret;14321432+}14331433+14341434+/* Perform a few high-level IRM responsibilities. */14481435static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)14491436{14501437 quadlet_t bc;···14691424 if (!host->is_irm || host->irm_id == (nodeid_t)-1)14701425 return 1;1471142614721472- host->csr.broadcast_channel |= 0x40000000; /* set validity bit */14731473-14741474- bc = cpu_to_be32(host->csr.broadcast_channel);14751475-14761476- hpsb_write(host, LOCAL_BUS | ALL_NODES, get_hpsb_generation(host),14771477- (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL),14781478- &bc, sizeof(quadlet_t));14271427+ /* We are a 1394a-2000 compliant IRM. Set the validity bit. */14281428+ host->csr.broadcast_channel |= 0x40000000;1479142914801430 /* If there is no bus manager then we should set the root node's14811431 * force_root bit to promote bus stability per the 1394···15021462 return 0;15031463 }15041464 }14651465+14661466+ /* Some devices suspend their ports while being connected to an inactive14671467+ * host adapter, i.e. if connected before the low-level driver is14681468+ * loaded. They become visible either when physically unplugged and14691469+ * replugged, or when receiving a resume packet. Send one once. */14701470+ if (!host->resume_packet_sent && !nodemgr_send_resume_packet(host))14711471+ host->resume_packet_sent = 1;1505147215061473 return 1;15071474}
···717717 * at the source, so we must turn off PIRQ.718718 */719719 pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);720720+ mb();720721 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);721722 uhci->hc_inaccessible = 1;722723 hcd->poll_rh = 0;···739738 * really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0740739 */741740 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);741741+ mb();742742743743 if (uhci->rh_state == UHCI_RH_RESET) /* Dead */744744 return 0;
+1
drivers/usb/input/hid-input.c
···137137 switch (usage->hid & 0xffff) {138138 case 0xba: map_abs(ABS_RUDDER); break;139139 case 0xbb: map_abs(ABS_THROTTLE); break;140140+ default: goto ignore;140141 }141142 break;142143
···441441 * the fb. it's inefficient for them to do anything less than 64*8442442 * writes since we update the lcd in each write() anyway.443443 */444444-static ssize_t arcfb_write(struct file *file, const char *buf, size_t count,444444+static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t count,445445 loff_t *ppos)446446{447447 /* modded from epson 1355 */
···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)
+4-19
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);
+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);
···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}
+2-2
fs/xfs/quota/xfs_qm.c
···78787979STATIC int xfs_qm_init_quotainos(xfs_mount_t *);8080STATIC int xfs_qm_init_quotainfo(xfs_mount_t *);8181-STATIC int xfs_qm_shake(int, unsigned int);8181+STATIC int xfs_qm_shake(int, gfp_t);82828383#ifdef DEBUG8484extern mutex_t qcheck_lock;···21972197 */21982198/* ARGSUSED */21992199STATIC int22002200-xfs_qm_shake(int nr_to_scan, unsigned int gfp_mask)22002200+xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask)22012201{22022202 int ndqused, nfree, n;22032203
+1-9
include/asm-ia64/delay.h
···8484 ia64_delay_loop (loops - 1);8585}86868787-static __inline__ void8888-udelay (unsigned long usecs)8989-{9090- unsigned long start = ia64_get_itc();9191- unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;9292-9393- while (ia64_get_itc() - start < cycles)9494- cpu_relax();9595-}8787+extern void udelay (unsigned long usecs);96889789#endif /* _ASM_IA64_DELAY_H */
-3
include/asm-ppc/ppc4xx_dma.h
···33333434#define MAX_PPC4xx_DMA_CHANNELS 435353636-/* in arch/ppc/kernel/setup.c -- Cort */3737-extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ;3838-3936/*4037 * Function return status codes4138 * These values are used to indicate whether or not the function
+1-1
include/asm-sparc/memreg.h
···36363737/* Memory parity error register with associated bit constants. */3838#ifndef __ASSEMBLY__3939-extern __volatile__ unsigned long *sun4c_memerr_reg;3939+extern __volatile__ unsigned long __iomem *sun4c_memerr_reg;4040#endif41414242#define SUN4C_MPE_ERROR 0x80 /* Parity error detected. (ro) */
···163163#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */164164#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */165165#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */166166+#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */166167167168#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */168169#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
···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
-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.
···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);
+2-1
mm/memory.c
···574574 * readonly mappings. The tradeoff is that copy_page_range is more575575 * efficient than faulting.576576 */577577- if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP))) {577577+ if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP|VM_INSERTPAGE))) {578578 if (!vma->anon_vma)579579 return 0;580580 }···12281228 return -EFAULT;12291229 if (!page_count(page))12301230 return -EINVAL;12311231+ vma->vm_flags |= VM_INSERTPAGE;12311232 return insert_page(vma->vm_mm, addr, page, vma->vm_page_prot);12321233}12331234EXPORT_SYMBOL(vm_insert_page);
+1-1
mm/mmap.c
···611611 * If the vma has a ->close operation then the driver probably needs to release612612 * per-vma resources, so we don't attempt to merge those.613613 */614614-#define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED)614614+#define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)615615616616static inline int is_mergeable_vma(struct vm_area_struct *vma,617617 struct file *file, unsigned long vm_flags)
+1-1
mm/mremap.c
···323323 /* We can't remap across vm area boundaries */324324 if (old_len > vma->vm_end - addr)325325 goto out;326326- if (vma->vm_flags & VM_DONTEXPAND) {326326+ if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) {327327 if (new_len > old_len)328328 goto out;329329 }
···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)
+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
+12-4
net/ipv6/addrconf.c
···15961596 not good.15971597 */15981598 if (valid_lft >= 0x7FFFFFFF/HZ)15991599- rt_expires = 0;15991599+ rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ);16001600 else16011601- 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;1602161016031611 if (pinfo->onlink) {16041612 struct rt6_info *rt;···16181610 ip6_del_rt(rt, NULL, NULL, NULL);16191611 rt = NULL;16201612 } else {16211621- rt->rt6i_expires = rt_expires;16131613+ rt->rt6i_expires = jiffies + rt_expires;16221614 }16231615 }16241616 } else if (valid_lft) {16251617 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len,16261626- 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);16271619 }16281620 if (rt)16291621 dst_release(&rt->u.dst);
+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
+4-12
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···34213425}3422342634233427static int sctp_copy_laddrs_to_user(struct sock *sk, __u16 port,34243424- void * __user *to, size_t space_left)34283428+ void __user **to, size_t space_left)34253429{34263430 struct list_head *pos;34273431 struct sctp_sockaddr_entry *addr;···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:
···10141014}10151015EXPORT_SYMBOL(__xfrm_route_forward);1016101610171017-/* Optimize later using cookies and generation ids. */10181018-10191017static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie)10201018{10211021- if (!stale_bundle(dst))10221022- return dst;10231023-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+ */10241023 return NULL;10251024}10261025···11011102{11021103 xfrm_prune_bundles(stale_bundle);11031104 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);11041115}1105111611061117void 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);
+18-11
sound/oss/au1550_ac97.c
···578578 } while ((stat & PSC_AC97STAT_DR) == 0);579579}580580581581+/* Hold spinlock for both start_dac() and start_adc() calls */581582static void582583start_dac(struct au1550_state *s)583584{584585 struct dmabuf *db = &s->dma_dac;585585- unsigned long flags;586586587587 if (!db->stopped)588588 return;589589-590590- spin_lock_irqsave(&s->lock, flags);591589592590 set_xmit_slots(db->num_channels);593591 au_writel(PSC_AC97PCR_TC, PSC_AC97PCR);···596598 au1xxx_dbdma_start(db->dmanr);597599598600 db->stopped = 0;599599-600600- spin_unlock_irqrestore(&s->lock, flags);601601}602602603603static void···714718}715719716720717717-/* hold spinlock for the following */718721static void719722dac_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)720723{721724 struct au1550_state *s = (struct au1550_state *) dev_id;722725 struct dmabuf *db = &s->dma_dac;723726 u32 ac97c_stat;727727+728728+ spin_lock(&s->lock);724729725730 ac97c_stat = au_readl(PSC_AC97STAT);726731 if (ac97c_stat & (AC97C_XU | AC97C_XO | AC97C_TE))···744747 /* wake up anybody listening */745748 if (waitqueue_active(&db->wait))746749 wake_up(&db->wait);750750+751751+ spin_unlock(&s->lock);747752}748753749754···757758 u32 obytes;758759 char *obuf;759760761761+ spin_lock(&s->lock);762762+760763 /* Pull the buffer from the dma queue.761764 */762765 au1xxx_dbdma_get_dest(dp->dmanr, (void *)(&obuf), &obytes);···766765 if ((dp->count + obytes) > dp->dmasize) {767766 /* Overrun. Stop ADC and log the error768767 */768768+ spin_unlock(&s->lock);769769 stop_adc(s);770770 dp->error++;771771 err("adc overrun");···789787 if (waitqueue_active(&dp->wait))790788 wake_up(&dp->wait);791789790790+ spin_unlock(&s->lock);792791}793792794793static loff_t···10511048 /* wait for samples in ADC dma buffer10521049 */10531050 do {10511051+ spin_lock_irqsave(&s->lock, flags);10541052 if (db->stopped)10551053 start_adc(s);10561056- spin_lock_irqsave(&s->lock, flags);10571054 avail = db->count;10581055 if (avail <= 0)10591056 __set_current_state(TASK_INTERRUPTIBLE);···15731570 if (get_user(val, (int *) arg))15741571 return -EFAULT;15751572 if (file->f_mode & FMODE_READ) {15761576- if (val & PCM_ENABLE_INPUT)15731573+ if (val & PCM_ENABLE_INPUT) {15741574+ spin_lock_irqsave(&s->lock, flags);15771575 start_adc(s);15781578- else15761576+ spin_unlock_irqrestore(&s->lock, flags);15771577+ } else15791578 stop_adc(s);15801579 }15811580 if (file->f_mode & FMODE_WRITE) {15821582- if (val & PCM_ENABLE_OUTPUT)15811581+ if (val & PCM_ENABLE_OUTPUT) {15821582+ spin_lock_irqsave(&s->lock, flags);15831583 start_dac(s);15841584- else15841584+ spin_unlock_irqrestore(&s->lock, flags);15851585+ } else15851586 stop_dac(s);15861587 }15871588 return 0;