linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING
@ 2014-05-29  4:18 Kinglong Mee
  2014-05-31  1:12 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2014-05-29  4:18 UTC (permalink / raw)
  To: J. Bruce Fields, Trond Myklebust; +Cc: Linux NFS Mailing List, kinglongmee

When debugging, rpc prints messages from dprintk(KERN_WARNING ...)
with "^A4" prefixed,

[ 2780.339988] ^A4nfsd: connect from unprivileged port: 127.0.0.1, port=35316

Trond tells,
> dprintk != printk. We have NEVER supported dprintk(KERN_WARNING...)

This patch removes using of dprintk with KERN_WARNING.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfsfh.c      | 5 ++---
 net/sunrpc/svcsock.c | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index a337106..ec83934 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -88,9 +88,8 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
 	/* Check if the request originated from a secure port. */
 	if (!rqstp->rq_secure && !(flags & NFSEXP_INSECURE_PORT)) {
 		RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
-		dprintk(KERN_WARNING
-		       "nfsd: request from insecure port %s!\n",
-		       svc_print_addr(rqstp, buf, sizeof(buf)));
+		dprintk("nfsd: request from insecure port %s!\n",
+		        svc_print_addr(rqstp, buf, sizeof(buf)));
 		return nfserr_perm;
 	}
 
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index f3b8eb3..b507cd3 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -849,8 +849,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)
 	 * tell us anything.  For now just warn about unpriv connections.
 	 */
 	if (!svc_port_is_privileged(sin)) {
-		dprintk(KERN_WARNING
-			"%s: connect from unprivileged port: %s\n",
+		dprintk("%s: connect from unprivileged port: %s\n",
 			serv->sv_name,
 			__svc_print_addr(sin, buf, sizeof(buf)));
 	}
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING
  2014-05-29  4:18 [PATCH] SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING Kinglong Mee
@ 2014-05-31  1:12 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2014-05-31  1:12 UTC (permalink / raw)
  To: Kinglong Mee; +Cc: Trond Myklebust, Linux NFS Mailing List

Thanks, applying.--b

On Thu, May 29, 2014 at 12:18:52PM +0800, Kinglong Mee wrote:
> When debugging, rpc prints messages from dprintk(KERN_WARNING ...)
> with "^A4" prefixed,
> 
> [ 2780.339988] ^A4nfsd: connect from unprivileged port: 127.0.0.1, port=35316
> 
> Trond tells,
> > dprintk != printk. We have NEVER supported dprintk(KERN_WARNING...)
> 
> This patch removes using of dprintk with KERN_WARNING.
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/nfsfh.c      | 5 ++---
>  net/sunrpc/svcsock.c | 3 +--
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> index a337106..ec83934 100644
> --- a/fs/nfsd/nfsfh.c
> +++ b/fs/nfsd/nfsfh.c
> @@ -88,9 +88,8 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
>  	/* Check if the request originated from a secure port. */
>  	if (!rqstp->rq_secure && !(flags & NFSEXP_INSECURE_PORT)) {
>  		RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
> -		dprintk(KERN_WARNING
> -		       "nfsd: request from insecure port %s!\n",
> -		       svc_print_addr(rqstp, buf, sizeof(buf)));
> +		dprintk("nfsd: request from insecure port %s!\n",
> +		        svc_print_addr(rqstp, buf, sizeof(buf)));
>  		return nfserr_perm;
>  	}
>  
> diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
> index f3b8eb3..b507cd3 100644
> --- a/net/sunrpc/svcsock.c
> +++ b/net/sunrpc/svcsock.c
> @@ -849,8 +849,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)
>  	 * tell us anything.  For now just warn about unpriv connections.
>  	 */
>  	if (!svc_port_is_privileged(sin)) {
> -		dprintk(KERN_WARNING
> -			"%s: connect from unprivileged port: %s\n",
> +		dprintk("%s: connect from unprivileged port: %s\n",
>  			serv->sv_name,
>  			__svc_print_addr(sin, buf, sizeof(buf)));
>  	}
> -- 
> 1.9.3
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-31  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29  4:18 [PATCH] SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING Kinglong Mee
2014-05-31  1:12 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).