diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-06-28 05:24:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-30 05:44:38 -0400 |
commit | 92291c95e71a7898109c1f95adfb48aa69e5ba7b (patch) | |
tree | af0221ab3541fc9c42990c26a6f476ba2f316885 /drivers | |
parent | c860e997e9170a6d68f9d1e6e2cf61f572191aaf (diff) |
atm: iphase: fix a 64 bit bug
The code assumes that there is 4 bytes in a pointer and it doesn't
allocate enough memory.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/iphase.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index ff81a576347e..82532c299bb5 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -1618,7 +1618,7 @@ static int rx_init(struct atm_dev *dev) | |||
1618 | skb_queue_head_init(&iadev->rx_dma_q); | 1618 | skb_queue_head_init(&iadev->rx_dma_q); |
1619 | iadev->rx_free_desc_qhead = NULL; | 1619 | iadev->rx_free_desc_qhead = NULL; |
1620 | 1620 | ||
1621 | iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL); | 1621 | iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL); |
1622 | if (!iadev->rx_open) { | 1622 | if (!iadev->rx_open) { |
1623 | printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n", | 1623 | printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n", |
1624 | dev->number); | 1624 | dev->number); |