summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2021-01-15 17:36:38 +0800
committerJakub Kicinski <kuba@kernel.org>2021-01-16 19:05:59 -0800
commitdbd50f238decfe58d2eac4980681a1e62a35c5b5 (patch)
treea380b36574180c8edb71e62e5fffc5e904a18c1f /net/sctp
parent20efd2c79afbd8f0a3929edb9b8ab5ce4c83fb6f (diff)
downloadlinux-dbd50f238decfe58d2eac4980681a1e62a35c5b5.tar.bz2
net: move the hsize check to the else block in skb_segment
After commit 89319d3801d1 ("net: Add frag_list support to skb_segment"), it goes to process frag_list when !hsize in skb_segment(). However, when using skb frag_list, sg normally should not be set. In this case, hsize will be set with len right before !hsize check, then it won't go to frag_list processing code. So the right thing to do is move the hsize check to the else block, so that it won't affect the !hsize check for frag_list processing. v1->v2: - change to do "hsize <= 0" check instead of "!hsize", and also move "hsize < 0" into else block, to save some cycles, as Alex suggested. Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sctp')
0 files changed, 0 insertions, 0 deletions