From: Hiroaki SHIMODA Date: Fri, 3 Aug 2012 10:57:52 +0000 (+0900) Subject: net_sched: gact: Fix potential panic in tcf_gact(). X-Git-Tag: v3.6-rc2~24^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=696ecdc10622d86541f2e35cc16e15b6b3b1b67e;p=pandora-kernel.git net_sched: gact: Fix potential panic in tcf_gact(). gact_rand array is accessed by gact->tcfg_ptype whose value is assumed to less than MAX_RAND, but any range checks are not performed. So add a check in tcf_gact_init(). And in tcf_gact(), we can reduce a branch. Signed-off-by: Hiroaki SHIMODA Signed-off-by: David S. Miller --- Reading git-diff-tree failed