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]
Date:   Wed, 24 Apr 2019 07:50:50 +0000
From:   Vlad Buslov <vladbu@...lanox.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
CC:     Vlad Buslov <vladbu@...lanox.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "jhs@...atatu.com" <jhs@...atatu.com>,
        "xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH net-next] net: sched: flower: refactor reoffload for
 concurrent access


On Tue 23 Apr 2019 at 19:51, Jakub Kicinski <jakub.kicinski@...ronome.com> wrote:
> On Tue, 23 Apr 2019 07:34:20 +0000, Vlad Buslov wrote:
>> >> @@ -382,6 +395,8 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f,
>> >>  
>> >>  	tc_setup_cb_call(block, TC_SETUP_CLSFLOWER, &cls_flower, false);
>> >>  	spin_lock(&tp->lock);
>> >> +	if (!list_empty(&f->hw_list))
>> >> +		list_del_init(&f->hw_list);  
>> >
>> > Mm. I thought list_del_init() on an empty list should be fine?  
>> 
>> Is it? Implementation of list_del_init() doesn't seem to check if list
>> is empty before re-initializing its pointers. Technically it seems like
>> it can work because the implementation will just set pointers of empty
>> list to point to itself (which is how empty list head is defined), but
>> should we assume this is intended behavior and not just implementation
>> detail? I don't see anything in comments for this function that suggests
>> that it is okay to call list_del_init() on empty list head.
>
> Mm.. I'd do it, IDK if there was ever an official ruling by the
> supreme court of Linus or any such ;)  __list_del_entry_valid() 
> looks like it'd not complain.  Up to you, in general it didn't 
> read very idiomatic, that's all.

Okay.

Powered by blists - more mailing lists