Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1160206 > unrolled thread

Re: [PATCH] net: moxa: fix TX overrun memory leak

Started byDavid Miller <davem@davemloft.net>
First post2015-06-08 04:30 +0200
Last post2015-06-08 04:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] net: moxa: fix TX overrun memory leak David Miller <davem@davemloft.net> - 2015-06-08 04:30 +0200

#1160206 — Re: [PATCH] net: moxa: fix TX overrun memory leak

FromDavid Miller <davem@davemloft.net>
Date2015-06-08 04:30 +0200
SubjectRe: [PATCH] net: moxa: fix TX overrun memory leak
Message-ID<pyUZ4-1qK-5@gated-at.bofh.it>
From: Jonas Jensen <jonas.jensen@gmail.com>
Date: Fri,  5 Jun 2015 15:46:18 +0200

>  	desc = priv->tx_desc_base + (TX_REG_DESC_SIZE * tx_head);
>  
> -	spin_lock_irq(&priv->txlock);
> +	if (CIRC_SPACE(tx_head, tx_tail, TX_DESC_NUM) == 0) {
> +		priv->stats.tx_dropped++;
> +		goto out_unlock;
> +	}

You can't do this.

Whatever code creates this condition _must_ stop the TX queue
so that the core netdevice transmit layer does not call your
transmit method.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web