Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-31 Thread Sylvain Munaut
Hi, >> Sylvan Munaut did something similar >> https://lkml.org/lkml/2012/12/5/168 > > Missed that and duplicated the debugging :( > Sorry Sylvain. I should have followed up on the patch sooner, but I basically finished testing it fixed all the issues and posted it just before leaving for vacation

Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-29 Thread Joe Perches
On Sat, 2012-12-29 at 14:27 -0800, Roland Dreier wrote: > On Sat, Dec 29, 2012 at 12:08 PM, Joe Perches wrote: > > Sylvan Munaut did something similar > > https://lkml.org/lkml/2012/12/5/168 > > Missed that and duplicated the debugging :( > Sorry Sylvain. > > I guess my patch may be preferable,

Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-29 Thread Roland Dreier
On Sat, Dec 29, 2012 at 12:08 PM, Joe Perches wrote: > Sylvan Munaut did something similar > https://lkml.org/lkml/2012/12/5/168 Missed that and duplicated the debugging :( Sorry Sylvain. I guess my patch may be preferable, since I happened to use the snprintf() method that you suggest -- all th

Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-29 Thread Roland Dreier
On Sat, Dec 29, 2012 at 9:56 AM, Greg Kroah-Hartman wrote: > Nice work. When did you start seeing this problem, 3.6 or so? I ask as > it's probably something that should go to stable as well if so. We happened to see it when we rebased to the 3.6 kernel, but as far as I can see, the bug has bee

Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-29 Thread Joe Perches
On Sat, 2012-12-29 at 09:56 -0800, Greg Kroah-Hartman wrote: > On Fri, Dec 28, 2012 at 08:23:04PM -0800, Roland Dreier wrote: > > From: Roland Dreier > > > > print_prefix() passes a NULL buf to print_time() to get the length of > > the time prefix; when printk times are enabled, the current code

Re: [PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-29 Thread Greg Kroah-Hartman
On Fri, Dec 28, 2012 at 08:23:04PM -0800, Roland Dreier wrote: > From: Roland Dreier > > print_prefix() passes a NULL buf to print_time() to get the length of > the time prefix; when printk times are enabled, the current code just > returns the constant 15, which matches the format "[%5lu.%06lu]

[PATCH] printk: Fix incorrect length from print_time() when seconds > 99999

2012-12-28 Thread Roland Dreier
From: Roland Dreier print_prefix() passes a NULL buf to print_time() to get the length of the time prefix; when printk times are enabled, the current code just returns the constant 15, which matches the format "[%5lu.%06lu] " used to print the time value. However, this is obviously incorrect whe