aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2016-11-19 01:45:00 +0100
committerDavid S. Miller <[email protected]>2016-11-21 11:25:57 -0500
commit97bc402db7821259f6a722cb38e060aa9b35b6e8 (patch)
tree47fd432ccb666cf167358f005b47d1e2abe5e6bf /include/linux
parentf81a8a02bb3b3e882ba6aa580230c13b5be64849 (diff)
bpf, mlx5: fix mlx5e_create_rq taking reference on prog
In mlx5e_create_rq(), when creating a new queue, we call bpf_prog_add() but without checking the return value. bpf_prog_add() can fail since 92117d8443bc ("bpf: fix refcnt overflow"), so we really must check it. Take the reference right when we assign it to the rq from priv->xdp_prog, and just drop the reference on error path. Destruction in mlx5e_destroy_rq() looks good, though. Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions