Re: [PATCH]tracing: Fix inaccurate function definition intrace_events_filter.c

From: Steven Rostedt
Date: Fri Dec 11 2009 - 09:39:34 EST


On Fri, 2009-12-11 at 16:15 +0800, Li Zefan wrote:
> Wenji Huang wrote:
> > Use strcmp instead of strncmp to do full match.
> >
>
> It's intended to use strncmp instead of strcmp..
>
> field(char, name, size) will be treated as a STATIC_STRING by
> filter code. But this field isn't necessarily a string, it
> can be an array of chars, which may not be ended with '\0'.
> So in this case, we can't use strcmp.
>
> So do you really see incorrect filter results?

Yeah, I agree that this should be strncmp. Have you seen errors?

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/