diff options
author | Eric Dumazet <edumazet@google.com> | 2016-06-13 11:33:32 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-15 12:29:54 -0700 |
commit | 3d7c8257d999bdf8fa77ffd9be775c7b58cc7b69 (patch) | |
tree | b6f10468510e1731431371abf4a759cc8f65eb73 /Documentation | |
parent | 0c5ddb51e8f7be7170600f95a4ea92e5a32afad8 (diff) |
net_sched: prio: insure proper transactional behavior
Now prio_init() can return -ENOMEM, it also has to make sure
any allocated qdiscs are freed, since the caller (qdisc_create()) wont
call ->destroy() handler for us.
More generally, we want a transactional behavior for "tc qdisc
change ...", so prio_tune() should not make modifications if
any error is returned.
It means that we must validate parameters and allocate missing qdisc(s)
before taking root qdisc lock exactly once, to not leave the prio qdisc
in an intermediate state.
Fixes: cbdf45116478 ("net_sched: prio: properly report out of memory errors")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions