Re: [PATCH] Traffic control cgroups subsystem

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, July 23, 2008 - 3:05 pm

On Tue, 22 Jul 2008 10:44:18 -0700 (PDT)
Ranjit Manomohan <ranjitm@google.com> wrote:


Your email client is performing space-stuffing.  It's easy enough to
fix at this end (s/^ / /g) but is a bit of a hassle.


This causes a warning:

net/sched/cls_flow.c: In function 'flow_classify':
net/sched/cls_flow.c:344: warning: 'key' may be used uninitialized in this function

that warning is a non-issue if we happen to know that f->nkeys can
never be zero.  I don't know if that is guaranteed at this code site?

If so, it would be nice to suppress the warning in some fashion. 
uninitialized_var() is one way, but suitable code reorganisation is
preferred.

I note that flow_classify() has an on-stack dynamically-sized array:

		u32 keys[f->nkeys];

I hope that f->nkeys is a) small and b) not user-controllable.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Traffic control cgroups subsystem, Ranjit Manomohan, (Tue Jul 22, 10:44 am)
Re: [PATCH] Traffic control cgroups subsystem, Andrew Morton, (Wed Jul 23, 3:05 pm)
Re: [PATCH] Traffic control cgroups subsystem, Patrick McHardy, (Wed Jul 23, 3:34 pm)
Re: [PATCH] Traffic control cgroups subsystem, Ranjit Manomohan, (Wed Jul 23, 4:54 pm)
Re: [PATCH] Traffic control cgroups subsystem, Patrick McHardy, (Wed Jul 23, 5:17 pm)
Re: [PATCH] Traffic control cgroups subsystem, Thomas Graf, (Thu Jul 24, 4:45 pm)
Re: [PATCH] Traffic control cgroups subsystem, Ranjit Manomohan, (Thu Jul 24, 6:16 pm)
Re: [PATCH] Traffic control cgroups subsystem, Paul Menage, (Thu Jul 24, 6:18 pm)
Re: [PATCH] Traffic control cgroups subsystem, Thomas Graf, (Fri Jul 25, 2:29 am)