From patchwork Tue Jun 18 16:58:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Djalal Harouni X-Patchwork-Id: 2744291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE30E9F8E1 for ; Tue, 18 Jun 2013 17:08:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5F3C2044C for ; Tue, 18 Jun 2013 17:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE36920448 for ; Tue, 18 Jun 2013 17:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933207Ab3FRRHt (ORCPT ); Tue, 18 Jun 2013 13:07:49 -0400 Received: from numidia.opendz.org ([98.142.220.152]:56777 "EHLO numidia.opendz.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933173Ab3FRRHs (ORCPT ); Tue, 18 Jun 2013 13:07:48 -0400 X-Greylist: delayed 532 seconds by postgrey-1.27 at vger.kernel.org; Tue, 18 Jun 2013 13:07:48 EDT Received: from localhost (localhost [127.0.0.1]) by numidia.opendz.org (Postfix) with ESMTPSA id 4286017B409C; Tue, 18 Jun 2013 16:58:54 +0000 (UTC) From: Djalal Harouni To: Trond Myklebust , linux-nfs@vger.kernel.org Cc: Djalal Harouni Subject: [PATCH] NFSv4: SETCLIENTID add the format string for the NETID Date: Tue, 18 Jun 2013 17:58:12 +0100 Message-Id: <1371574692-10257-1-git-send-email-tixxdz@opendz.org> X-Mailer: git-send-email 1.7.11.7 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure that NFSv4 SETCLIENTID does not parse the NETID as a format string. Signed-off-by: Djalal Harouni --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2122881..822e767 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4714,7 +4714,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, /* cb_client4 */ rcu_read_lock(); setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, - sizeof(setclientid.sc_netid), + sizeof(setclientid.sc_netid), "%s", rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_NETID)); rcu_read_unlock();