* Improve rds_sendmsg printk
@ 2012-03-19 22:40 Dave Jones
2012-03-19 22:43 ` David Miller
2012-03-19 23:08 ` Joe Perches
0 siblings, 2 replies; 6+ messages in thread
From: Dave Jones @ 2012-03-19 22:40 UTC (permalink / raw)
To: venkat.x.venkatsubra; +Cc: netdev
- 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;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Improve rds_sendmsg printk
2012-03-19 22:40 Improve rds_sendmsg printk Dave Jones
@ 2012-03-19 22:43 ` David Miller
2012-03-19 23:01 ` Remove printk from rds_sendmsg Dave Jones
2012-03-20 14:50 ` Improve rds_sendmsg printk Venkat Venkatsubra
2012-03-19 23:08 ` Joe Perches
1 sibling, 2 replies; 6+ messages in thread
From: David Miller @ 2012-03-19 22:43 UTC (permalink / raw)
To: davej; +Cc: venkat.x.venkatsubra, netdev
From: Dave Jones <davej@redhat.com>
Date: Mon, 19 Mar 2012 18:40:09 -0400
> - 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>
I think it should be removed entirely, no socket layer outputs
a message for this error and neither should rds.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Remove printk from rds_sendmsg
2012-03-19 22:43 ` David Miller
@ 2012-03-19 23:01 ` Dave Jones
2012-03-20 20:12 ` David Miller
2012-03-20 14:50 ` Improve rds_sendmsg printk Venkat Venkatsubra
1 sibling, 1 reply; 6+ messages in thread
From: Dave Jones @ 2012-03-19 23:01 UTC (permalink / raw)
To: David Miller; +Cc: venkat.x.venkatsubra, netdev
no socket layer outputs a message for this error and neither should rds.
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:59:55.905890597 -0400
@@ -935,7 +935,6 @@ 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);
ret = -EOPNOTSUPP;
goto out;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Improve rds_sendmsg printk
2012-03-19 22:40 Improve rds_sendmsg printk Dave Jones
2012-03-19 22:43 ` David Miller
@ 2012-03-19 23:08 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2012-03-19 23:08 UTC (permalink / raw)
To: Dave Jones; +Cc: venkat.x.venkatsubra, netdev
On Mon, 2012-03-19 at 18:40 -0400, Dave Jones wrote:
> - 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);
It might be better to use net_ratelimit
for all the rds printk_ratelimited calls.
That's a bit more standardized across net/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Improve rds_sendmsg printk
2012-03-19 22:43 ` David Miller
2012-03-19 23:01 ` Remove printk from rds_sendmsg Dave Jones
@ 2012-03-20 14:50 ` Venkat Venkatsubra
1 sibling, 0 replies; 6+ messages in thread
From: Venkat Venkatsubra @ 2012-03-20 14:50 UTC (permalink / raw)
To: David Miller; +Cc: davej, netdev
On 3/19/2012 5:43 PM, David Miller wrote:
> From: Dave Jones<davej@redhat.com>
> Date: Mon, 19 Mar 2012 18:40:09 -0400
>
>> - 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>
> I think it should be removed entirely, no socket layer outputs
> a message for this error and neither should rds.
Agree, the message could be removed entirely.
Venkat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Remove printk from rds_sendmsg
2012-03-19 23:01 ` Remove printk from rds_sendmsg Dave Jones
@ 2012-03-20 20:12 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-03-20 20:12 UTC (permalink / raw)
To: davej; +Cc: venkat.x.venkatsubra, netdev
From: Dave Jones <davej@redhat.com>
Date: Mon, 19 Mar 2012 19:01:07 -0400
> no socket layer outputs a message for this error and neither should rds.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-20 20:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 22:40 Improve rds_sendmsg printk Dave Jones
2012-03-19 22:43 ` 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
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).