Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 6 Mar 2006 20:10:42 +0000 (12:10 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 6 Mar 2006 20:10:42 +0000 (12:10 -0800)
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [PATCH] chelsio: fix kmalloc failure in t1_espi_create
  Merge branch 'master'
  s2io: set_multicast_list bug

24 files changed:
arch/sparc64/kernel/sys32.S
arch/sparc64/kernel/una_asm.S
arch/sparc64/lib/U1copy_from_user.S
arch/sparc64/lib/U1copy_to_user.S
arch/sparc64/lib/U3copy_from_user.S
arch/sparc64/lib/U3copy_to_user.S
arch/sparc64/lib/bzero.S
arch/sparc64/lib/copy_in_user.S
arch/sparc64/lib/csum_copy_from_user.S
arch/sparc64/lib/csum_copy_to_user.S
arch/sparc64/lib/strlen_user.S
arch/sparc64/lib/strncpy_from_user.S
arch/sparc64/solaris/entry64.S
drivers/atm/fore200e.c
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/misc.c
include/asm-sparc64/futex.h
include/asm-sparc64/uaccess.h
mm/slab.c
net/atm/signaling.c
net/bridge/br_if.c
net/bridge/br_stp_if.c
net/dccp/ccids/ccid3.c

index 60b5937..c4a1cef 100644 (file)
@@ -318,7 +318,7 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
        nop
        nop
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .align          4
        .word           1b, __retl_efault, 2b, __retl_efault
        .word           3b, __retl_efault, 4b, __retl_efault
index 1f5b5b7..be183fe 100644 (file)
@@ -47,7 +47,7 @@ __do_int_store:
         mov    0, %o0
        .size   __do_int_store, .-__do_int_store
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .word           4b, __retl_efault
        .word           5b, __retl_efault
        .word           6b, __retl_efault
@@ -129,7 +129,7 @@ do_int_load:
         mov    0, %o0
        .size   __do_int_load, .-__do_int_load
 
-       .section        __ex_table
+       .section        __ex_table,"a"
        .word           4b, __retl_efault
        .word           5b, __retl_efault
        .word           6b, __retl_efault
index 93146a8..3192b0b 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 1fccc52..d1210ff 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index df600b6..f5bfc8d 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index f337f22..2334f11 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    1, %o0;         \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 21a933f..1d2abcf 100644 (file)
@@ -92,7 +92,7 @@ __bzero_done:
        .align 4;               \
 99:    retl;                   \
         mov    %o1, %o0;       \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 816076c..650af3f 100644 (file)
@@ -13,7 +13,7 @@
        .align 4;               \
 99:    retl;                   \
         mov 1, %o0;            \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 817ebda..a22eddb 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    -1, %o0;        \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index c2f9463..d5b12f4 100644 (file)
@@ -9,7 +9,7 @@
        .align 4;               \
 99:    retl;                   \
         mov    -1, %o0;        \
-       .section __ex_table;    \
+       .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
        .text;                  \
index 9ed54ba..114ed11 100644 (file)
@@ -85,7 +85,7 @@ __strnlen_user:
         retl
          clr    %o0
 
-       .section __ex_table,#alloc
+       .section __ex_table,"a"
        .align  4
 
        .word   10b, 30b
index e126465..b2f499f 100644 (file)
@@ -125,7 +125,7 @@ __strncpy_from_user:
         add    %o2, %o3, %o0
        .size   __strncpy_from_user, .-__strncpy_from_user
 
-       .section __ex_table,#alloc
+       .section __ex_table,"a"
        .align  4
        .word   60b, __retl_efault
        .word   61b, __retl_efault
index eb314ed..f170324 100644 (file)
@@ -217,7 +217,7 @@ solaris_unimplemented:
        ba,pt           %xcc, ret_from_solaris
         nop
 
-       .section        __ex_table,#alloc
+       .section        __ex_table,"a"
        .align          4
        .word           exen, exenf
 
index 14f6a62..05983a3 100644 (file)
@@ -555,7 +555,7 @@ fore200e_pca_reset(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_pca_map(struct fore200e* fore200e)
 {
     DPRINTK(2, "device %s being mapped in memory\n", fore200e->name);
@@ -589,7 +589,7 @@ fore200e_pca_unmap(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_pca_configure(struct fore200e* fore200e)
 {
     struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev;
@@ -2125,7 +2125,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags)
 }
     
 
-static int __init
+static int __devinit
 fore200e_irq_request(struct fore200e* fore200e)
 {
     if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) {
@@ -2148,7 +2148,7 @@ fore200e_irq_request(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_get_esi(struct fore200e* fore200e)
 {
     struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
@@ -2180,7 +2180,7 @@ fore200e_get_esi(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_alloc_rx_buf(struct fore200e* fore200e)
 {
     int scheme, magn, nbr, size, i;
@@ -2245,7 +2245,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_bs_queue(struct fore200e* fore200e)
 {
     int scheme, magn, i;
@@ -2308,7 +2308,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_rx_queue(struct fore200e* fore200e)
 {
     struct host_rxq*     rxq =  &fore200e->host_rxq;
@@ -2368,7 +2368,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_tx_queue(struct fore200e* fore200e)
 {
     struct host_txq*     txq =  &fore200e->host_txq;
@@ -2431,7 +2431,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init_cmd_queue(struct fore200e* fore200e)
 {
     struct host_cmdq*     cmdq =  &fore200e->host_cmdq;
@@ -2487,7 +2487,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e,
 }
 
 
-static int __init
+static int __devinit
 fore200e_initialize(struct fore200e* fore200e)
 {
     struct cp_queues __iomem * cpq;
@@ -2539,7 +2539,7 @@ fore200e_initialize(struct fore200e* fore200e)
 }
 
 
-static void __init
+static void __devinit
 fore200e_monitor_putc(struct fore200e* fore200e, char c)
 {
     struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
@@ -2551,7 +2551,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c)
 }
 
 
-static int __init
+static int __devinit
 fore200e_monitor_getc(struct fore200e* fore200e)
 {
     struct cp_monitor __iomem * monitor = fore200e->cp_monitor;
@@ -2576,7 +2576,7 @@ fore200e_monitor_getc(struct fore200e* fore200e)
 }
 
 
-static void __init
+static void __devinit
 fore200e_monitor_puts(struct fore200e* fore200e, char* str)
 {
     while (*str) {
@@ -2591,7 +2591,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str)
 }
 
 
-static int __init
+static int __devinit
 fore200e_start_fw(struct fore200e* fore200e)
 {
     int               ok;
@@ -2622,7 +2622,7 @@ fore200e_start_fw(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_load_fw(struct fore200e* fore200e)
 {
     u32* fw_data = (u32*) fore200e->bus->fw_data;
@@ -2648,7 +2648,7 @@ fore200e_load_fw(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_register(struct fore200e* fore200e)
 {
     struct atm_dev* atm_dev;
@@ -2675,7 +2675,7 @@ fore200e_register(struct fore200e* fore200e)
 }
 
 
-static int __init
+static int __devinit
 fore200e_init(struct fore200e* fore200e)
 {
     if (fore200e_register(fore200e) < 0)
@@ -2721,7 +2721,7 @@ fore200e_init(struct fore200e* fore200e)
        return -EBUSY;
 
     fore200e_supply(fore200e);
-    
+
     /* all done, board initialization is now complete */
     fore200e->state = FORE200E_STATE_COMPLETE;
     return 0;
index 3c03aad..7b25463 100644 (file)
@@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
                        int * /* type of buf returned */ , const int long_op);
 extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid);
 extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length);
-extern int is_valid_oplock_break(struct smb_hdr *smb);
+extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
 extern int is_size_safe_to_change(struct cifsInodeInfo *);
 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
 extern unsigned int smbCalcSize(struct smb_hdr *ptr);
index ef5ae6f..2a0c1f4 100644 (file)
@@ -630,7 +630,7 @@ multi_t2_fnd:
                                        smallbuf = NULL;
                        }
                        wake_up_process(task_to_wake);
-               } else if ((is_valid_oplock_break(smb_buffer) == FALSE)
+               } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE)
                    && (isMultiRsp == FALSE)) {                          
                        cERROR(1, ("No task to wake, unknown frame rcvd!"));
                        cifs_dump_mem("Received Data is: ",(char *)smb_buffer,
index 812c6bb..432ba15 100644 (file)
@@ -475,7 +475,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
        return 0;
 }
 int
-is_valid_oplock_break(struct smb_hdr *buf)
+is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 {    
        struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf;
        struct list_head *tmp;
@@ -535,7 +535,7 @@ is_valid_oplock_break(struct smb_hdr *buf)
        read_lock(&GlobalSMBSeslock);
        list_for_each(tmp, &GlobalTreeConnectionList) {
                tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-               if (tcon->tid == buf->Tid) {
+               if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) {
                        cifs_stats_inc(&tcon->num_oplock_brks);
                        list_for_each(tmp1,&tcon->openFileList){
                                netfile = list_entry(tmp1,struct cifsFileInfo,
index 0caf601..34c4b43 100644 (file)
@@ -20,7 +20,7 @@
        "4:     ba      3b\n"                           \
        "        mov    %5, %0\n"                       \
        "       .previous\n"                            \
-       "       .section __ex_table,#alloc\n"           \
+       "       .section __ex_table,\"a\"\n"            \
        "       .align  4\n"                            \
        "       .word   1b, 4b\n"                       \
        "       .word   2b, 4b\n"                       \
index 203e8ee..c91d1e3 100644 (file)
@@ -136,7 +136,7 @@ __asm__ __volatile__(                                                       \
        "b      2b\n\t"                                                 \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\t"                                             \
        ".previous\n\n\t"                                               \
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT)                    \
 __asm__ __volatile__(                                                  \
        "/* Put user asm ret, inline. */\n"                             \
 "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t"                              \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, __ret_efault\n\n\t"                                 \
        ".previous\n\n\t"                                               \
@@ -163,7 +163,7 @@ __asm__ __volatile__(                                                       \
        "ret\n\t"                                                       \
        " restore %%g0, %3, %%o0\n\n\t"                                 \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\n\t"                                               \
@@ -206,7 +206,7 @@ __asm__ __volatile__(                                                       \
        "b      2b\n\t"                                                 \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\t"                                                 \
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT)                      \
 __asm__ __volatile__(                                                  \
        "/* Get user asm ret, inline. */\n"                             \
 "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t"                              \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b,__ret_efault\n\n\t"                                  \
        ".previous\n\t"                                                 \
@@ -233,7 +233,7 @@ __asm__ __volatile__(                                                       \
        "ret\n\t"                                                       \
        " restore %%g0, %2, %%o0\n\n\t"                                 \
        ".previous\n\t"                                                 \
-       ".section __ex_table,#alloc\n\t"                                \
+       ".section __ex_table,\"a\"\n\t"                                 \
        ".align 4\n\t"                                                  \
        ".word  1b, 3b\n\n\t"                                           \
        ".previous\n\t"                                                 \
index add05d8..2b0b151 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2554,7 +2554,7 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
                       "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n",
                       cachep->name, cachep->num, slabp, slabp->inuse);
                for (i = 0;
-                    i < sizeof(slabp) + cachep->num * sizeof(kmem_bufctl_t);
+                    i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
                     i++) {
                        if ((i % 16) == 0)
                                printk("\n%03x:", i);
index 93ad59a..31d98b5 100644 (file)
@@ -39,25 +39,19 @@ static DECLARE_WAIT_QUEUE_HEAD(sigd_sleep);
 static void sigd_put_skb(struct sk_buff *skb)
 {
 #ifdef WAIT_FOR_DEMON
-       static unsigned long silence;
        DECLARE_WAITQUEUE(wait,current);
 
        add_wait_queue(&sigd_sleep,&wait);
        while (!sigd) {
                set_current_state(TASK_UNINTERRUPTIBLE);
-               if (time_after(jiffies, silence) || silence == 0) {
-                       printk(KERN_INFO "atmsvc: waiting for signaling demon "
-                           "...\n");
-                       silence = (jiffies+30*HZ)|1;
-               }
+               DPRINTK("atmsvc: waiting for signaling demon...\n");
                schedule();
        }
        current->state = TASK_RUNNING;
        remove_wait_queue(&sigd_sleep,&wait);
 #else
        if (!sigd) {
-               if (net_ratelimit())
-                       printk(KERN_WARNING "atmsvc: no signaling demon\n");
+               DPRINTK("atmsvc: no signaling demon\n");
                kfree_skb(skb);
                return;
        }
index 7fa3a5a..f36b35e 100644 (file)
@@ -81,26 +81,27 @@ static void port_carrier_check(void *arg)
 {
        struct net_device *dev = arg;
        struct net_bridge_port *p;
+       struct net_bridge *br;
 
        rtnl_lock();
        p = dev->br_port;
        if (!p)
                goto done;
-
-       if (netif_carrier_ok(p->dev)) {
-               u32 cost = port_cost(p->dev);
-
-               spin_lock_bh(&p->br->lock);
-               if (p->state == BR_STATE_DISABLED) {
-                       p->path_cost = cost;
-                       br_stp_enable_port(p);
+       br = p->br;
+
+       if (netif_carrier_ok(dev))
+               p->path_cost = port_cost(dev);
+
+       if (br->dev->flags & IFF_UP) {
+               spin_lock_bh(&br->lock);
+               if (netif_carrier_ok(dev)) {
+                       if (p->state == BR_STATE_DISABLED)
+                               br_stp_enable_port(p);
+               } else {
+                       if (p->state != BR_STATE_DISABLED)
+                               br_stp_disable_port(p);
                }
-               spin_unlock_bh(&p->br->lock);
-       } else {
-               spin_lock_bh(&p->br->lock);
-               if (p->state != BR_STATE_DISABLED)
-                       br_stp_disable_port(p);
-               spin_unlock_bh(&p->br->lock);
+               spin_unlock_bh(&br->lock);
        }
 done:
        rtnl_unlock();
@@ -168,6 +169,7 @@ static void del_nbp(struct net_bridge_port *p)
 
        rcu_assign_pointer(dev->br_port, NULL);
 
+       kobject_uevent(&p->kobj, KOBJ_REMOVE);
        kobject_del(&p->kobj);
 
        call_rcu(&p->rcu, destroy_nbp_rcu);
@@ -276,8 +278,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
        br_init_port(p);
        p->state = BR_STATE_DISABLED;
        INIT_WORK(&p->carrier_check, port_carrier_check, dev);
-       kobject_init(&p->kobj);
+       br_stp_port_timer_init(p);
 
+       kobject_init(&p->kobj);
        kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
        p->kobj.ktype = &brport_ktype;
        p->kobj.parent = &(dev->class_dev.kobj);
index 35cf3a0..23dea14 100644 (file)
@@ -39,8 +39,6 @@ void br_init_port(struct net_bridge_port *p)
        p->state = BR_STATE_BLOCKING;
        p->topology_change_ack = 0;
        p->config_pending = 0;
-
-       br_stp_port_timer_init(p);
 }
 
 /* called under bridge lock */
index aa68e0a..35d1d34 100644 (file)
@@ -2,7 +2,7 @@
  *  net/dccp/ccids/ccid3.c
  *
  *  Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand.
- *  Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz>
+ *  Copyright (c) 2005-6 Ian McDonald <imcdnzl@gmail.com>
  *
  *  An implementation of the DCCP protocol
  *
@@ -1033,9 +1033,13 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
        p_prev = hcrx->ccid3hcrx_p;
        
        /* Calculate loss event rate */
-       if (!list_empty(&hcrx->ccid3hcrx_li_hist))
+       if (!list_empty(&hcrx->ccid3hcrx_li_hist)) {
+               u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
+
                /* Scaling up by 1000000 as fixed decimal */
-               hcrx->ccid3hcrx_p = 1000000 / dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
+               if (i_mean != 0)
+                       hcrx->ccid3hcrx_p = 1000000 / i_mean;
+       }
 
        if (hcrx->ccid3hcrx_p > p_prev) {
                ccid3_hc_rx_send_feedback(sk);