RE: [PATCH] svcauth_gss: fix error return code in rsc_parse()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx] 
Sent: 2013年4月18日 10:49
To: bfields@xxxxxxxxxxxx; Trond.Myklebust@xxxxxxxxxx; ebiederm@xxxxxxxxxxxx; skinsbursky@xxxxxxxxxxxxx; jlayton@xxxxxxxxxx; simo@xxxxxxxxxx
Cc: Yongjun Wei (RD-CN); linux-nfs@xxxxxxxxxxxxxxx
Subject: [PATCH] svcauth_gss: fix error return code in rsc_parse()

From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

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 <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
 net/sunrpc/auth_gss/svcauth_gss.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
+			}
 		}
 
 	}


<table class="TM_EMAIL_NOTICE"><tr><td><pre>
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.
</pre></td></tr></table>?韬{.n?????%??檩??w?{.n???{炳w忐)?骅w*jg????????G??⒏⒎?:+v????????????"??????




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux