Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361137
b: refs/heads/master
c: 0da9dfd
h: refs/heads/master
i:
  361135: e4ff14c
v: v3
  • Loading branch information
David Howells authored and James Morris committed Mar 12, 2013
1 parent 5a71687 commit b1870bb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 368edaadc0f68712848d761c9bcbb12480b61a39
refs/heads/master: 0da9dfdd2cd9889201bc6f6f43580c99165cd087
3 changes: 0 additions & 3 deletions trunk/fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,9 +863,6 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
{
int ret = -ENOENT;

if (!(filp->f_mode & (FMODE_READ|FMODE_WRITE)))
return -EINVAL;

mutex_lock(&inode->i_mutex);

if (inode->i_pipe) {
Expand Down
42 changes: 13 additions & 29 deletions trunk/net/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,24 +654,6 @@ static int osdmap_set_max_osd(struct ceph_osdmap *map, int max)
return 0;
}

static int __decode_pgid(void **p, void *end, struct ceph_pg *pg)
{
u8 v;

ceph_decode_need(p, end, 1+8+4+4, bad);
v = ceph_decode_8(p);
if (v != 1)
goto bad;
pg->pool = ceph_decode_64(p);
pg->seed = ceph_decode_32(p);
*p += 4; /* skip preferred */
return 0;

bad:
dout("error decoding pgid\n");
return -EINVAL;
}

/*
* decode a full map.
*/
Expand Down Expand Up @@ -763,12 +745,13 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end)
for (i = 0; i < len; i++) {
int n, j;
struct ceph_pg pgid;
struct ceph_pg_v1 pgid_v1;
struct ceph_pg_mapping *pg;

err = __decode_pgid(p, end, &pgid);
if (err)
goto bad;
ceph_decode_need(p, end, sizeof(u32), bad);
ceph_decode_need(p, end, sizeof(u32) + sizeof(u64), bad);
ceph_decode_copy(p, &pgid_v1, sizeof(pgid_v1));
pgid.pool = le32_to_cpu(pgid_v1.pool);
pgid.seed = le16_to_cpu(pgid_v1.ps);
n = ceph_decode_32(p);
err = -EINVAL;
if (n > (UINT_MAX - sizeof(*pg)) / sizeof(u32))
Expand Down Expand Up @@ -835,8 +818,8 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
u16 version;

ceph_decode_16_safe(p, end, version, bad);
if (version != 6) {
pr_warning("got unknown v %d != 6 of inc osdmap\n", version);
if (version > 6) {
pr_warning("got unknown v %d > %d of inc osdmap\n", version, 6);
goto bad;
}

Expand Down Expand Up @@ -980,14 +963,15 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
while (len--) {
struct ceph_pg_mapping *pg;
int j;
struct ceph_pg_v1 pgid_v1;
struct ceph_pg pgid;
u32 pglen;

err = __decode_pgid(p, end, &pgid);
if (err)
goto bad;
ceph_decode_need(p, end, sizeof(u32), bad);
ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad);
ceph_decode_copy(p, &pgid_v1, sizeof(pgid_v1));
pgid.pool = le32_to_cpu(pgid_v1.pool);
pgid.seed = le16_to_cpu(pgid_v1.ps);
pglen = ceph_decode_32(p);

if (pglen) {
ceph_decode_need(p, end, pglen*sizeof(u32), bad);

Expand Down
12 changes: 4 additions & 8 deletions trunk/net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,21 +447,17 @@ static int rsc_parse(struct cache_detail *cd,
else {
int N, i;

/*
* NOTE: we skip uid_valid()/gid_valid() checks here:
* instead, * -1 id's are later mapped to the
* (export-specific) anonymous id by nfsd_setuser.
*
* (But supplementary gid's get no such special
* treatment so are checked for validity here.)
*/
/* uid */
rsci.cred.cr_uid = make_kuid(&init_user_ns, id);
if (!uid_valid(rsci.cred.cr_uid))
goto out;

/* gid */
if (get_int(&mesg, &id))
goto out;
rsci.cred.cr_gid = make_kgid(&init_user_ns, id);
if (!gid_valid(rsci.cred.cr_gid))
goto out;

/* number of additional gid's */
if (get_int(&mesg, &N))
Expand Down
15 changes: 5 additions & 10 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,14 +849,6 @@ static void xs_tcp_close(struct rpc_xprt *xprt)
xs_tcp_shutdown(xprt);
}

static void xs_local_destroy(struct rpc_xprt *xprt)
{
xs_close(xprt);
xs_free_peer_addresses(xprt);
xprt_free(xprt);
module_put(THIS_MODULE);
}

/**
* xs_destroy - prepare to shutdown a transport
* @xprt: doomed transport
Expand All @@ -870,7 +862,10 @@ static void xs_destroy(struct rpc_xprt *xprt)

cancel_delayed_work_sync(&transport->connect_worker);

xs_local_destroy(xprt);
xs_close(xprt);
xs_free_peer_addresses(xprt);
xprt_free(xprt);
module_put(THIS_MODULE);
}

static inline struct rpc_xprt *xprt_from_sock(struct sock *sk)
Expand Down Expand Up @@ -2487,7 +2482,7 @@ static struct rpc_xprt_ops xs_local_ops = {
.send_request = xs_local_send_request,
.set_retrans_timeout = xprt_set_retrans_timeout_def,
.close = xs_close,
.destroy = xs_local_destroy,
.destroy = xs_destroy,
.print_stats = xs_local_print_stats,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/security/keys/process_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int install_user_keyrings(void)

kenter("%p{%u}", user, uid);

if (user->uid_keyring) {
if (user->uid_keyring && user->session_keyring) {
kleave(" = 0 [exist]");
return 0;
}
Expand Down

0 comments on commit b1870bb

Please sign in to comment.