RE: [PATCH] cris: lower the printk level in cris serial driver

From: Mikael Starvik
Date: Thu Sep 01 2011 - 04:44:42 EST


As a side note crisv10 is old stuff. If you want to change anything keep it simple (like changing log level). Finding someone to verify more correct modifications as Alan proposes may be difficult.

/Mikael

-----Original Message-----
From: Alan Cox [mailto:alan@xxxxxxxxxxxxxxxxxxx]
Sent: den 1 september 2011 10:10
To: Geert Uytterhoeven
Cc: WANG Cong; linux-kernel@xxxxxxxxxxxxxxx; akpm@xxxxxxxxxxxxxxxxxxxx; Mikael Starvik; Jesper Nilsson; Alan Cox; linux-cris-kernel; linux-serial@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] cris: lower the printk level in cris serial driver

> > Â Â Â Âif (info->recv_cnt + recvl > 65536) {
> > - Â Â Â Â Â Â Â printk(KERN_CRIT
> > + Â Â Â Â Â Â Â printk(KERN_INFO
> > Â Â Â Â Â Â Â Â Â Â Â "%s: Too much pending incoming serial data! Dropping %u bytes.\n", __func__, recvl);
> > Â Â Â Â Â Â Â Âreturn 0;
> > Â Â Â Â}
>
> I think dropped data warrants KERN_WARN.

If you have an overflow you want to push the relevant tty flag into the
queue. I'm not sure a printk is that useful - end users of embedded
devices (or even PC desktops) won't see it anyway and if you have serial
console it can actually make things worse

Plus of course it's not rate limited here so its a log wiping vector ...
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_