Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] cfi: init wait queue in chip struct

Fix a kernel oops for Intel P30 flashes, where the wait queue head was not
initialized for the flchip struct, which in turn caused a crash at the
first read operation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Simon Vogl and committed by
Linus Torvalds
c314b6f1 124d90be

+1
+1
drivers/mtd/chips/cfi_cmdset_0001.c
··· 408 408 cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp; 409 409 cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp; 410 410 cfi->chips[i].ref_point_counter = 0; 411 + init_waitqueue_head(&(cfi->chips[i].wq)); 411 412 } 412 413 413 414 map->fldrv = &cfi_intelext_chipdrv;