Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The commit dbd50f2 ("net: move the hsize check to the else block in skb_segment") introduced a data corruption for devices supporting scatter-gather. The problem boils down to signed/unsigned comparison given unexpected results: if signed 'hsize' is negative, it will be considered greater than a positive 'len', which is unsigned. This commit addresses resorting to the old checks order, so that 'hsize' never has a negative value when compared with 'len'. v1 -> v2: - reorder hsize checks instead of explicit cast (Alex) Bisected-by: Matthieu Baerts <[email protected]> Fixes: dbd50f2 ("net: move the hsize check to the else block in skb_segment") Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Xin Long <[email protected]> Link: https://lore.kernel.org/r/861947c2d2d087db82af93c21920ce8147d15490.1611074818.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information