]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: block2mtd: fix recursive call of mtd_writev
authorGabor Juhos <juhosg@openwrt.org>
Wed, 23 May 2012 22:17:23 +0000 (00:17 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 1 Jun 2012 19:23:19 +0000 (20:23 +0100)
commit2162518d54256a88d6dc3bc10847d20c3855e6a4
tree2f6d61442a8fdf6e084c4f690569ddc6fc3c012c
parent7288aedcd7295d962ef3d6b308d2bd1b083e02f0
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 38f410c1ce76a863b64feeb8c13126fed5bb77ba
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: stable@kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/block2mtd.c