lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190321.135955.1938105690350887430.davem@davemloft.net>
Date:   Thu, 21 Mar 2019 13:59:55 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     linyunsheng@...wei.com
Cc:     huangdaode@...ilicon.com, xuwei5@...ilicon.com,
        liguozhu@...ilicon.com, Yisen.Zhuang@...wei.com,
        john.garry@...wei.com, linuxarm@...wei.com, salil.mehta@...wei.com,
        lipeng321@...wei.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: hns3: fix for not calculating tx bd num
 correctly

From: l00371289 <linyunsheng@...wei.com>
Date: Thu, 21 Mar 2019 11:28:43 +0800

> From: Yunsheng Lin <linyunsheng@...wei.com>
> 
> When there is only one byte in a frag, the current calculation
> using "(size + HNS3_MAX_BD_SIZE - 1) >> HNS3_MAX_BD_SIZE_OFFSET"
> will return zero, because HNS3_MAX_BD_SIZE is 65535 and
> HNS3_MAX_BD_SIZE_OFFSET is 16. So it will cause tx error when
> a frag's size is one byte.
> 
> This patch fixes it by using DIV_ROUND_UP.
> 
> Fixes: 3fe13ed95dd3 ("net: hns3: avoid mult + div op in critical data path")
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ