[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1354193837.21562.159.camel@shinybook.infradead.org>
Date: Thu, 29 Nov 2012 12:57:17 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Krzysztof Mazur <krzysiek@...lesie.net>
Cc: David Laight <David.Laight@...LAB.COM>,
chas williams - CONTRACTOR <chas@....nrl.navy.mil>,
davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, nathan@...verse.com.au
Subject: Re: [PATCH] solos-pci: don't call vcc->pop() after pclose()
On Thu, 2012-11-29 at 13:43 +0100, Krzysztof Mazur wrote:
>
> Removing packets from tx_queue is not needed. We can transmit packets
> also after close. We just can't call vcc->pop() after close,
> so we can just set SKB_CB(skb)->vcc of such packets to NULL so
> fpga_tx() won't call vcc->pop().
Your patch doesn't do that, does it? You'd want something like
if (card->tx_skb[port] && SKB_CB(card->tx_skb[port]->vcc) == vcc)
SKB_CB(card->tx_skb[port]->vcc) = NULL;
Under card->tx_lock should suffice.
And do we just *not* call the ->pop() on that skb ever? And hope that it
doesn't screw up some other state somewhere? Like if we're doing MLPPP
and I've implemented BQL for PPP... we might never call
ppp_completed_queue() for that skb, so even though this *channel* is
going away, it might still contribute towards the perceived queue on the
overall PPP netdev?
Failing to call ->pop() could cause memory leaks and other issues; I
don't think it's reasonable. I think we *have* to wait for
card->tx_skb[port] if it's for the VCC we're closing.
--
dwmw2
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (6171 bytes)
Powered by blists - more mailing lists