diff options
author | Maxim Mikityanskiy <maximmi@nvidia.com> | 2021-03-11 16:42:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-11 18:30:32 -0800 |
commit | 93bde210c4341e79f0cd9cb160d889f4577e40b1 (patch) | |
tree | 6d79a62ca47853b088e41d919a71b3489cf8f5c4 /net/appletalk | |
parent | 7a1468ba0e02eee24ae1353e8933793a27198e20 (diff) | |
download | linux-93bde210c4341e79f0cd9cb160d889f4577e40b1.tar.gz |
sch_htb: Fix select_queue for non-offload mode
htb_select_queue assumes it's always the offload mode, and it ends up in calling ndo_setup_tc without any checks. It may lead to a NULL pointer dereference if ndo_setup_tc is not implemented, or to an error returned from the driver, which will prevent attaching qdiscs to HTB classes in the non-offload mode. This commit fixes the bug by adding the missing check to htb_select_queue. In the non-offload mode it will return sch->dev_queue, mimicking tc_modify_qdisc's behavior for the case where select_queue is not implemented. Reported-by: syzbot+b53a709f04722ca12a3c@syzkaller.appspotmail.com Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload") Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/appletalk')
0 files changed, 0 insertions, 0 deletions