Re: [PATCH 2/6] trace syscalls: Remove redundant syscall_nr checks

From: Ian Munsie
Date: Tue Dec 07 2010 - 18:47:51 EST


Excerpts from Steven Rostedt's message of Wed Dec 08 01:54:42 +1100 2010:
> On Tue, 2010-12-07 at 15:29 +1100, Ian Munsie wrote:
> > From: Ian Munsie <imunsie@xxxxxxxxxxx>
> >
> > With the ftrace events now checking if the syscall_nr is valid upon
> > initialisation, there is no need to verify it when registering and
> > unregistering the events, so remove the check.
>
> I still like to keep these checks. I don't mind redundant checks that
> are in slow paths, as they may catch a bug on a change in the future.
>
> What you could do is change these to:
>
> if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls))

Hi Steve,

Thanks for the feedback. Will update and resubmit.

Cheers,
-Ian
--
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/