From patchwork Thu Apr 18 03:01:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "yongjun_wei@trendmicro.com.cn" X-Patchwork-Id: 2457401 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A7D283FCA5 for ; Thu, 18 Apr 2013 03:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965302Ab3DRDcM (ORCPT ); Wed, 17 Apr 2013 23:32:12 -0400 Received: from sjdciscan02.udc.trendmicro.com ([66.180.82.18]:58048 "EHLO sjdciscan02.udc.trendmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965179Ab3DRDcL (ORCPT ); Wed, 17 Apr 2013 23:32:11 -0400 X-Greylist: delayed 1837 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Apr 2013 23:32:11 EDT Received: from sjdciscan02.udc.trendmicro.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3CBD61180A5; Wed, 17 Apr 2013 20:01:34 -0700 (PDT) Received: from SJDCEXCH03.us.trendnet.org (unknown [10.45.26.203]) by sjdciscan02.udc.trendmicro.com (Postfix) with ESMTP id 305CB1180A2; Wed, 17 Apr 2013 20:01:34 -0700 (PDT) Received: from CDCEXCH01.tw.trendnet.org (10.64.1.11) by SJDCEXCH03.us.trendnet.org (10.45.26.203) with Microsoft SMTP Server (TLS) id 14.2.328.9; Wed, 17 Apr 2013 20:01:33 -0700 Received: from CDCEXMBX01.tw.trendnet.org ([fe80::7125:ce2:882:cc93]) by CDCEXCH01.tw.trendnet.org ([fe80::a162:56f2:1dd1:20b6%16]) with mapi id 14.02.0328.009; Thu, 18 Apr 2013 11:01:30 +0800 From: "yongjun_wei@trendmicro.com.cn" To: Wei Yongjun , "bfields@fieldses.org" , "Trond.Myklebust@netapp.com" , "ebiederm@xmission.com" , "skinsbursky@parallels.com" , "jlayton@redhat.com" , "simo@redhat.com" CC: "linux-nfs@vger.kernel.org" Subject: RE: [PATCH] svcauth_gss: fix error return code in rsc_parse() Thread-Topic: [PATCH] svcauth_gss: fix error return code in rsc_parse() Thread-Index: AQHOO99PiAdgqJHQqU2pwChof8KQhpjbSblQ Date: Thu, 18 Apr 2013 03:01:29 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.64.44.136] MIME-Version: 1.0 X-TM-AS-MML: No X-TM-AS-Product-Ver: IMSVA-8.2.0.1679-7.0.0.1014-19806.004 X-TMASE-Version: IMSVA-8.2.0.1679-7.0.1014-19806.004 X-TMASE-Result: 10--27.932700-5.000000 X-TMASE-MatchedRID: hye8xZuNxhC8GTsHd+EMkBk4wcN85RIuAya39voTToUjK+nUBBcfy34r ryovYbmmNEJplIoT86yzUsh4NHH6Y4gopU++spx9SxNdhbJ2Rj5yxv+M9jXWI4SvKOGqLLPKMAp qy5cfknW1eX0jEQ9c6izx16Vv+XowHUq8/QSe17FliM36l+FCSlPhD3wYqtxv9UVHiwLx0/JCX8 V1FiRRkt9RlPzeVuQQj3QbFpHxze2eCuTn73tUQ/Izyns1oTrIWcbhowRxPdPK09/T6AzbVmwKP oE/RQ1U/fLu9P6UfRop+kTolgio6ZiX7LzRdRHGEUgvYUL4yWJ/cp06gDsgiPwvByakxBV4gHzg wy8qV5qlvIixP/JrwdjwnRPo6utTqYB+kyCYtxSp/0Tw8D0DmAtuKBGekqUpPjKoPgsq7cA= Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Sorry, my mail server got something wrong, those mail with title '[PATCH] svcauth_gss: fix error return code in rsc_parse()' are all the same, just dup sent by the mail server. Regards, -----Original Message----- From: Wei Yongjun [mailto:weiyj.lk@gmail.com] Sent: 2013?4?18? 10:49 To: bfields@fieldses.org; Trond.Myklebust@netapp.com; ebiederm@xmission.com; skinsbursky@parallels.com; jlayton@redhat.com; simo@redhat.com Cc: Yongjun Wei (RD-CN); linux-nfs@vger.kernel.org Subject: [PATCH] svcauth_gss: fix error return code in rsc_parse() From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun --- net/sunrpc/auth_gss/svcauth_gss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 5ead605..c2156fb 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -505,8 +505,10 @@ static int rsc_parse(struct cache_detail *cd, len = qword_get(&mesg, buf, mlen); if (len > 0) { rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL); - if (!rsci.cred.cr_principal) + if (!rsci.cred.cr_principal) { + status = -ENOMEM; goto out; + } } }