From patchwork Tue Mar 7 09:22:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 9608397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FB386046A for ; Tue, 7 Mar 2017 09:23:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C36028456 for ; Tue, 7 Mar 2017 09:23:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 210302849F; Tue, 7 Mar 2017 09:23:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC54B28456 for ; Tue, 7 Mar 2017 09:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdCGJXU (ORCPT ); Tue, 7 Mar 2017 04:23:20 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:33100 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753157AbdCGJXP (ORCPT ); Tue, 7 Mar 2017 04:23:15 -0500 Received: by mail-it0-f68.google.com with SMTP id g138so4191356itb.0 for ; Tue, 07 Mar 2017 01:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=b0MH+07tvl2JC3mi2ukg3YQnA4MGRRMKH2ZmHcN98Sc=; b=BgdpK7jPfpimY4DNcUEAsoFEpziwk6MSGYeM17ghapQIyrk8SM/cRgaCnoS9o3EusO QtqrkM9ZSKqgoofXuf58unFxRzW/VxI5oSx/AwnNogfm2cJbs7b3nq4dOqjbv3fd3A8X NWJnZMzxj6xC7zkxtvfSNwmJ/hXYlQQXhH4yM4uzArOnV1N3B0KP9xiptc0O27spn3Eq tomc5dWx23mN1s8d1yKJR0sHREQvA5Z4x932g9T8roxubsawCly9DsHpK5W6ygaJOUJT zH0X6ZgqDpDasibankEQjAkIK2WYYVYj1jU0a09lpXggvwtZegFt3d7DKSHLyZzoL/KH FGPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=b0MH+07tvl2JC3mi2ukg3YQnA4MGRRMKH2ZmHcN98Sc=; b=rx3wslNTYOrxlJSt3/gazS49CLVYMk/pUyXbTsSD0aXU4OO9TpDPtn2VEEA/RqILj+ hWZ2bgBZHcoovEH+KcMI1ij2vFBa6phCnIp03V62yoJsXAGmfp3lRM9eCC/j5pzJopSI o/S5wJkaXwHO5QcwXVc7ASqYjGvw7yWhzjDIQjgaZw+0qpSMM7u1YXILuMqh7+G/0XVm gn7RJriDzGjWbaIVY03LOqgGhANeTdNhCyWNraMB7915uN3+yNFWtGTB+qCzRF+idALt bxtPkDQ+xXqbA8/OoELRErw+qnj+huM9xi24+MkvBiESZNSFIWtFcgyM+oI2SN+idkDQ REHQ== X-Gm-Message-State: AMke39lHkRfZ9DXJAO0uSGUkXiN37Cag7XAIP58pRgKKIHB7sSzoFoJ1T2BroEJYYz8Dxw== X-Received: by 10.36.20.1 with SMTP id 1mr19765427itg.121.1488878575661; Tue, 07 Mar 2017 01:22:55 -0800 (PST) Received: from [192.168.0.101] ([183.228.28.90]) by smtp.gmail.com with ESMTPSA id j79sm6097211itb.0.2017.03.07.01.22.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 01:22:54 -0800 (PST) To: Trond Myklebust , "linux-nfs@vger.kernel.org" Cc: "J. Bruce Fields" , Kinglong Mee , Anna Schumaker , Jeff Layton From: Kinglong Mee Subject: [PATCH] SUNRPC/backchanel: set XPT_CONG_CTRL flag for bc xprt Message-ID: Date: Tue, 7 Mar 2017 17:22:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The xprt for backchannel is created separately, not in TCP/UDP code. Because without the flags, the requests from NFSv41 backchannel are rejected in svc_process_common(), 1191 if (versp->vs_need_cong_ctrl && 1192 !test_bit(XPT_CONG_CTRL, &rqstp->rq_xprt->xpt_flags)) 1193 goto err_bad_vers; Fixes: 5283b03ee5 ("nfs/nfsd/sunrpc: enforce transport...") Signed-off-by: Kinglong Mee Reviewed-by: Jeff Layton --- net/sunrpc/svcsock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 8931e33..2b720fa 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -1635,6 +1635,7 @@ static struct svc_xprt *svc_bc_create_socket(struct svc_serv *serv, xprt = &svsk->sk_xprt; svc_xprt_init(net, &svc_tcp_bc_class, xprt, serv); + set_bit(XPT_CONG_CTRL, &svsk->sk_xprt.xpt_flags); serv->sv_bc_xprt = xprt;