diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2019-10-02 08:31:59 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-03 16:34:27 +0200 |
commit | df551058f7a303bd3a17a4cef001349974962ce8 (patch) | |
tree | 360e624c558bbb4f5a8c419c410d6aff8e61c557 /kernel/user.c | |
parent | e55190f26f92927e95aba22b069679311d5379ea (diff) | |
download | linux-df551058f7a303bd3a17a4cef001349974962ce8.tar.bz2 |
xsk: Fix crash in poll when device does not support ndo_xsk_wakeup
Fixes a crash in poll() when an AF_XDP socket is opened in copy mode
and the bound device does not have ndo_xsk_wakeup defined. Avoid
trying to call the non-existing ndo and instead call the internal xsk
sendmsg function to send packets in the same way (from the
application's point of view) as calling sendmsg() in any mode or
poll() in zero-copy mode would have done. The application should
behave in the same way independent on if zero-copy mode or copy mode
is used.
Fixes: 77cd0d7b3f25 ("xsk: add support for need_wakeup flag in AF_XDP rings")
Reported-by: syzbot+a5765ed8cdb1cca4d249@syzkaller.appspotmail.com
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/1569997919-11541-1-git-send-email-magnus.karlsson@intel.com
Diffstat (limited to 'kernel/user.c')
0 files changed, 0 insertions, 0 deletions