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:	Thu, 23 Apr 2015 19:54:29 -0700
From:	Mahesh Bandewar <maheshb@...gle.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	Dan Willems <dcbw@...hat.com>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH next 1/3] ipvlan: Defer multicast / broadcast processing
 to a work-queue

On Thu, Apr 23, 2015 at 5:32 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Thu, 2015-04-23 at 14:29 -0700, Mahesh Bandewar wrote:
>
>> +static void ipvlan_multicast_enqueue(struct ipvl_port *port,
>> +                                  struct sk_buff *skb)
>> +{
>> +     if (skb->protocol == htons(ETH_P_PAUSE))
>> +             return;
>
> But what happens to this packet ? It seems leaked ?
>
Hmm, will take care of it in v2.
>> +
>> +     spin_lock(&port->backlog.lock);
>> +     if (skb_queue_len(&port->backlog) < IPVLAN_QBACKLOG_LIMIT) {
>> +             __skb_queue_tail(&port->backlog, skb);
>> +             spin_unlock(&port->backlog.lock);
>> +     } else {
>> +             spin_unlock(&port->backlog.lock);
>> +             atomic_long_inc(&skb->dev->rx_dropped);
>> +             kfree_skb(skb);
>> +     }
>> +     schedule_work(&port->wq);
>
> No point calling schedule_work(&port->wq); if packet was dropped.
>
> We are under pressure, so don't add extra cpu cycles ;)
>
The only possibility of schedule_work() while doing kfree_skb() is
when the queue limit is reached. How can the queue be reduced if not
scheduled? May be I'm missing something..
>
--
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