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 branch 'for-3.18' of git://linux-nfs.org/~bfields/linux

Pull nfsd bugfixes from Bruce Fields:
"These fix one mishandling of the case when security labels are
configured out, and two races in the 4.1 backchannel code"

* 'for-3.18' of git://linux-nfs.org/~bfields/linux:
nfsd: Fix slot wake up race in the nfsv4.1 callback code
SUNRPC: Fix locking around callback channel reply receive
nfsd: correctly define v4.2 support attributes

+28 -16
+6 -2
fs/nfsd/nfs4callback.c
··· 774 774 { 775 775 if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) { 776 776 rpc_sleep_on(&clp->cl_cb_waitq, task, NULL); 777 - dprintk("%s slot is busy\n", __func__); 778 - return false; 777 + /* Race breaker */ 778 + if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) { 779 + dprintk("%s slot is busy\n", __func__); 780 + return false; 781 + } 782 + rpc_wake_up_queued_task(&clp->cl_cb_waitq, task); 779 783 } 780 784 return true; 781 785 }
+6 -3
fs/nfsd/nfsd.h
··· 335 335 (NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT) 336 336 337 337 #ifdef CONFIG_NFSD_V4_SECURITY_LABEL 338 - #define NFSD4_2_SUPPORTED_ATTRS_WORD2 \ 339 - (NFSD4_1_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SECURITY_LABEL) 338 + #define NFSD4_2_SECURITY_ATTRS FATTR4_WORD2_SECURITY_LABEL 340 339 #else 341 - #define NFSD4_2_SUPPORTED_ATTRS_WORD2 0 340 + #define NFSD4_2_SECURITY_ATTRS 0 342 341 #endif 342 + 343 + #define NFSD4_2_SUPPORTED_ATTRS_WORD2 \ 344 + (NFSD4_1_SUPPORTED_ATTRS_WORD2 | \ 345 + NFSD4_2_SECURITY_ATTRS) 343 346 344 347 static inline u32 nfsd_suppattrs0(u32 minorversion) 345 348 {
+16 -11
net/sunrpc/svcsock.c
··· 1019 1019 xid = *p++; 1020 1020 calldir = *p; 1021 1021 1022 - if (bc_xprt) 1023 - req = xprt_lookup_rqst(bc_xprt, xid); 1024 - 1025 - if (!req) { 1026 - printk(KERN_NOTICE 1027 - "%s: Got unrecognized reply: " 1028 - "calldir 0x%x xpt_bc_xprt %p xid %08x\n", 1029 - __func__, ntohl(calldir), 1030 - bc_xprt, ntohl(xid)); 1022 + if (!bc_xprt) 1031 1023 return -EAGAIN; 1032 - } 1024 + spin_lock_bh(&bc_xprt->transport_lock); 1025 + req = xprt_lookup_rqst(bc_xprt, xid); 1026 + if (!req) 1027 + goto unlock_notfound; 1033 1028 1034 1029 memcpy(&req->rq_private_buf, &req->rq_rcv_buf, sizeof(struct xdr_buf)); 1035 1030 /* ··· 1035 1040 dst = &req->rq_private_buf.head[0]; 1036 1041 src = &rqstp->rq_arg.head[0]; 1037 1042 if (dst->iov_len < src->iov_len) 1038 - return -EAGAIN; /* whatever; just giving up. */ 1043 + goto unlock_eagain; /* whatever; just giving up. */ 1039 1044 memcpy(dst->iov_base, src->iov_base, src->iov_len); 1040 1045 xprt_complete_rqst(req->rq_task, rqstp->rq_arg.len); 1041 1046 rqstp->rq_arg.len = 0; 1047 + spin_unlock_bh(&bc_xprt->transport_lock); 1042 1048 return 0; 1049 + unlock_notfound: 1050 + printk(KERN_NOTICE 1051 + "%s: Got unrecognized reply: " 1052 + "calldir 0x%x xpt_bc_xprt %p xid %08x\n", 1053 + __func__, ntohl(calldir), 1054 + bc_xprt, ntohl(xid)); 1055 + unlock_eagain: 1056 + spin_unlock_bh(&bc_xprt->transport_lock); 1057 + return -EAGAIN; 1043 1058 } 1044 1059 1045 1060 static int copy_pages_to_kvecs(struct kvec *vec, struct page **pages, int len)