]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 04:30:02 +0000 (20:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 04:30:02 +0000 (20:30 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits)
  pptp: Accept packet with seq zero
  RDS: Remove some unused iWARP code
  net: fsl: fec: handle 10Mbps speed in RMII mode
  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: add missing iounmap
  drivers/net/ethernet/tundra/tsi108_eth.c: add missing iounmap
  ksz884x: fix mtu for VLAN
  net_sched: sfq: add optional RED on top of SFQ
  dp83640: Fix NOHZ local_softirq_pending 08 warning
  gianfar: Fix invalid TX frames returned on error queue when time stamping
  gianfar: Fix missing sock reference when processing TX time stamps
  phylib: introduce mdiobus_alloc_size()
  net: decrement memcg jump label when limit, not usage, is changed
  net: reintroduce missing rcu_assign_pointer() calls
  inet_diag: Rename inet_diag_req_compat into inet_diag_req
  inet_diag: Rename inet_diag_req into inet_diag_req_v2
  bond_alb: don't disable softirq under bond_alb_xmit
  mac80211: fix rx->key NULL pointer dereference in promiscuous mode
  nl80211: fix old station flags compatibility
  mdio-octeon: use an unique MDIO bus name.
  mdio-gpio: use an unique MDIO bus name.
  ...

1  2 
net/sunrpc/auth_gss/auth_gss.c

index 28d72d298735e0f3d72d161220a1241c241fb98d,db0efdec4e4516b58601e4bb4cda5b3ff9dbdc47..affa631ac1abe3d42f75635a30e1f066dccbfb44
@@@ -122,7 -122,7 +122,7 @@@ gss_cred_set_ctx(struct rpc_cred *cred
        if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags))
                return;
        gss_get_ctx(ctx);
-       RCU_INIT_POINTER(gss_cred->gc_ctx, ctx);
+       rcu_assign_pointer(gss_cred->gc_ctx, ctx);
        set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
        smp_mb__before_clear_bit();
        clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags);
@@@ -392,8 -392,7 +392,8 @@@ static void gss_encode_v0_msg(struct gs
  }
  
  static void gss_encode_v1_msg(struct gss_upcall_msg *gss_msg,
 -                              struct rpc_clnt *clnt, int machine_cred)
 +                              struct rpc_clnt *clnt,
 +                              const char *service_name)
  {
        struct gss_api_mech *mech = gss_msg->auth->mech;
        char *p = gss_msg->databuf;
                p += len;
                gss_msg->msg.len += len;
        }
 -      if (machine_cred) {
 -              len = sprintf(p, "service=* ");
 -              p += len;
 -              gss_msg->msg.len += len;
 -      } else if (!strcmp(clnt->cl_program->name, "nfs4_cb")) {
 -              len = sprintf(p, "service=nfs ");
 +      if (service_name != NULL) {
 +              len = sprintf(p, "service=%s ", service_name);
                p += len;
                gss_msg->msg.len += len;
        }
  }
  
  static void gss_encode_msg(struct gss_upcall_msg *gss_msg,
 -                              struct rpc_clnt *clnt, int machine_cred)
 +                              struct rpc_clnt *clnt,
 +                              const char *service_name)
  {
        if (pipe_version == 0)
                gss_encode_v0_msg(gss_msg);
        else /* pipe_version == 1 */
 -              gss_encode_v1_msg(gss_msg, clnt, machine_cred);
 +              gss_encode_v1_msg(gss_msg, clnt, service_name);
  }
  
 -static inline struct gss_upcall_msg *
 -gss_alloc_msg(struct gss_auth *gss_auth, uid_t uid, struct rpc_clnt *clnt,
 -              int machine_cred)
 +static struct gss_upcall_msg *
 +gss_alloc_msg(struct gss_auth *gss_auth, struct rpc_clnt *clnt,
 +              uid_t uid, const char *service_name)
  {
        struct gss_upcall_msg *gss_msg;
        int vers;
        atomic_set(&gss_msg->count, 1);
        gss_msg->uid = uid;
        gss_msg->auth = gss_auth;
 -      gss_encode_msg(gss_msg, clnt, machine_cred);
 +      gss_encode_msg(gss_msg, clnt, service_name);
        return gss_msg;
  }
  
@@@ -469,7 -471,7 +469,7 @@@ gss_setup_upcall(struct rpc_clnt *clnt
        struct gss_upcall_msg *gss_new, *gss_msg;
        uid_t uid = cred->cr_uid;
  
 -      gss_new = gss_alloc_msg(gss_auth, uid, clnt, gss_cred->gc_machine_cred);
 +      gss_new = gss_alloc_msg(gss_auth, clnt, uid, gss_cred->gc_principal);
        if (IS_ERR(gss_new))
                return gss_new;
        gss_msg = gss_add_msg(gss_new);
@@@ -993,9 -995,7 +993,9 @@@ gss_create_cred(struct rpc_auth *auth, 
         */
        cred->gc_base.cr_flags = 1UL << RPCAUTH_CRED_NEW;
        cred->gc_service = gss_auth->service;
 -      cred->gc_machine_cred = acred->machine_cred;
 +      cred->gc_principal = NULL;
 +      if (acred->machine_cred)
 +              cred->gc_principal = acred->principal;
        kref_get(&gss_auth->kref);
        return &cred->gc_base;
  
@@@ -1030,12 -1030,7 +1030,12 @@@ gss_match(struct auth_cred *acred, stru
        if (!test_bit(RPCAUTH_CRED_UPTODATE, &rc->cr_flags))
                return 0;
  out:
 -      if (acred->machine_cred != gss_cred->gc_machine_cred)
 +      if (acred->principal != NULL) {
 +              if (gss_cred->gc_principal == NULL)
 +                      return 0;
 +              return strcmp(acred->principal, gss_cred->gc_principal) == 0;
 +      }
 +      if (gss_cred->gc_principal != NULL)
                return 0;
        return rc->cr_uid == acred->uid;
  }
@@@ -1109,8 -1104,7 +1109,8 @@@ static int gss_renew_cred(struct rpc_ta
        struct rpc_auth *auth = oldcred->cr_auth;
        struct auth_cred acred = {
                .uid = oldcred->cr_uid,
 -              .machine_cred = gss_cred->gc_machine_cred,
 +              .principal = gss_cred->gc_principal,
 +              .machine_cred = (gss_cred->gc_principal != NULL ? 1 : 0),
        };
        struct rpc_cred *new;