Skip to content

Commit 92291c9

Browse files
Dan Carpenterdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c860e99 commit 92291c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/atm/iphase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ static int rx_init(struct atm_dev *dev)
16181618
skb_queue_head_init(&iadev->rx_dma_q);
16191619
iadev->rx_free_desc_qhead = NULL;
16201620

1621-
iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL);
1621+
iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL);
16221622
if (!iadev->rx_open) {
16231623
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
16241624
dev->number);

0 commit comments

Comments
 (0)