aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_connmark.c
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-07-24 13:53:00 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-24 11:36:15 -0700
commit8dd30201ce66f2c81077e06056f4a865e512e854 (patch)
tree91cbc37cb74ffd1957d28aa1de1c64266c90bb32 /net/sched/act_connmark.c
parentMerge branch 'cxgb4-collect-free-Tx-Rx-pages-and-page-pointers' (diff)
downloadlinux-dev-8dd30201ce66f2c81077e06056f4a865e512e854.tar.xz
linux-dev-8dd30201ce66f2c81077e06056f4a865e512e854.zip
net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc
The cited patch added a call to dev_change_tx_queue_len in SIOCSIFTXQLEN case. This obsoletes the new len comparison check done before the function call. Remove it here. For the desicion of keep/remove the negative value check, we examine the range check in dev_change_tx_queue_len. On 64-bit we will fail with -ERANGE. The 32-bit int ifr_qlen will be sign extended to 64-bits when it is passed into dev_change_tx_queue_len(). And then for negative values this test triggers: if (new_len != (unsigned int)new_len) return -ERANGE; because: if (0xffffffffWHATEVER != 0x00000000WHATEVER) On 32-bit the signed value will be accepted, changing behavior. Therefore, the negative value check is kept. Fixes: 3f76df198288 ("net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN") Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_connmark.c')
0 files changed, 0 insertions, 0 deletions