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: <70c6e7d3-7faf-c4e7-3ae5-78f9a8e4c2b3@iogearbox.net>
Date:   Fri, 28 May 2021 22:21:36 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
        Colin King <colin.king@...onical.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        KP Singh <kpsingh@...nel.org>, netdev@...r.kernel.org,
        bpf@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] bpf: devmap: remove redundant assignment of
 variable drops

On 5/27/21 4:55 PM, Maciej Fijalkowski wrote:
> On Thu, May 27, 2021 at 03:36:37PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@...onical.com>
>>
>> The variable drops is being assigned a value that is never
>> read, it is being updated later on. The assignment is redundant and
>> can be removed.
> 
> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
> 
> Would help if you would have CCed me given the fact that hour ago I
> confirmed that it could be removed :p but no big deal.

Thanks guys, fyi, took in this one for bpf-next [0], since more unneeded
code removed.

   [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e8e0f0f484780d7b90a63ea50020ac4bb027178d

>> Addresses-Coverity: ("Unused value")
>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>> ---
>>   kernel/bpf/devmap.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
>> index f9148daab0e3..fe3873b5d13d 100644
>> --- a/kernel/bpf/devmap.c
>> +++ b/kernel/bpf/devmap.c
>> @@ -388,8 +388,6 @@ static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags)
>>   		to_send = dev_map_bpf_prog_run(bq->xdp_prog, bq->q, cnt, dev);
>>   		if (!to_send)
>>   			goto out;
>> -
>> -		drops = cnt - to_send;
>>   	}
>>   
>>   	sent = dev->netdev_ops->ndo_xdp_xmit(dev, to_send, bq->q, flags);
>> -- 
>> 2.31.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ