Changeset 9148


Ignore:
Timestamp:
02/29/08 03:29:56 (5 years ago)
Author:
BrainSlayer
Message:

update to 2.6.24.3

Location:
src/linux/xscale/linux-2.6.24
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • src/linux/xscale/linux-2.6.24/Makefile

    r8973 r9148  
    22PATCHLEVEL = 6 
    33SUBLEVEL = 24 
    4 EXTRAVERSION = .1 
     4EXTRAVERSION = .3 
    55NAME = Err Metey! A Heury Beelge-a Ret! 
    66 
  • src/linux/xscale/linux-2.6.24/arch/arm/mach-ixp4xx/ixdp425-setup.c

    r8889 r9148  
    259259#endif 
    260260 
     261 
     262#ifdef CONFIG_ARCH_IXP425 
     263MACHINE_START(MI424WR, "Actiontec MI424-WR") 
     264        /* Maintainer: MontaVista Software, Inc. */ 
     265        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
     266        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
     267        .map_io         = ixp4xx_map_io, 
     268        .init_irq       = ixp4xx_init_irq, 
     269        .timer          = &ixp4xx_timer, 
     270        .boot_params    = 0x0100, 
     271        .init_machine   = ixdp425_init, 
     272MACHINE_END 
     273#endif 
     274 
    261275#ifdef CONFIG_MACH_IXDP465 
    262276MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") 
  • src/linux/xscale/linux-2.6.24/arch/arm/tools/mach-types

    r8887 r9148  
    386386s5c7375                 ARCH_S5C7375            S5C7375                 369 
    387387spearhead               ARCH_SPEARHEAD          SPEARHEAD               370 
     388mi424wr                 ARCH_IXP425_MI424WR     MI424WR                 371 
    388389pantera                 ARCH_PANTERA            PANTERA                 371 
    389390prayoglite              ARCH_PRAYOGLITE         PRAYOGLITE              372 
  • src/linux/xscale/linux-2.6.24/arch/powerpc/platforms/chrp/pci.c

    r8887 r9148  
    355355 * the IDE node /pci@80000000/ide@C,1 
    356356 */ 
    357 static void __devinit chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) 
     357static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) 
    358358{ 
    359359        u8 progif; 
     
    376376        pci_dev_put(viaisa); 
    377377} 
    378 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata); 
     378DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata); 
  • src/linux/xscale/linux-2.6.24/arch/powerpc/platforms/powermac/feature.c

    r8887 r9148  
    25662566        /* Locate core99 Uni-N */ 
    25672567        uninorth_node = of_find_node_by_name(NULL, "uni-n"); 
     2568        uninorth_maj = 1; 
     2569 
    25682570        /* Locate G5 u3 */ 
    25692571        if (uninorth_node == NULL) { 
     
    25762578                uninorth_maj = 4; 
    25772579        } 
    2578         if (uninorth_node == NULL) 
     2580        if (uninorth_node == NULL) { 
     2581                uninorth_maj = 0; 
    25792582                return; 
     2583        } 
    25802584 
    25812585        addrp = of_get_property(uninorth_node, "reg", NULL); 
     
    30303034} 
    30313035EXPORT_SYMBOL(pmac_resume_agp_for_card); 
     3036 
     3037int pmac_get_uninorth_variant(void) 
     3038{ 
     3039        return uninorth_maj; 
     3040} 
  • src/linux/xscale/linux-2.6.24/arch/s390/lib/uaccess_std.c

    r8887 r9148  
    294294        asm volatile( 
    295295                "   sacf 256\n" 
    296                 "  cs   %1,%4,0(%5)\n" 
    297                 "0: lr   %0,%1\n" 
    298                 "1: sacf 0\n" 
    299                 EX_TABLE(0b,1b) 
     296                "0: cs   %1,%4,0(%5)\n" 
     297                "1: lr   %0,%1\n" 
     298                "2: sacf 0\n" 
     299                EX_TABLE(0b,2b) EX_TABLE(1b,2b) 
    300300                : "=d" (ret), "+d" (oldval), "=m" (*uaddr) 
    301301                : "0" (-EFAULT), "d" (newval), "a" (uaddr), "m" (*uaddr) 
  • src/linux/xscale/linux-2.6.24/arch/sparc/lib/rwsem.S

    r8887 r9148  
    88#include <asm/psr.h> 
    99 
    10         .section .sched.text 
     10        .section .sched.text, "ax" 
    1111        .align  4 
    1212 
  • src/linux/xscale/linux-2.6.24/arch/sparc64/lib/rwsem.S

    r8887 r9148  
    77#include <asm/rwsem-const.h> 
    88 
    9         .section        .sched.text 
     9        .section        .sched.text, "ax" 
    1010 
    1111        .globl          __down_read 
  • src/linux/xscale/linux-2.6.24/arch/x86/mm/pageattr_64.c

    r8887 r9148  
    208208                        unsigned long addr2; 
    209209                        pgprot_t prot2; 
    210                         addr2 = __START_KERNEL_map + __pa(address); 
     210                        addr2 = __START_KERNEL_map + __pa(address) - phys_base; 
    211211                        /* Make sure the kernel mappings stay executable */ 
    212212                        prot2 = pte_pgprot(pte_mkexec(pfn_pte(0, prot))); 
  • src/linux/xscale/linux-2.6.24/drivers/macintosh/smu.c

    r8887 r9148  
    8686        struct list_head        cmd_list; 
    8787        struct smu_cmd          *cmd_cur;       /* pending command */ 
     88        int                     broken_nap; 
    8889        struct list_head        cmd_i2c_list; 
    8990        struct smu_i2c_cmd      *cmd_i2c_cur;   /* pending i2c command */ 
     
    135136        fend = faddr + smu->cmd_buf->length + 2; 
    136137        flush_inval_dcache_range(faddr, fend); 
     138 
     139 
     140        /* We also disable NAP mode for the duration of the command 
     141         * on U3 based machines. 
     142         * This is slightly racy as it can be written back to 1 by a sysctl 
     143         * but that never happens in practice. There seem to be an issue with 
     144         * U3 based machines such as the iMac G5 where napping for the 
     145         * whole duration of the command prevents the SMU from fetching it 
     146         * from memory. This might be related to the strange i2c based 
     147         * mechanism the SMU uses to access memory. 
     148         */ 
     149        if (smu->broken_nap) 
     150                powersave_nap = 0; 
    137151 
    138152        /* This isn't exactly a DMA mapping here, I suspect 
     
    212226        mb(); 
    213227        cmd->status = rc; 
     228 
     229        /* Re-enable NAP mode */ 
     230        if (smu->broken_nap) 
     231                powersave_nap = 1; 
    214232 bail: 
    215233        /* Start next command if any */ 
     
    462480                return -ENODEV; 
    463481 
    464         printk(KERN_INFO "SMU driver %s %s\n", VERSION, AUTHOR); 
     482        printk(KERN_INFO "SMU: Driver %s %s\n", VERSION, AUTHOR); 
    465483 
    466484        if (smu_cmdbuf_abs == 0) { 
     
    533551                goto fail; 
    534552        } 
     553 
     554        /* U3 has an issue with NAP mode when issuing SMU commands */ 
     555        smu->broken_nap = pmac_get_uninorth_variant() < 4; 
     556        if (smu->broken_nap) 
     557                printk(KERN_INFO "SMU: using NAP mode workaround\n"); 
    535558 
    536559        sys_ctrler = SYS_CTRLER_SMU; 
  • src/linux/xscale/linux-2.6.24/drivers/net/bonding/bond_main.c

    r8887 r9148  
    48844884 
    48854885        /* Check to see if the bond already exists. */ 
    4886         list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) 
    4887                 if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { 
    4888                         printk(KERN_ERR DRV_NAME 
     4886        if (name) { 
     4887                list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) 
     4888                        if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { 
     4889                                printk(KERN_ERR DRV_NAME 
    48894890                               ": cannot add bond %s; it already exists\n", 
    4890                                name); 
    4891                         res = -EPERM; 
    4892                         goto out_rtnl; 
    4893                 } 
     4891                                       name); 
     4892                                res = -EPERM; 
     4893                                goto out_rtnl; 
     4894                        } 
     4895        } 
    48944896 
    48954897        bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "", 
  • src/linux/xscale/linux-2.6.24/drivers/net/dl2k.h

    r8887 r9148  
    389389        MII_MSSR_LOCAL_RCV_STATUS = 0x2000, 
    390390        MII_MSSR_REMOTE_RCVR = 0x1000, 
    391         MII_MSSR_LP_1000BT_HD = 0x0800, 
    392         MII_MSSR_LP_1000BT_FD = 0x0400, 
     391        MII_MSSR_LP_1000BT_FD = 0x0800, 
     392        MII_MSSR_LP_1000BT_HD = 0x0400, 
    393393        MII_MSSR_IDLE_ERR_COUNT = 0x00ff, 
    394394}; 
  • src/linux/xscale/linux-2.6.24/drivers/net/pcmcia/smc91c92_cs.c

    r8887 r9148  
    560560    /* Read the station address from the CIS.  It is stored as the last 
    561561       (fourth) string in the Version 1 Version/ID tuple. */ 
    562     if (link->prod_id[3]) { 
    563         station_addr = link->prod_id[3]; 
     562    tuple->DesiredTuple = CISTPL_VERS_1; 
     563    if (first_tuple(link, tuple, parse) != CS_SUCCESS) { 
     564        rc = -1; 
     565        goto free_cfg_mem; 
     566    } 
     567    /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */ 
     568    if (next_tuple(link, tuple, parse) != CS_SUCCESS) 
     569        first_tuple(link, tuple, parse); 
     570    if (parse->version_1.ns > 3) { 
     571        station_addr = parse->version_1.str + parse->version_1.ofs[3]; 
    564572        if (cvt_ascii_address(dev, station_addr) == 0) { 
    565573                rc = 0; 
  • src/linux/xscale/linux-2.6.24/drivers/scsi/gdth.c

    r8887 r9148  
    48394839                goto out_free_coal_stat; 
    48404840        list_add_tail(&ha->list, &gdth_instances); 
     4841 
     4842        scsi_scan_host(shp); 
     4843 
    48414844        return 0; 
    48424845 
     
    49664969                goto out_free_coal_stat; 
    49674970        list_add_tail(&ha->list, &gdth_instances); 
     4971 
     4972        scsi_scan_host(shp); 
     4973 
    49684974        return 0; 
    49694975 
     
    51035109                goto out_free_coal_stat; 
    51045110        list_add_tail(&ha->list, &gdth_instances); 
     5111 
     5112        scsi_scan_host(shp); 
     5113 
    51055114        return 0; 
    51065115 
  • src/linux/xscale/linux-2.6.24/drivers/scsi/sd.c

    r8887 r9148  
    908908        unsigned int good_bytes = result ? 0 : xfer_size; 
    909909        u64 start_lba = SCpnt->request->sector; 
     910        u64 end_lba = SCpnt->request->sector + (xfer_size / 512); 
    910911        u64 bad_lba; 
    911912        struct scsi_sense_hdr sshdr; 
     
    946947                if (xfer_size <= SCpnt->device->sector_size) 
    947948                        goto out; 
    948                 switch (SCpnt->device->sector_size) { 
    949                 case 256: 
     949                if (SCpnt->device->sector_size < 512) { 
     950                        /* only legitimate sector_size here is 256 */ 
    950951                        start_lba <<= 1; 
    951                         break; 
    952                 case 512: 
    953                         break; 
    954                 case 1024: 
    955                         start_lba >>= 1; 
    956                         break; 
    957                 case 2048: 
    958                         start_lba >>= 2; 
    959                         break; 
    960                 case 4096: 
    961                         start_lba >>= 3; 
    962                         break; 
    963                 default: 
    964                         /* Print something here with limiting frequency. */ 
     952                        end_lba <<= 1; 
     953                } else { 
     954                        /* be careful ... don't want any overflows */ 
     955                        u64 factor = SCpnt->device->sector_size / 512; 
     956                        do_div(start_lba, factor); 
     957                        do_div(end_lba, factor); 
     958                } 
     959 
     960                if (bad_lba < start_lba  || bad_lba >= end_lba) 
     961                        /* the bad lba was reported incorrectly, we have 
     962                         * no idea where the error is 
     963                         */ 
    965964                        goto out; 
    966                         break; 
    967                 } 
     965 
    968966                /* This computation should always be done in terms of 
    969967                 * the resolution of the device's medium. 
  • src/linux/xscale/linux-2.6.24/drivers/usb/class/usblp.c

    r8887 r9148  
    429429 
    430430        if (handle_bidir(usblp) < 0) { 
     431                usb_autopm_put_interface(intf); 
    431432                usblp->used = 0; 
    432433                file->private_data = NULL; 
  • src/linux/xscale/linux-2.6.24/fs/inotify_user.c

    r8887 r9148  
    270270         * generating the event 
    271271         */ 
    272         if (mask & IN_IGNORED || mask & IN_ONESHOT) 
     272        if (mask & IN_IGNORED || w->mask & IN_ONESHOT) 
    273273                put_inotify_watch(w); /* final put */ 
    274274 
  • src/linux/xscale/linux-2.6.24/fs/nfs/write.c

    r8887 r9148  
    702702 
    703703/* 
     704 * If the page cache is marked as unsafe or invalid, then we can't rely on 
     705 * the PageUptodate() flag. In this case, we will need to turn off 
     706 * write optimisations that depend on the page contents being correct. 
     707 */ 
     708static int nfs_write_pageuptodate(struct page *page, struct inode *inode) 
     709{ 
     710        return PageUptodate(page) && 
     711                !(NFS_I(inode)->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA)); 
     712} 
     713 
     714/* 
    704715 * Update and possibly write a cached page of an NFS file. 
    705716 * 
     
    722733 
    723734        /* If we're not using byte range locks, and we know the page 
    724          * is entirely in cache, it may be more efficient to avoid 
    725          * fragmenting write requests. 
     735         * is up to date, it may be more efficient to extend the write 
     736         * to cover the entire page in order to avoid fragmentation 
     737         * inefficiencies. 
    726738         */ 
    727         if (PageUptodate(page) && inode->i_flock == NULL && !(file->f_mode & O_SYNC)) { 
     739        if (nfs_write_pageuptodate(page, inode) && 
     740                        inode->i_flock == NULL && 
     741                        !(file->f_mode & O_SYNC)) { 
    728742                count = max(count + offset, nfs_page_length(page)); 
    729743                offset = 0; 
  • src/linux/xscale/linux-2.6.24/fs/splice.c

    r8973 r9148  
    12401240                        break; 
    12411241                error = -EFAULT; 
    1242                 if (unlikely(!base)) 
     1242                if (!access_ok(VERIFY_READ, base, len)) 
    12431243                        break; 
    12441244 
  • src/linux/xscale/linux-2.6.24/fs/xfs/linux-2.6/xfs_file.c

    r8887 r9148  
    351351                size = buf.used; 
    352352                de = (struct hack_dirent *)buf.dirent; 
    353                 curr_offset = de->offset /* & 0x7fffffff */; 
    354353                while (size > 0) { 
     354                        curr_offset = de->offset /* & 0x7fffffff */; 
    355355                        if (filldir(dirent, de->name, de->namlen, 
    356356                                        curr_offset & 0x7fffffff, 
     
    363363                        size -= reclen; 
    364364                        de = (struct hack_dirent *)((char *)de + reclen); 
    365                         curr_offset = de->offset /* & 0x7fffffff */; 
    366365                } 
    367366        } 
  • src/linux/xscale/linux-2.6.24/include/asm-powerpc/pmac_feature.h

    r8887 r9148  
    393393#define UN_BIC(r,v)     (UN_OUT((r), UN_IN(r) & ~(v))) 
    394394 
     395/* Uninorth variant: 
     396 * 
     397 * 0 = not uninorth 
     398 * 1 = U1.x or U2.x 
     399 * 3 = U3 
     400 * 4 = U4 
     401 */ 
     402extern int pmac_get_uninorth_variant(void); 
    395403 
    396404#endif /* __ASM_POWERPC_PMAC_FEATURE_H */ 
  • src/linux/xscale/linux-2.6.24/include/linux/Kbuild

    r8887 r9148  
    218218unifdef-y += icmpv6.h 
    219219unifdef-y += if_addr.h 
     220unifdef-y += if_addrlabel.h 
    220221unifdef-y += if_arp.h 
    221222unifdef-y += if_bridge.h 
  • src/linux/xscale/linux-2.6.24/include/linux/hrtimer.h

    r8887 r9148  
    301301/* Precise sleep: */ 
    302302extern long hrtimer_nanosleep(struct timespec *rqtp, 
    303                               struct timespec *rmtp, 
     303                              struct timespec __user *rmtp, 
    304304                              const enum hrtimer_mode mode, 
    305305                              const clockid_t clockid); 
  • src/linux/xscale/linux-2.6.24/include/linux/hugetlb.h

    r8887 r9148  
    1818 
    1919int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); 
     20int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); 
    2021int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); 
    2122int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); 
  • src/linux/xscale/linux-2.6.24/include/linux/ktime.h

    r8887 r9148  
    311311} 
    312312 
     313extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); 
     314 
    313315/* 
    314316 * The resolution of the clocks. The resolution value is returned in 
  • src/linux/xscale/linux-2.6.24/kernel/audit.c

    r8887 r9148  
    12011201{ 
    12021202        struct sk_buff *skb = ab->skb; 
    1203         int ret = pskb_expand_head(skb, skb_headroom(skb), extra, 
    1204                                    ab->gfp_mask); 
     1203        int oldtail = skb_tailroom(skb); 
     1204        int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask); 
     1205        int newtail = skb_tailroom(skb); 
     1206 
    12051207        if (ret < 0) { 
    12061208                audit_log_lost("out of memory in audit_expand"); 
    12071209                return 0; 
    12081210        } 
    1209         return skb_tailroom(skb); 
     1211 
     1212        skb->truesize += newtail - oldtail; 
     1213        return newtail; 
    12101214} 
    12111215 
  • src/linux/xscale/linux-2.6.24/kernel/compat.c

    r8887 r9148  
    4141} 
    4242 
     43static long compat_nanosleep_restart(struct restart_block *restart) 
     44{ 
     45        struct compat_timespec __user *rmtp; 
     46        struct timespec rmt; 
     47        mm_segment_t oldfs; 
     48        long ret; 
     49 
     50        rmtp = (struct compat_timespec __user *)(restart->arg1); 
     51        restart->arg1 = (unsigned long)&rmt; 
     52        oldfs = get_fs(); 
     53        set_fs(KERNEL_DS); 
     54        ret = hrtimer_nanosleep_restart(restart); 
     55        set_fs(oldfs); 
     56 
     57        if (ret) { 
     58                restart->fn = compat_nanosleep_restart; 
     59                restart->arg1 = (unsigned long)rmtp; 
     60 
     61                if (rmtp && put_compat_timespec(&rmt, rmtp)) 
     62                        return -EFAULT; 
     63        } 
     64 
     65        return ret; 
     66} 
     67 
    4368asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp, 
    4469                                     struct compat_timespec __user *rmtp) 
    4570{ 
    4671        struct timespec tu, rmt; 
     72        mm_segment_t oldfs; 
    4773        long ret; 
    4874 
     
    5379                return -EINVAL; 
    5480 
    55         ret = hrtimer_nanosleep(&tu, rmtp ? &rmt : NULL, HRTIMER_MODE_REL, 
    56                                 CLOCK_MONOTONIC); 
    57  
    58         if (ret && rmtp) { 
    59                 if (put_compat_timespec(&rmt, rmtp)) 
     81        oldfs = get_fs(); 
     82        set_fs(KERNEL_DS); 
     83        ret = hrtimer_nanosleep(&tu, 
     84                                rmtp ? (struct timespec __user *)&rmt : NULL, 
     85                                HRTIMER_MODE_REL, CLOCK_MONOTONIC); 
     86        set_fs(oldfs); 
     87 
     88        if (ret) { 
     89                struct restart_block *restart 
     90                        = &current_thread_info()->restart_block; 
     91 
     92                restart->fn = compat_nanosleep_restart; 
     93                restart->arg1 = (unsigned long)rmtp; 
     94 
     95                if (rmtp && put_compat_timespec(&rmt, rmtp)) 
    6096                        return -EFAULT; 
    6197        } 
  • src/linux/xscale/linux-2.6.24/kernel/futex.c

    r8887 r9148  
    20952095                t = timespec_to_ktime(ts); 
    20962096                if (cmd == FUTEX_WAIT) 
    2097                         t = ktime_add(ktime_get(), t); 
     2097                        t = ktime_add_safe(ktime_get(), t); 
    20982098                tp = &t; 
    20992099        } 
  • src/linux/xscale/linux-2.6.24/kernel/futex_compat.c

    r8887 r9148  
    176176                t = timespec_to_ktime(ts); 
    177177                if (cmd == FUTEX_WAIT) 
    178                         t = ktime_add(ktime_get(), t); 
     178                        t = ktime_add_safe(ktime_get(), t); 
    179179                tp = &t; 
    180180        } 
  • src/linux/xscale/linux-2.6.24/kernel/hrtimer.c

    r8887 r9148  
    326326#endif /* BITS_PER_LONG >= 64 */ 
    327327 
     328/* 
     329 * Add two ktime values and do a safety check for overflow: 
     330 */ 
     331 
     332ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs) 
     333{ 
     334        ktime_t res = ktime_add(lhs, rhs); 
     335 
     336        /* 
     337         * We use KTIME_SEC_MAX here, the maximum timeout which we can 
     338         * return to user space in a timespec: 
     339         */ 
     340        if (res.tv64 < 0 || res.tv64 < lhs.tv64 || res.tv64 < rhs.tv64) 
     341                res = ktime_set(KTIME_SEC_MAX, 0); 
     342 
     343        return res; 
     344} 
     345 
    328346/* High resolution timer related functions */ 
    329347#ifdef CONFIG_HIGH_RES_TIMERS 
     
    409427        ktime_t expires = ktime_sub(timer->expires, base->offset); 
    410428        int res; 
     429 
     430        WARN_ON_ONCE(timer->expires.tv64 < 0); 
    411431 
    412432        /* 
     
    419439        if (hrtimer_callback_running(timer)) 
    420440                return 0; 
     441 
     442        /* 
     443         * CLOCK_REALTIME timer might be requested with an absolute 
     444         * expiry time which is less than base->offset. Nothing wrong 
     445         * about that, just avoid to call into the tick code, which 
     446         * has now objections against negative expiry values. 
     447         */ 
     448        if (expires.tv64 < 0) 
     449                return -ETIME; 
    421450 
    422451        if (expires.tv64 >= expires_next->tv64) 
     
    683712                orun++; 
    684713        } 
    685         timer->expires = ktime_add(timer->expires, interval); 
    686         /* 
    687          * Make sure, that the result did not wrap with a very large 
    688          * interval. 
    689          */ 
    690         if (timer->expires.tv64 < 0) 
    691                 timer->expires = ktime_set(KTIME_SEC_MAX, 0); 
     714        timer->expires = ktime_add_safe(timer->expires, interval); 
    692715 
    693716        return orun; 
     
    840863 
    841864        if (mode == HRTIMER_MODE_REL) { 
    842                 tim = ktime_add(tim, new_base->get_time()); 
     865                tim = ktime_add_safe(tim, new_base->get_time()); 
    843866                /* 
    844867                 * CONFIG_TIME_LOW_RES is a temporary way for architectures 
     
    849872                 */ 
    850873#ifdef CONFIG_TIME_LOW_RES 
    851                 tim = ktime_add(tim, base->resolution); 
     874                tim = ktime_add_safe(tim, base->resolution); 
    852875#endif 
    853                 /* 
    854                  * Careful here: User space might have asked for a 
    855                  * very long sleep, so the add above might result in a 
    856                  * negative number, which enqueues the timer in front 
    857                  * of the queue. 
    858                  */ 
    859                 if (tim.tv64 < 0) 
    860                         tim.tv64 = KTIME_MAX; 
    861876        } 
    862877        timer->expires = tim; 
     
    12921307} 
    12931308 
     1309static int update_rmtp(struct hrtimer *timer, struct timespec __user *rmtp) 
     1310{ 
     1311        struct timespec rmt; 
     1312        ktime_t rem; 
     1313 
     1314        rem = ktime_sub(timer->expires, timer->base->get_time()); 
     1315        if (rem.tv64 <= 0) 
     1316                return 0; 
     1317        rmt = ktime_to_timespec(rem); 
     1318 
     1319        if (copy_to_user(rmtp, &rmt, sizeof(*rmtp))) 
     1320                return -EFAULT; 
     1321 
     1322        return 1; 
     1323} 
     1324 
    12941325long __sched hrtimer_nanosleep_restart(struct restart_block *restart) 
    12951326{ 
    12961327        struct hrtimer_sleeper t; 
    1297         struct timespec *rmtp; 
    1298         ktime_t time; 
     1328        struct timespec __user  *rmtp; 
    12991329 
    13001330        restart->fn = do_no_restart_syscall; 
     
    13061336                return 0; 
    13071337 
    1308         rmtp = (struct timespec *)restart->arg1; 
     1338        rmtp = (struct timespec __user *)restart->arg1; 
    13091339        if (rmtp) { 
    1310                 time = ktime_sub(t.timer.expires, t.timer.base->get_time()); 
    1311                 if (time.tv64 <= 0) 
    1312                         return 0; 
    1313                 *rmtp = ktime_to_timespec(time); 
     1340                int ret = update_rmtp(&t.timer, rmtp); 
     1341                if (ret <= 0) 
     1342                        return ret; 
    13141343        } 
    13151344 
     
    13201349} 
    13211350 
    1322 long hrtimer_nanosleep(struct timespec *rqtp, struct timespec *rmtp, 
     1351long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, 
    13231352                       const enum hrtimer_mode mode, const clockid_t clockid) 
    13241353{ 
    13251354        struct restart_block *restart; 
    13261355        struct hrtimer_sleeper t; 
    1327         ktime_t rem; 
    13281356 
    13291357        hrtimer_init(&t.timer, clockid, mode); 
     
    13371365 
    13381366        if (rmtp) { 
    1339                 rem = ktime_sub(t.timer.expires, t.timer.base->get_time()); 
    1340                 if (rem.tv64 <= 0) 
    1341                         return 0; 
    1342                 *rmtp = ktime_to_timespec(rem); 
     1367                int ret = update_rmtp(&t.timer, rmtp); 
     1368                if (ret <= 0) 
     1369                        return ret; 
    13431370        } 
    13441371 
     
    13561383sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp) 
    13571384{ 
    1358         struct timespec tu, rmt; 
    1359         int ret; 
     1385        struct timespec tu; 
    13601386 
    13611387        if (copy_from_user(&tu, rqtp, sizeof(tu))) 
     
    13651391                return -EINVAL; 
    13661392 
    1367         ret = hrtimer_nanosleep(&tu, rmtp ? &rmt : NULL, HRTIMER_MODE_REL, 
    1368                                 CLOCK_MONOTONIC); 
    1369  
    1370         if (ret && rmtp) { 
    1371                 if (copy_to_user(rmtp, &rmt, sizeof(*rmtp))) 
    1372                         return -EFAULT; 
    1373         } 
    1374  
    1375         return ret; 
     1393        return hrtimer_nanosleep(&tu, rmtp, HRTIMER_MODE_REL, CLOCK_MONOTONIC); 
    13761394} 
    13771395 
  • src/linux/xscale/linux-2.6.24/kernel/irq/chip.c

    r8887 r9148  
    247247 
    248248/* 
     249 * default shutdown function 
     250 */ 
     251static void default_shutdown(unsigned int irq) 
     252{ 
     253        struct irq_desc *desc = irq_desc + irq; 
     254 
     255        desc->chip->mask(irq); 
     256        desc->status |= IRQ_MASKED; 
     257} 
     258 
     259/* 
    249260 * Fixup enable/disable function pointers 
    250261 */ 
     
    257268        if (!chip->startup) 
    258269                chip->startup = default_startup; 
     270        /* 
     271         * We use chip->disable, when the user provided its own. When 
     272         * we have default_disable set for chip->disable, then we need 
     273         * to use default_shutdown, otherwise the irq line is not 
     274         * disabled on free_irq(): 
     275         */ 
    259276        if (!chip->shutdown) 
    260                 chip->shutdown = chip->disable; 
     277                chip->shutdown = chip->disable != default_disable ? 
     278                        chip->disable : default_shutdown; 
    261279        if (!chip->name) 
    262280                chip->name = chip->typename; 
  • src/linux/xscale/linux-2.6.24/kernel/posix-timers.c

    r8887 r9148  
    767767        if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) { 
    768768                /* Setup correct expiry time for relative timers */ 
    769                 if (mode == HRTIMER_MODE_REL) 
    770                         timer->expires = ktime_add(timer->expires, 
    771                                                    timer->base->get_time()); 
     769                if (mode == HRTIMER_MODE_REL) { 
     770                        timer->expires = 
     771                                ktime_add_safe(timer->expires, 
     772                                               timer->base->get_time()); 
     773                } 
    772774                return 0; 
    773775        } 
     
    982984                         struct timespec *tsave, struct timespec __user *rmtp) 
    983985{ 
    984         struct timespec rmt; 
    985         int ret; 
    986  
    987         ret = hrtimer_nanosleep(tsave, rmtp ? &rmt : NULL, 
    988                                 flags & TIMER_ABSTIME ? 
    989                                 HRTIMER_MODE_ABS : HRTIMER_MODE_REL, 
    990                                 which_clock); 
    991  
    992         if (ret && rmtp) { 
    993                 if (copy_to_user(rmtp, &rmt, sizeof(*rmtp))) 
    994                         return -EFAULT; 
    995         } 
    996  
    997         return ret; 
     986        return hrtimer_nanosleep(tsave, rmtp, flags & TIMER_ABSTIME ? 
     987                                 HRTIMER_MODE_ABS : HRTIMER_MODE_REL, 
     988                                 which_clock); 
    998989} 
    999990 
  • src/linux/xscale/linux-2.6.24/kernel/sysctl.c

    r8887 r9148  
    911911                .maxlen         = sizeof(nr_overcommit_huge_pages), 
    912912                .mode           = 0644, 
    913                 .proc_handler   = &proc_doulongvec_minmax, 
     913                .proc_handler   = &hugetlb_overcommit_handler, 
    914914        }, 
    915915#endif 
  • src/linux/xscale/linux-2.6.24/mm/hugetlb.c

    r8887 r9148  
    606606} 
    607607 
     608int hugetlb_overcommit_handler(struct ctl_table *table, int write, 
     609                        struct file *file, void __user *buffer, 
     610                        size_t *length, loff_t *ppos) 
     611{ 
     612        spin_lock(&hugetlb_lock); 
     613        proc_doulongvec_minmax(table, write, file, buffer, length, ppos); 
     614        spin_unlock(&hugetlb_lock); 
     615        return 0; 
     616} 
     617 
    608618#endif /* CONFIG_SYSCTL */ 
    609619 
  • src/linux/xscale/linux-2.6.24/mm/memory.c

    r8887 r9148  
    980980        unsigned int vm_flags; 
    981981 
     982        if (len <= 0) 
     983                return 0; 
    982984        /*  
    983985         * Require read or write permissions. 
  • src/linux/xscale/linux-2.6.24/mm/slub.c

    r8887 r9148  
    25932593{ 
    25942594        struct page *page; 
     2595        void *object = (void *)x; 
    25952596 
    25962597        if (unlikely(ZERO_OR_NULL_PTR(x))) 
     
    26022603                return; 
    26032604        } 
    2604         slab_free(page->slab, page, (void *)x, __builtin_return_address(0)); 
     2605        slab_free(page->slab, page, object, __builtin_return_address(0)); 
    26052606} 
    26062607EXPORT_SYMBOL(kfree); 
  • src/linux/xscale/linux-2.6.24/net/bluetooth/hci_sysfs.c

    r8887 r9148  
    1313#define BT_DBG(D...) 
    1414#endif 
     15static struct workqueue_struct *btaddconn; 
     16static struct workqueue_struct *btdelconn; 
    1517 
    1618static inline char *typetostr(int type) 
     
    280282        int i; 
    281283 
     284        flush_workqueue(btdelconn); 
    282285        if (device_add(&conn->dev) < 0) { 
    283286                BT_ERR("Failed to register connection device"); 
     
    314317        INIT_WORK(&conn->work, add_conn); 
    315318 
     319        queue_work(btaddconn, &conn->work); 
    316320        schedule_work(&conn->work); 
    317321} 
     
    350354        INIT_WORK(&conn->work, del_conn); 
    351355 
     356        queue_work(btdelconn, &conn->work); 
    352357        schedule_work(&conn->work); 
    353358} 
     
    399404        int err; 
    400405 
     406        btaddconn = create_singlethread_workqueue("btaddconn"); 
     407        if (!btaddconn) { 
     408                err = -ENOMEM; 
     409                goto out; 
     410        } 
     411        btdelconn = create_singlethread_workqueue("btdelconn"); 
     412        if (!btdelconn) { 
     413                err = -ENOMEM; 
     414                goto out_del; 
     415        } 
     416 
    401417        bt_platform = platform_device_register_simple("bluetooth", -1, NULL, 0); 
    402         if (IS_ERR(bt_platform)) 
    403                 return PTR_ERR(bt_platform); 
     418        if (IS_ERR(bt_platform)) { 
     419                err = PTR_ERR(bt_platform); 
     420                goto out_platform; 
     421        } 
    404422 
    405423        err = bus_register(&bt_bus); 
    406         if (err < 0) { 
    407                 platform_device_unregister(bt_platform); 
    408                 return err; 
    409         } 
     424        if (err < 0) 
     425                goto out_bus; 
    410426 
    411427        bt_class = class_create(THIS_MODULE, "bluetooth"); 
    412428        if (IS_ERR(bt_class)) { 
    413                 bus_unregister(&bt_bus); 
    414                 platform_device_unregister(bt_platform); 
    415                 return PTR_ERR(bt_class); 
     429                err = PTR_ERR(bt_class); 
     430                goto out_class; 
    416431        } 
    417432 
    418433        return 0; 
     434 
     435out_class: 
     436        bus_unregister(&bt_bus); 
     437out_bus: 
     438        platform_device_unregister(bt_platform); 
     439out_platform: 
     440        destroy_workqueue(btdelconn); 
     441out_del: 
     442        destroy_workqueue(btaddconn); 
     443out: 
     444        return err; 
    419445} 
    420446 
    421447void bt_sysfs_cleanup(void) 
    422448{ 
     449        destroy_workqueue(btaddconn); 
     450        destroy_workqueue(btdelconn); 
    423451        class_destroy(bt_class); 
    424  
    425452        bus_unregister(&bt_bus); 
    426  
    427453        platform_device_unregister(bt_platform); 
    428454} 
  • src/linux/xscale/linux-2.6.24/net/ipv4/fib_hash.c

    r8887 r9148  
    435435        if (fa && fa->fa_tos == tos && 
    436436            fa->fa_info->fib_priority == fi->fib_priority) { 
    437                 struct fib_alias *fa_orig; 
     437                struct fib_alias *fa_first, *fa_match; 
    438438 
    439439                err = -EEXIST; 
     
    441441                        goto out; 
    442442 
     443                /* We have 2 goals: 
     444                 * 1. Find exact match for type, scope, fib_info to avoid 
     445                 * duplicate routes 
     446                 * 2. Find next 'fa' (or head), NLM_F_APPEND inserts before it 
     447                 */ 
     448                fa_match = NULL; 
     449                fa_first = fa; 
     450                fa = list_entry(fa->fa_list.prev, struct fib_alias, fa_list); 
     451                list_for_each_entry_continue(fa, &f->fn_alias, fa_list) { 
     452                        if (fa->fa_tos != tos) 
     453                                break; 
     454                        if (fa->fa_info->fib_priority != fi->fib_priority) 
     455                                break; 
     456                        if (fa->fa_type == cfg->fc_type && 
     457                            fa->fa_scope == cfg->fc_scope && 
     458                            fa->fa_info == fi) { 
     459                                fa_match = fa; 
     460                                break; 
     461                        } 
     462                } 
     463 
    443464                if (cfg->fc_nlflags & NLM_F_REPLACE) { 
    444465                        struct fib_info *fi_drop; 
    445466                        u8 state; 
    446467 
    447                         if (fi->fib_treeref > 1) 
     468                        fa = fa_first; 
     469                        if (fa_match) { 
     470                                if (fa == fa_match) 
     471                                        err = 0; 
    448472                                goto out; 
    449  
     473                        } 
    450474                        write_lock_bh(&fib_hash_lock); 
    451475                        fi_drop = fa->fa_info; 
     
    470494                 * information. 
    471495                 */ 
    472                 fa_orig = fa; 
    473                 fa = list_entry(fa->fa_list.prev, struct fib_alias, fa_list); 
    474                 list_for_each_entry_continue(fa, &f->fn_alias, fa_list) { 
    475                         if (fa->fa_tos != tos) 
    476                                 break; 
    477                         if (fa->fa_info->fib_priority != fi->fib_priority) 
    478                                 break; 
    479                         if (fa->fa_type == cfg->fc_type && 
    480                             fa->fa_scope == cfg->fc_scope && 
    481                             fa->fa_info == fi) 
    482                                 goto out; 
    483                 } 
     496                if (fa_match) 
     497                        goto out; 
     498 
    484499                if (!(cfg->fc_nlflags & NLM_F_APPEND)) 
    485                         fa = fa_orig; 
     500                        fa = fa_first; 
    486501        } 
    487502 
  • src/linux/xscale/linux-2.6.24/net/ipv4/fib_trie.c

    r8887 r9148  
    12041204         */ 
    12051205 
    1206         if (fa && fa->fa_info->fib_priority == fi->fib_priority) { 
    1207                 struct fib_alias *fa_orig; 
     1206        if (fa && fa->fa_tos == tos && 
     1207            fa->fa_info->fib_priority == fi->fib_priority) { 
     1208                struct fib_alias *fa_first, *fa_match; 
    12081209 
    12091210                err = -EEXIST; 
     
    12111212                        goto out; 
    12121213 
    1213                 if (cfg->fc_nlflags & NLM_F_REPLACE) { 
    1214                         struct fib_info *fi_drop; 
    1215                         u8 state; 
    1216  
    1217                         if (fi->fib_treeref > 1) 
    1218                                 goto out; 
    1219  
    1220                         err = -ENOBUFS; 
    1221                         new_fa = kmem_cache_alloc(fn_alias_kmem, GFP_KERNEL); 
    1222                         if (new_fa == NULL) 
    1223                                 goto out; 
    1224  
    1225                         fi_drop = fa->fa_info; 
    1226                         new_fa->fa_tos = fa->fa_tos; 
    1227                         new_fa->fa_info = fi; 
    1228                         new_fa->fa_type = cfg->fc_type; 
    1229                         new_fa->fa_scope = cfg->fc_scope; 
    1230                         state = fa->fa_state; 
    1231                         new_fa->fa_state &= ~FA_S_ACCESSED; 
    1232  
    1233                         list_replace_rcu(&fa->fa_list, &new_fa->fa_list); 
    1234                         alias_free_mem_rcu(fa); 
    1235  
    1236                         fib_release_info(fi_drop); 
    1237                         if (state & FA_S_ACCESSED) 
    1238                                 rt_cache_flush(-1); 
    1239                         rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, 
    1240                                 tb->tb_id, &cfg->fc_nlinfo, NLM_F_REPLACE); 
    1241  
    1242                         goto succeeded; 
    1243                 } 
    1244                 /* Error if we find a perfect match which 
    1245                  * uses the same scope, type, and nexthop 
    1246                  * information. 
     1214                /* We have 2 goals: 
     1215                 * 1. Find exact match for type, scope, fib_info to avoid 
     1216                 * duplicate routes 
     1217                 * 2. Find next 'fa' (or head), NLM_F_APPEND inserts before it 
    12471218                 */ 
    1248                 fa_orig = fa; 
    1249                 list_for_each_entry(fa, fa_orig->fa_list.prev, fa_list) { 
     1219                fa_match = NULL; 
     1220                fa_first = fa; 
     1221                fa = list_entry(fa->fa_list.prev, struct fib_alias, fa_list); 
     1222                list_for_each_entry_continue(fa, fa_head, fa_list) { 
    12501223                        if (fa->fa_tos != tos) 
    12511224                                break; 
     
    12551228                            fa->fa_scope == cfg->fc_scope && 
    12561229                            fa->fa_info == fi) { 
     1230                                fa_match = fa; 
     1231                                break; 
     1232                        } 
     1233                } 
     1234 
     1235                if (cfg->fc_nlflags & NLM_F_REPLACE) { 
     1236                        struct fib_info *fi_drop; 
     1237                        u8 state; 
     1238 
     1239                        fa = fa_first; 
     1240                        if (fa_match) { 
     1241                                if (fa == fa_match) 
     1242                                        err = 0; 
    12571243                                goto out; 
    12581244                        } 
    1259                 } 
     1245                        err = -ENOBUFS; 
     1246                        new_fa = kmem_cache_alloc(fn_alias_kmem, GFP_KERNEL); 
     1247                        if (new_fa == NULL) 
     1248                                goto out; 
     1249 
     1250                        fi_drop = fa->fa_info; 
     1251                        new_fa->fa_tos = fa->fa_tos; 
     1252                        new_fa->fa_info = fi; 
     1253                        new_fa->fa_type = cfg->fc_type; 
     1254                        new_fa->fa_scope = cfg->fc_scope; 
     1255                        state = fa->fa_state; 
     1256                        new_fa->fa_state = state & ~FA_S_ACCESSED; 
     1257 
     1258                        list_replace_rcu(&fa->fa_list, &new_fa->fa_list); 
     1259                        alias_free_mem_rcu(fa); 
     1260 
     1261                        fib_release_info(fi_drop); 
     1262                        if (state & FA_S_ACCESSED) 
     1263                                rt_cache_flush(-1); 
     1264                        rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, 
     1265                                tb->tb_id, &cfg->fc_nlinfo, NLM_F_REPLACE); 
     1266 
     1267                        goto succeeded; 
     1268                } 
     1269                /* Error if we find a perfect match which 
     1270                 * uses the same scope, type, and nexthop 
     1271                 * information. 
     1272                 */ 
     1273                if (fa_match) 
     1274                        goto out; 
     1275 
    12601276                if (!(cfg->fc_nlflags & NLM_F_APPEND)) 
    1261                         fa = fa_orig; 
     1277                        fa = fa_first; 
    12621278        } 
    12631279        err = -ENOENT; 
     
    16151631 
    16161632        fa_to_delete = NULL; 
    1617         fa_head = fa->fa_list.prev; 
    1618  
    1619         list_for_each_entry(fa, fa_head, fa_list) { 
     1633        fa = list_entry(fa->fa_list.prev, struct fib_alias, fa_list); 
     1634        list_for_each_entry_continue(fa, fa_head, fa_list) { 
    16201635                struct fib_info *fi = fa->fa_info; 
    16211636 
  • src/linux/xscale/linux-2.6.24/net/ipv4/inet_diag.c

    r8887 r9148  
    260260 
    261261        handler = inet_diag_lock_handler(nlh->nlmsg_type); 
    262         if (!handler) 
    263                 return -ENOENT; 
     262        if (IS_ERR(handler)) { 
     263                err = PTR_ERR(handler); 
     264                goto unlock; 
     265        } 
    264266 
    265267        hashinfo = handler->idiag_hashinfo; 
     
    709711 
    710712        handler = inet_diag_lock_handler(cb->nlh->nlmsg_type); 
    711         if (!handler) 
    712                 goto no_handler; 
     713        if (IS_ERR(handler)) 
     714                goto unlock; 
    713715 
    714716        hashinfo = handler->idiag_hashinfo; 
     
    839841unlock: 
    840842        inet_diag_unlock_handler(handler); 
    841 no_handler: 
    842843        return skb->len; 
    843844} 
  • src/linux/xscale/linux-2.6.24/net/ipv4/ip_output.c

    r8887 r9148  
    463463                struct sk_buff *frag; 
    464464                int first_len = skb_pagelen(skb); 
     465                int truesizes = 0; 
    465466 
    466467                if (first_len - hlen > mtu || 
     
    486487                                frag->sk = skb->sk; 
    487488                                frag->destructor = sock_wfree; 
    488                                 skb->truesize -= frag->truesize; 
     489                                truesizes += frag->truesize; 
    489490                        } 
    490491                } 
     
    497498                skb_shinfo(skb)->frag_list = NULL; 
    498499                skb->data_len = first_len - skb_headlen(skb); 
     500                skb->truesize -= truesizes; 
    499501                skb->len = first_len; 
    500502                iph->tot_len = htons(first_len); 
  • src/linux/xscale/linux-2.6.24/net/ipv4/ipcomp.c

    r8887 r9148  
    7575static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) 
    7676{ 
     77        int nexthdr; 
    7778        int err = -ENOMEM; 
    7879        struct ip_comp_hdr *ipch; 
     
    8586        /* Remove ipcomp header and decompress original payload */ 
    8687        ipch = (void *)skb->data; 
     88        nexthdr = ipch->nexthdr; 
     89 
    8790        skb->transport_header = skb->network_header + sizeof(*ipch); 
    8891        __skb_pull(skb, sizeof(*ipch)); 
     
    9194                goto out; 
    9295 
    93         err = ipch->nexthdr; 
     96        err = nexthdr; 
    9497 
    9598out: 
  • src/linux/xscale/linux-2.6.24/net/ipv4/sysctl_net_ipv4.c

    r8887 r9148  
    249249        tcp_get_available_congestion_control(tbl.data, tbl.maxlen); 
    250250        ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); 
    251         if (ret == 0 && newval && newlen) 
     251        if (ret == 1 && newval && newlen) 
    252252                ret = tcp_set_allowed_congestion_control(tbl.data); 
    253253        kfree(tbl.data); 
  • src/linux/xscale/linux-2.6.24/net/ipv4/xfrm4_tunnel.c

    r8887 r9148  
    5151static int xfrm_tunnel_rcv(struct sk_buff *skb) 
    5252{ 
    53         return xfrm4_rcv_spi(skb, IPPROTO_IP, ip_hdr(skb)->saddr); 
     53        return xfrm4_rcv_spi(skb, IPPROTO_IPIP, ip_hdr(skb)->saddr); 
    5454} 
    5555 
  • src/linux/xscale/linux-2.6.24/net/ipv6/ip6_output.c

    r8887 r9148  
    610610        if (skb_shinfo(skb)->frag_list) { 
    611611                int first_len = skb_pagelen(skb); 
     612                int truesizes = 0; 
    612613 
    613614                if (first_len - hlen > mtu || 
     
    632633                                frag->sk = skb->sk; 
    633634                                frag->destructor = sock_wfree; 
    634                                 skb->truesize -= frag->truesize; 
     635                                truesizes += frag->truesize; 
    635636                        } 
    636637                } 
     
    663664                first_len = skb_pagelen(skb); 
    664665                skb->data_len = first_len - skb_headlen(skb); 
     666                skb->truesize -= truesizes; 
    665667                skb->len = first_len; 
    666668                ipv6_hdr(skb)->payload_len = htons(first_len - 
  • src/linux/xscale/linux-2.6.24/net/ipv6/ipcomp6.c

    r8887 r9148  
    6565static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) 
    6666{ 
     67        int nexthdr; 
    6768        int err = -ENOMEM; 
    6869        struct ip_comp_hdr *ipch; 
     
    8081        /* Remove ipcomp header and decompress original payload */ 
    8182        ipch = (void *)skb->data; 
     83        nexthdr = ipch->nexthdr; 
     84 
    8285        skb->transport_header = skb->network_header + sizeof(*ipch); 
    8386        __skb_pull(skb, sizeof(*ipch)); 
     
    109112        __skb_put(skb, dlen - plen); 
    110113        skb_copy_to_linear_data(skb, scratch, dlen); 
    111         err = ipch->nexthdr; 
     114        err = nexthdr; 
    112115 
    113116out_put_cpu: 
  • src/linux/xscale/linux-2.6.24/net/netfilter/nf_conntrack_proto_tcp.c

    r8887 r9148  
    136136 * LAST_ACK:    FIN seen (after FIN) 
    137137 * TIME_WAIT:   last ACK seen 
    138  * CLOSE:       closed connection 
     138 * CLOSE:       closed connection (RST) 
    139139 * 
    140140 * LISTEN state is not used. 
     
    835835                if (old_state < TCP_CONNTRACK_TIME_WAIT) 
    836836                        break; 
    837                 if ((conntrack->proto.tcp.seen[!dir].flags & 
    838                         IP_CT_TCP_FLAG_CLOSE_INIT) 
     837                /* RFC 1122: "When a connection is closed actively, 
     838                 * it MUST linger in TIME-WAIT state for a time 2xMSL 
     839                 * (Maximum Segment Lifetime). However, it MAY accept 
     840                 * a new SYN from the remote TCP to reopen the connection 
     841                 * directly from TIME-WAIT state, if..." 
     842                 * We ignore the conditions because we are in the 
     843                 * TIME-WAIT state anyway. 
     844                 * 
     845                 * Handle aborted connections: we and the server 
     846                 * think there is an existing connection but the client 
     847                 * aborts it and starts a new one. 
     848                 */ 
     849                if (((conntrack->proto.tcp.seen[dir].flags 
     850                      | conntrack->proto.tcp.seen[!dir].flags) 
     851                     & IP_CT_TCP_FLAG_CLOSE_INIT) 
    839852                    || (conntrack->proto.tcp.last_dir == dir 
    840853                        && conntrack->proto.tcp.last_index == TCP_RST_SET)) { 
     
    849862                /* Fall through */ 
    850863        case TCP_CONNTRACK_IGNORE: 
    851                 /* Ignored packets: 
     864                /* Ignored packets:  
     865                 * 
     866                 * Our connection entry may be out of sync, so ignore 
     867                 * packets which may signal the real connection between 
     868                 * the client and the server. 
    852869                 * 
    853870                 * a) SYN in ORIGINAL 
    854871                 * b) SYN/ACK in REPLY 
    855872                 * c) ACK in reply direction after initial SYN in original. 
     873                 * 
     874                 * If the ignored packet is invalid, the receiver will send  
     875                 * a RST we'll catch below. 
    856876                 */ 
    857877                if (index == TCP_SYNACK_SET 
     
    860880                    && ntohl(th->ack_seq) == 
    861881                             conntrack->proto.tcp.last_end) { 
    862                         /* This SYN/ACK acknowledges a SYN that we earlier 
     882                        /* b) This SYN/ACK acknowledges a SYN that we earlier 
    863883                         * ignored as invalid. This means that the client and 
    864884                         * the server are both in sync, while the firewall is 
     
    885905                if (LOG_INVALID(IPPROTO_TCP)) 
    886906                        nf_log_packet(pf, 0, skb, NULL, NULL, NULL, 
    887                                   "nf_ct_tcp: invalid packed ignored "); 
     907                                  "nf_ct_tcp: invalid packet ignored "); 
    888908                return NF_ACCEPT; 
    889909        case TCP_CONNTRACK_MAX: 
     
    939959        conntrack->proto.tcp.state = new_state; 
    940960        if (old_state != new_state 
    941             && (new_state == TCP_CONNTRACK_FIN_WAIT 
    942                 || new_state == TCP_CONNTRACK_CLOSE)) 
     961            && new_state == TCP_CONNTRACK_FIN_WAIT) 
    943962                conntrack->proto.tcp.seen[dir].flags |= IP_CT_TCP_FLAG_CLOSE_INIT; 
    944963        timeout = conntrack->proto.tcp.retrans >= nf_ct_tcp_max_retrans 
  • src/linux/xscale/linux-2.6.24/net/sched/em_meta.c

    r8887 r9148  
    720720static inline void meta_delete(struct meta_match *meta) 
    721721{ 
    722         struct meta_type_ops *ops = meta_type_ops(&meta->lvalue); 
    723  
    724         if (ops && ops->destroy) { 
    725                 ops->destroy(&meta->lvalue); 
    726                 ops->destroy(&meta->rvalue); 
     722        if (meta) { 
     723                struct meta_type_ops *ops = meta_type_ops(&meta->lvalue); 
     724 
     725                if (ops && ops->destroy) { 
     726                        ops->destroy(&meta->lvalue); 
     727                        ops->destroy(&meta->rvalue); 
     728                } 
    727729        } 
    728730 
  • src/linux/xscale/linux-2.6.24/net/sched/ematch.c

    r8887 r9148  
    306306        struct tcf_ematch *em; 
    307307 
    308         if (!rta) { 
    309                 memset(tree, 0, sizeof(*tree)); 
     308        memset(tree, 0, sizeof(*tree)); 
     309        if (!rta) 
    310310                return 0; 
    311         } 
    312311 
    313312        if (rtattr_parse_nested(tb, TCA_EMATCH_TREE_MAX, rta) < 0) 
  • src/linux/xscale/linux-2.6.24/security/selinux/ss/services.c

    r8973 r9148  
    26302630netlbl_sid_to_secattr_failure: 
    26312631        POLICY_RDUNLOCK; 
    2632         netlbl_secattr_destroy(secattr); 
    26332632        return rc; 
    26342633} 
Note: See TracChangeset for help on using the changeset viewer.