From: Santiago Leon <santil@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6] ibmveth bug fixes 2/4
Date: Tue, 10 Aug 2004 13:06:06 -0500 [thread overview]
Message-ID: <41190E8E.9050004@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
Andrew,
This patch fixes a race condition that would panic the kernel when
replenishing a buffer pool. Please apply.
Signed-off-by: Santiago Leon <santil@us.ibm.com>
--
Santiago A. Leon
Power Linux Development
IBM Linux Technology Center
[-- Attachment #2: ibmveth_race.patch --]
[-- Type: text/plain, Size: 946 bytes --]
===== drivers/net/ibmveth.c 1.14 vs edited =====
--- 1.14/drivers/net/ibmveth.c Tue Aug 10 11:56:29 2004
+++ edited/drivers/net/ibmveth.c Tue Aug 10 11:57:09 2004
@@ -219,6 +219,7 @@
dma_addr = vio_map_single(adapter->vdev, skb->data, pool->buff_size, DMA_FROM_DEVICE);
+ pool->free_map[free_index] = 0xffff;
pool->dma_addr[index] = dma_addr;
pool->skbuff[index] = skb;
@@ -233,6 +234,7 @@
lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);
if(lpar_rc != H_Success) {
+ pool->free_map[free_index] = index;
pool->skbuff[index] = NULL;
pool->consumer_index--;
vio_unmap_single(adapter->vdev, pool->dma_addr[index], pool->buff_size, DMA_FROM_DEVICE);
@@ -240,7 +242,6 @@
adapter->replenish_add_buff_failure++;
break;
} else {
- pool->free_map[free_index] = 0xffff;
buffers_added++;
adapter->replenish_add_buff_success++;
}
next reply other threads:[~2004-08-10 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 18:06 Santiago Leon [this message]
2004-08-10 18:28 ` [PATCH 2.6] ibmveth bug fixes 2/4 Dave Hansen
2004-08-10 19:02 ` Santiago Leon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41190E8E.9050004@us.ibm.com \
--to=santil@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox