Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fixes from Chuck Lever:

- Fix a crash and a resource leak in NFSv4 COMPOUND processing

- Fix issues with AUTH_SYS credential handling

- Try again to address an NFS/NFSD/SUNRPC build dependency regression

* tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
NFSD: callback request does not use correct credential for AUTH_SYS
NFS: Remove "select RPCSEC_GSS_KRB5
sunrpc: only free unix grouplist after RCU settles
nfsd: call op_release, even when op_func returns an error
NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL

+24 -14
-1
fs/nfs/Kconfig
··· 75 75 config NFS_V4 76 76 tristate "NFS client support for NFS version 4" 77 77 depends on NFS_FS 78 - select RPCSEC_GSS_KRB5 79 78 select KEYS 80 79 help 81 80 This option enables support for version 4 of the NFS protocol
+1
fs/nfsd/blocklayout.c
··· 297 297 298 298 out_free_dev: 299 299 kfree(dev); 300 + gdp->gd_device = NULL; 300 301 return ret; 301 302 } 302 303
+2 -2
fs/nfsd/nfs4callback.c
··· 946 946 if (!kcred) 947 947 return NULL; 948 948 949 - kcred->uid = ses->se_cb_sec.uid; 950 - kcred->gid = ses->se_cb_sec.gid; 949 + kcred->fsuid = ses->se_cb_sec.uid; 950 + kcred->fsgid = ses->se_cb_sec.gid; 951 951 return kcred; 952 952 } 953 953 }
+8 -7
fs/nfsd/nfs4xdr.c
··· 2476 2476 for (i = 0; i < argp->opcnt; i++) { 2477 2477 op = &argp->ops[i]; 2478 2478 op->replay = NULL; 2479 + op->opdesc = NULL; 2479 2480 2480 2481 if (xdr_stream_decode_u32(argp->xdr, &op->opnum) < 0) 2481 2482 return false; 2482 2483 if (nfsd4_opnum_in_range(argp, op)) { 2484 + op->opdesc = OPDESC(op); 2483 2485 op->status = nfsd4_dec_ops[op->opnum](argp, &op->u); 2484 2486 if (op->status != nfs_ok) 2485 2487 trace_nfsd_compound_decode_err(argp->rqstp, ··· 2492 2490 op->opnum = OP_ILLEGAL; 2493 2491 op->status = nfserr_op_illegal; 2494 2492 } 2495 - op->opdesc = OPDESC(op); 2493 + 2496 2494 /* 2497 2495 * We'll try to cache the result in the DRC if any one 2498 2496 * op in the compound wants to be cached: ··· 5402 5400 __be32 *p; 5403 5401 5404 5402 p = xdr_reserve_space(xdr, 8); 5405 - if (!p) { 5406 - WARN_ON_ONCE(1); 5407 - return; 5408 - } 5403 + if (!p) 5404 + goto release; 5409 5405 *p++ = cpu_to_be32(op->opnum); 5410 5406 post_err_offset = xdr->buf->len; 5411 5407 ··· 5418 5418 op->status = encoder(resp, op->status, &op->u); 5419 5419 if (op->status) 5420 5420 trace_nfsd_compound_encode_err(rqstp, op->opnum, op->status); 5421 - if (opdesc && opdesc->op_release) 5422 - opdesc->op_release(&op->u); 5423 5421 xdr_commit_encode(xdr); 5424 5422 5425 5423 /* nfsd4_check_resp_size guarantees enough room for error status */ ··· 5458 5460 } 5459 5461 status: 5460 5462 *p = op->status; 5463 + release: 5464 + if (opdesc && opdesc->op_release) 5465 + opdesc->op_release(&op->u); 5461 5466 } 5462 5467 5463 5468 /*
+13 -4
net/sunrpc/svcauth_unix.c
··· 416 416 return hash_long(from_kuid(&init_user_ns, uid), GID_HASHBITS); 417 417 } 418 418 419 + static void unix_gid_free(struct rcu_head *rcu) 420 + { 421 + struct unix_gid *ug = container_of(rcu, struct unix_gid, rcu); 422 + struct cache_head *item = &ug->h; 423 + 424 + if (test_bit(CACHE_VALID, &item->flags) && 425 + !test_bit(CACHE_NEGATIVE, &item->flags)) 426 + put_group_info(ug->gi); 427 + kfree(ug); 428 + } 429 + 419 430 static void unix_gid_put(struct kref *kref) 420 431 { 421 432 struct cache_head *item = container_of(kref, struct cache_head, ref); 422 433 struct unix_gid *ug = container_of(item, struct unix_gid, h); 423 - if (test_bit(CACHE_VALID, &item->flags) && 424 - !test_bit(CACHE_NEGATIVE, &item->flags)) 425 - put_group_info(ug->gi); 426 - kfree_rcu(ug, rcu); 434 + 435 + call_rcu(&ug->rcu, unix_gid_free); 427 436 } 428 437 429 438 static int unix_gid_match(struct cache_head *corig, struct cache_head *cnew)