sch_atm: Fix potential NULL deref.
authorDavid S. Miller <davem@davemloft.net>
Sun, 12 Sep 2010 18:56:44 +0000 (11:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Sep 2010 18:56:44 +0000 (11:56 -0700)
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 <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_atm.c

index 3406627895298324fdd9d27186ad8c9c8d9a9964..6318e1136b83de86f1b73150a0a5199522293f4f 100644 (file)
@@ -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;