]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: Fix refcount warning in xp_dma_map
authorMagnus Karlsson <magnus.karlsson@intel.com>
Mon, 14 Sep 2020 14:50:36 +0000 (16:50 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 15 Sep 2020 01:43:25 +0000 (18:43 -0700)
commit2b6293113205e035771a803679b1320ad5191def
treecad8b65505336171813194230447270387996cd4
parent64f40dd1f69acee814f09a4f70e69d23d84ba388
xsk: Fix refcount warning in xp_dma_map

Fix a potential refcount warning that a zero value is increased to one
in xp_dma_map, by initializing the refcount to one to start with,
instead of zero plus a refcount_inc().

Fixes: c6f230b5ad52 ("xsk: Enable sharing of dma mappings")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/1600095036-23868-1-git-send-email-magnus.karlsson@gmail.com
net/xdp/xsk_buff_pool.c