[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1469726831.3998.44.camel@perches.com>
Date: Thu, 28 Jul 2016 10:27:11 -0700
From: Joe Perches <joe@...ches.com>
To: Chris Metcalf <cmetcalf@...era.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: tile-srom and krealloc with __GFP_ZERO defect
Hello Chris,
There is a defect in krealloc with __GFP_ZERO so this code in
drivers/chat/tile-srom.c may not work properly:
drivers/char/tile-srom.c- for (i = 0; ; i++) {
drivers/char/tile-srom.c- int devhdl;
drivers/char/tile-srom.c- char buf[20];
drivers/char/tile-srom.c- struct srom_dev *new_srom_devices =
drivers/char/tile-srom.c- krealloc(srom_devices, (i+1) * sizeof(struct srom_dev),
drivers/char/tile-srom.c: GFP_KERNEL | __GFP_ZERO);
drivers/char/tile-srom.c- if (!new_srom_devices) {
drivers/char/tile-srom.c- result = -ENOMEM;
drivers/char/tile-srom.c- goto fail_mem;
drivers/char/tile-srom.c- }
drivers/char/tile-srom.c- srom_devices = new_srom_devices;
http://linux-kernel.vger.kernel.narkive.com/xyiQV3vf/slab-krealloc-with-gfp-zero-defect
Powered by blists - more mailing lists