tuntap: fix dividing by zero in ebpf queue selection
[ Upstream commit a35d310f03a692bf4798eb309a1950a06a150620 ] We need check if tun->numqueues is zero (e.g for the persist device) before trying to use it for modular arithmetic. Reported-by: NEric Dumazet <eric.dumazet@gmail.com> Fixes: 96f84061("tun: add eBPF based queue selection method") Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NEric Dumazet <edumazet@google.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录