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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 Jan 2018 14:44:26 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

On Sun, Jan 21, 2018 at 2:12 PM, John Fastabend
<john.fastabend@...il.com> wrote:
> On 01/19/2018 03:09 PM, Cong Wang wrote:
>
> hmm what happens if the resize fails in the next patch,
>
>>
>> +static void pfifo_fast_change_tx_queue_len(struct Qdisc *sch, unsigned int new_len)
>> +{
>> +     struct pfifo_fast_priv *priv = qdisc_priv(sch);
>> +     int prio;
>> +
>> +     for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
>> +             struct skb_array *q = band2list(priv, prio);
>> +
>> +             skb_array_resize(q, new_len, GFP_KERNEL);
>> +     }
>> +}
>> +
>
> Here skb_array_resize() can fail with ENOMEM, do we need to unwind the
> change and push the error up the stack?

Good point, but netdev_for_each_tx_queue() doesn't handle errors
in current code base, it is not trivial to make it returning int to reflect
errors, since we have to rollback a partial failure too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ