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:	Sun, 26 Jul 2015 19:14:11 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Scott Feldman <sfeldma@...il.com>
Cc:	Netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>, idosch@...lanox.com,
	eladr@...lanox.com,
	"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
	Roopa Prabhu <roopa@...ulusnetworks.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Thomas Graf <tgraf@...g.ch>,
	Alexei Starovoitov <ast@...mgrid.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	john fastabend <john.fastabend@...il.com>,
	"simon.horman@...ronome.com" <simon.horman@...ronome.com>,
	John Linville <linville@...driver.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	Shrijeet Mukherjee <shm@...ulusnetworks.com>,
	"nhorman@...driver.com" <nhorman@...driver.com>,
	Jiri Pirko <jiri@...lanox.com>
Subject: Re: [patch net-next 4/4] mlxsw: Introduce Mellanox SwitchX-2 ASIC
 support

<snip>

>
>
>>
>>> +               struct sk_buff *skb_new;
>>> +
>>> +               skb_new = skb_realloc_headroom(skb, MLXSW_TXHDR_LEN);
>>> +               dev_kfree_skb_any(skb);
>>> +               if (!skb_new) {
>>> +                       this_cpu_inc(mlxsw_sx_port->pcpu_stats->tx_dropped);
>>> +                       return NETDEV_TX_OK;
>>> +               }
>>> +               skb = skb_new;
>>> +       }
>>> +       mlxsw_sx_txhdr_construct(skb, &tx_info);
>>> +       err = mlxsw_core_skb_transmit(mlxsw_sx, skb, &tx_info);
>>> +       if (err == -EAGAIN)
>>> +               return NETDEV_TX_BUSY;
>>
>>I think there is a problem here when returning NETDEV_TX_BUSY when
>>original skb might have been freed above in the headroom check. (ref
>>Documentation/networking/driver.txt).
>
>I have to check this out a bit more. Thanks for pointing that out.

You are right. In case queue is busy we obviously cannot free
the original skb. Will fix that in V2. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ