[lvc-project] [PATCH] netfilter: ebtables: remove unnecessary NULL check
Igor A. Artemiev
Igor.A.Artemiev at mcst.ru
Wed Jun 21 13:49:28 MSK 2023
On 6/20/23 19:38, Florian Westphal wrote:
> Igor Artemiev <Igor.A.Artemiev �� mcst.ru> wrote:
>> In ebt_do_table() 'private->chainstack' cannot be NULL
>> and the 'cs' pointer is dereferenced below, so it does not make
>> sense to compare 'private->chainstack' with NULL.
> ? Why do you think that?
>
The 'cs' pointer is dereferenced below without checking, as it is
assumed to always be initialized with
'private->chainstack[smp_processor_id()]'.
>> + cs = private->chainstack[smp_processor_id()];
> Looks like NULL deref to me. Did you test this?
>
No, I didn't test this.
Thanks,
Igor
More information about the lvc-project
mailing list