* [PATCH] dynamic debug: line queries failing due to uninitialized local variable
@ 2013-08-27 16:50 jbaron
2013-08-27 17:41 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: jbaron @ 2013-08-27 16:50 UTC (permalink / raw)
To: gregkh; +Cc: joe, linux-kernel
Settings of the form, 'line x module y +p', can fail arbitrarily due to an
uninitialized local variable. With this patch results are consistent, as
expected.
Signed-off-by: Jason Baron <jbaron@akamai.com>
---
lib/dynamic_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 99fec3a..c37aeac 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -309,7 +309,7 @@ static int ddebug_parse_query(char *words[], int nwords,
struct ddebug_query *query, const char *modname)
{
unsigned int i;
- int rc;
+ int rc = 0;
/* check we have an even number of words */
if (nwords % 2 != 0) {
--
1.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dynamic debug: line queries failing due to uninitialized local variable
2013-08-27 16:50 [PATCH] dynamic debug: line queries failing due to uninitialized local variable jbaron
@ 2013-08-27 17:41 ` Greg KH
2013-08-28 14:53 ` Jason Baron
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2013-08-27 17:41 UTC (permalink / raw)
To: jbaron; +Cc: joe, linux-kernel
On Tue, Aug 27, 2013 at 04:50:03PM +0000, jbaron@akamai.com wrote:
> Settings of the form, 'line x module y +p', can fail arbitrarily due to an
> uninitialized local variable. With this patch results are consistent, as
> expected.
>
> Signed-off-by: Jason Baron <jbaron@akamai.com>
> ---
> lib/dynamic_debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
How far back should this patch go for older kernels? Is this a bug that
people are hitting today and causing problems, or is it only a 3.11-rc
issue?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dynamic debug: line queries failing due to uninitialized local variable
2013-08-27 17:41 ` Greg KH
@ 2013-08-28 14:53 ` Jason Baron
0 siblings, 0 replies; 3+ messages in thread
From: Jason Baron @ 2013-08-28 14:53 UTC (permalink / raw)
To: Greg KH; +Cc: joe@perches.com, linux-kernel@vger.kernel.org
On 08/27/2013 01:41 PM, Greg KH wrote:
> On Tue, Aug 27, 2013 at 04:50:03PM +0000, jbaron@akamai.com wrote:
>> Settings of the form, 'line x module y +p', can fail arbitrarily due to an
>> uninitialized local variable. With this patch results are consistent, as
>> expected.
>>
>> Signed-off-by: Jason Baron <jbaron@akamai.com>
>> ---
>> lib/dynamic_debug.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> How far back should this patch go for older kernels? Is this a bug that
> people are hitting today and causing problems, or is it only a 3.11-rc
> issue?
>
> thanks,
>
> greg k-h
Looks like this was introduced in >= 3.3. So its been there for quite a
while. Its a bit of a corner case, since it requires, 'line' to be
specified before anything else. It depends on on how you order your query.
I found the bug via code inspection - no bug reports that I'm aware of.
So I wouldn't think this is an urgent fix.
Thanks,
-Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-28 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 16:50 [PATCH] dynamic debug: line queries failing due to uninitialized local variable jbaron
2013-08-27 17:41 ` Greg KH
2013-08-28 14:53 ` Jason Baron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox