[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1237325364.27681.341.camel@macbook.infradead.org>
Date: Tue, 17 Mar 2009 21:29:24 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: netdev@...r.kernel.org
Subject: [PATCH 12/30] solos: Fix under-allocation of skb size for get/set
parameters
Signed-off-by: David Woodhouse <David.Woodhouse@...el.com>
---
drivers/atm/solos-pci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 2978699..2dca5ff 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -159,7 +159,7 @@ static ssize_t solos_param_show(struct device *dev, struct device_attribute *att
buflen = strlen(attr->attr.name) + 10;
- skb = alloc_skb(buflen, GFP_KERNEL);
+ skb = alloc_skb(sizeof(*header) + buflen, GFP_KERNEL);
if (!skb) {
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in solos_param_show()\n");
return -ENOMEM;
@@ -215,7 +215,7 @@ static ssize_t solos_param_store(struct device *dev, struct device_attribute *at
buflen = strlen(attr->attr.name) + 11 + count;
- skb = alloc_skb(buflen, GFP_KERNEL);
+ skb = alloc_skb(sizeof(*header) + buflen, GFP_KERNEL);
if (!skb) {
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in solos_param_store()\n");
return -ENOMEM;
--
1.6.0.6
--
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