summaryrefslogtreecommitdiffstats
path: root/lib/prio_tree.c
diff options
context:
space:
mode:
authorBrian Norris2011-10-15 05:09:33 +0200
committerArtem Bityutskiy2011-10-16 14:04:00 +0200
commit23b1a99b87f3fc9e4242b98b2af3c9bed210f048 (patch)
tree7a33efa8e9d82f6893ed7363d689b1d6774a480d /lib/prio_tree.c
parentmtd: provide an alias for the redboot module name (diff)
downloadkernel-qcow2-linux-23b1a99b87f3fc9e4242b98b2af3c9bed210f048.tar.gz
kernel-qcow2-linux-23b1a99b87f3fc9e4242b98b2af3c9bed210f048.tar.xz
kernel-qcow2-linux-23b1a99b87f3fc9e4242b98b2af3c9bed210f048.zip
mtd: nand: initialize ops.mode
Our `ops' information was converted to a local variable recently, and apparently, old code relied on the fact that the global version was often left in a valid mode. We can't make this assumption on local structs, and we shouldn't be relying on a previous state anyway. Instead, we initialize mode to 0 for don't-care situations (i.e., the operation does not use OOB anyway) and MTD_OPS_PLACE_OOB when we want to place OOB data. This fixes a bug with nand_default_block_markbad(), where we catch on the BUG() call in nand_fill_oob(): Kernel bug detected[#1]: ... Call Trace: [<80307350>] nand_fill_oob.clone.5+0xa4/0x15c [<803075d8>] nand_do_write_oob+0x1d0/0x260 [<803077c4>] nand_default_block_markbad+0x15c/0x1a8 [<802e8c2c>] part_block_markbad+0x80/0x98 [<802ebc74>] mtd_ioctl+0x6d8/0xbd0 [<802ec1a4>] mtd_unlocked_ioctl+0x38/0x5c [<800d9c60>] do_vfs_ioctl+0xa4/0x6e4 [<800da2e4>] sys_ioctl+0x44/0xa0 [<8001381c>] stack_done+0x20/0x40 Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'lib/prio_tree.c')
0 files changed, 0 insertions, 0 deletions