All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: venkat.x.venkatsubra@oracle.com
Cc: netdev@vger.kernel.org
Subject: Improve rds_sendmsg printk
Date: Mon, 19 Mar 2012 18:40:09 -0400	[thread overview]
Message-ID: <20120319224008.GA23036@redhat.com> (raw)

- Given this can be called by any user, prevent them from flooding
  the logs by using printk_ratelimited
- Also add a rds: prefix, so it's clear where the message is coming from.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux/net/rds/send.c	2011-11-07 12:00:32.000000000 -0500
+++ linux/net/rds/send.c	2012-03-19 18:36:21.804991923 -0400
@@ -935,7 +935,7 @@ int rds_sendmsg(struct kiocb *iocb, stru
 	/* Mirror Linux UDP mirror of BSD error message compatibility */
 	/* XXX: Perhaps MSG_MORE someday */
 	if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_CMSG_COMPAT)) {
-		printk(KERN_INFO "msg_flags 0x%08X\n", msg->msg_flags);
+		printk_ratelimited(KERN_INFO "rds: msg_flags 0x%08X\n", msg->msg_flags);
 		ret = -EOPNOTSUPP;
 		goto out;
 	}

             reply	other threads:[~2012-03-19 22:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 22:40 Dave Jones [this message]
2012-03-19 22:43 ` Improve rds_sendmsg printk David Miller
2012-03-19 23:01   ` Remove printk from rds_sendmsg Dave Jones
2012-03-20 20:12     ` David Miller
2012-03-20 14:50   ` Improve rds_sendmsg printk Venkat Venkatsubra
2012-03-19 23:08 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120319224008.GA23036@redhat.com \
    --to=davej@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=venkat.x.venkatsubra@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.