diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-06-28 11:24:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-30 11:44:38 +0200 |
commit | 92291c95e71a7898109c1f95adfb48aa69e5ba7b (patch) | |
tree | af0221ab3541fc9c42990c26a6f476ba2f316885 /drivers/atm | |
parent | tcp: fix Fast Open key endianness (diff) | |
download | linux-92291c95e71a7898109c1f95adfb48aa69e5ba7b.tar.xz linux-92291c95e71a7898109c1f95adfb48aa69e5ba7b.zip |
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/atm')
-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) skb_queue_head_init(&iadev->rx_dma_q); iadev->rx_free_desc_qhead = NULL; - iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL); + iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL); if (!iadev->rx_open) { printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n", dev->number); |