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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 3 Aug 2021 16:27:35 +0000 From: Nicholas Richardson <richardsonnick@...gle.com> To: davem@...emloft.net, kuba@...nel.org Cc: nrrichar@...u.edu, arunkaly@...gle.com, Nick Richardson <richardsonnick@...gle.com>, "Gustavo A. R. Silva" <gustavoars@...nel.org>, Leesoo Ahn <dev@...eel.net>, Ye Bin <yebin10@...wei.com>, Di Zhu <zhudi21@...wei.com>, Yejune Deng <yejune.deng@...il.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH v4] pktgen: Remove redundant clone_skb override From: Nick Richardson <richardsonnick@...gle.com> When the netif_receive xmit_mode is set, a line is supposed to set clone_skb to a default 0 value. This line is made redundant due to a preceding line that checks if clone_skb is more than zero and returns -ENOTSUPP. Overriding clone_skb to 0 does not make any difference to the behavior because if it was positive we return error. So it can be either 0 or negative, and in both cases the behavior is the same. Remove redundant line that sets clone_skb to zero. Signed-off-by: Nick Richardson <richardsonnick@...gle.com> --- net/core/pktgen.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 7e258d255e90..314f97acf39d 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1190,11 +1190,6 @@ static ssize_t pktgen_if_write(struct file *file, * pktgen_xmit() is called */ pkt_dev->last_ok = 1; - - /* override clone_skb if user passed default value - * at module loading time - */ - pkt_dev->clone_skb = 0; } else if (strcmp(f, "queue_xmit") == 0) { pkt_dev->xmit_mode = M_QUEUE_XMIT; pkt_dev->last_ok = 1; -- 2.32.0.554.ge1b32706d8-goog
Powered by blists - more mailing lists