diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-28 00:39:23 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-28 00:39:23 +0100 |
commit | 3456b22111be920e15e6999b15d2f402a48e775d (patch) | |
tree | 97537437eea1b4d67eb303cde0856e398bb55bac /drivers/atm/solos-pci.c | |
parent | solos: Add SNR and Attn to status packet, fix oops on load (diff) | |
download | linux-3456b22111be920e15e6999b15d2f402a48e775d.tar.xz linux-3456b22111be920e15e6999b15d2f402a48e775d.zip |
solos: Fix under-allocation of skb size for get/set parameters
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to '')
-rw-r--r-- | 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 297869965fc4..2dca5ffc8063 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; |