IB/hfi1: Reject a zero-length user expected buffer
stable inclusion from stable-v5.10.166 commit 73e5666bf30d74cbc33c5b55f1ab0346a07d99a8 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7TH9O Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=73e5666bf30d74cbc33c5b55f1ab0346a07d99a8 -------------------------------- [ Upstream commit 0a0a6e80 ] A zero length user buffer makes no sense and the code does not handle it correctly. Instead, reject a zero length as invalid. Fixes: 97736f36 ("IB/hfi1: Validate page aligned for a given virtual addres") Signed-off-by: NDean Luick <dean.luick@cornelisnetworks.com> Signed-off-by: NDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com> Link: https://lore.kernel.org/r/167328547120.1472310.6362802432127399257.stgit@awfm-02.cornelisnetworks.comSigned-off-by: NLeon Romanovsky <leon@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录