mtd: block2mtd: fix recursive call of mtd_writev
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Jun 1 15:59:02 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2e24e32e2759348c9290404abad4f729f791bfad
Commit: 2e24e32e2759348c9290404abad4f729f791bfad
Parent: 5636ce0f070dee85c1b1203fe436a89648d25d06
Author: Gabor Juhos <juhosg at openwrt.org>
AuthorDate: Thu May 24 00:17:23 2012 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jun 1 20:23:19 2012 +0100
mtd: block2mtd: fix recursive call of mtd_writev
The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.
This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
(mtd: harmonize mtd_writev usage).
Remove the assignment from the block2mtd driver to fix the
issue.
Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
Cc: stable at kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/block2mtd.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 300aeb8..681e2ee 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -265,7 +265,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
dev->mtd.flags = MTD_CAP_RAM;
dev->mtd._erase = block2mtd_erase;
dev->mtd._write = block2mtd_write;
- dev->mtd._writev = mtd_writev;
dev->mtd._sync = block2mtd_sync;
dev->mtd._read = block2mtd_read;
dev->mtd.priv = dev;
More information about the linux-mtd-cvs
mailing list