From: krishven Date: Fri, 16 Dec 2016 23:50:37 +0000 (-0500) Subject: Fixing incorrect page allocation in read-modify-write code path X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=026c4ac501706e5ae390c80f2da1728e39305927;p=linux-dmdedup.git Fixing incorrect page allocation in read-modify-write code path Replacing sizeof(p) with sizeof(*p) in kmalloc() --- diff --git a/drivers/md/dm-dedup-rw.c b/drivers/md/dm-dedup-rw.c index ba3f7827579..7947f798984 100644 --- a/drivers/md/dm-dedup-rw.c +++ b/drivers/md/dm-dedup-rw.c @@ -166,7 +166,7 @@ static struct bio *prepare_bio_with_pbn(struct dedup_config *dc, struct page_list *pl; struct bio *clone = NULL; - pl = kmalloc(sizeof(pl), GFP_NOIO); + pl = kmalloc(sizeof(*pl), GFP_NOIO); if (!pl) goto out;