Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
mv643xx_eth: Fix race condition in mv643xx_eth_free_tx_descs
s2io bogus memset

+9 -2
+9 -2
drivers/net/mv643xx_eth.c
··· 314 314 315 315 while (mp->tx_desc_count > 0) { 316 316 spin_lock_irqsave(&mp->lock, flags); 317 + 318 + /* tx_desc_count might have changed before acquiring the lock */ 319 + if (mp->tx_desc_count <= 0) { 320 + spin_unlock_irqrestore(&mp->lock, flags); 321 + return released; 322 + } 323 + 317 324 tx_index = mp->tx_used_desc_q; 318 325 desc = &mp->p_tx_desc_area[tx_index]; 319 326 cmd_sts = desc->cmd_sts; ··· 339 332 if (skb) 340 333 mp->tx_skb[tx_index] = NULL; 341 334 342 - spin_unlock_irqrestore(&mp->lock, flags); 343 - 344 335 if (cmd_sts & ETH_ERROR_SUMMARY) { 345 336 printk("%s: Error in TX\n", dev->name); 346 337 mp->stats.tx_errors++; 347 338 } 339 + 340 + spin_unlock_irqrestore(&mp->lock, flags); 348 341 349 342 if (cmd_sts & ETH_TX_FIRST_DESC) 350 343 dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);