From: David S. Miller Date: Sun, 12 Sep 2010 18:56:44 +0000 (-0700) Subject: sch_atm: Fix potential NULL deref. X-Git-Tag: v2.6.36-rc5~12^2~20 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a505b3b30fc69904f858822a2aa95990a4bf7958;p=~shefty%2Frdma-dev.git sch_atm: Fix potential NULL deref. The list_head conversion unearther an unnecessary flow check. Since flow is always NULL here we don't need to see if a matching flow exists already. Reported-by: Jiri Slaby Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 34066278952..6318e1136b8 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -255,10 +255,6 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, error = -EINVAL; goto err_out; } - if (!list_empty(&flow->list)) { - error = -EEXIST; - goto err_out; - } } else { int i; unsigned long cl;