Commit 3220df4c authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Xie XiuQi
Browse files

xsk: share the mmap_sem for page pinning



mainline inclusion
from mainline-v5.0-rc7
commit e451eb51
category: bugfix
bugzilla: 10768
CVE: NA

-------------------------------------------------

Holding mmap_sem exclusively for a gup() is an overkill. Lets
share the lock and replace the gup call for gup_longterm(), as
it is better suited for the lifetime of the pinning.

Fixes: c0c77d8f ("xsk: add user memory registration support sockopt")
Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Bjorn Topel <bjorn.topel@intel.com>
Cc: Magnus Karlsson <magnus.karlsson@intel.com>
CC: netdev@vger.kernel.org
Acked-by: default avatarBjörn Töpel <bjorn.topel@intel.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarLin Miaohe <linmiaohe@huawei.com>
Reviewed-by: default avatarMao Wenan <maowenan@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 5f549338
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment