From 6a648fa72161d1f6468dabd96c5d3c0db04f598a Mon Sep 17 00:00:00 2001 From: Badari Pulavarty Date: Fri, 10 Aug 2007 13:00:44 -0700 Subject: [PATCH] direct-io: fix error-path crashes Need to initialize map_bh.b_state to zero. Otherwise, in case of a faulty user-buffer its possible to go into dio_zero_block() and submit a page by mistake - since it checks for buffer_new(). http://marc.info/?l=linux-kernel&m=118551339032528&w=2 akpm: Linus had a (better) patch to just do a kzalloc() in there, but it got lost. Probably this version is better for -stable anwyay. Signed-off-by: Badari Pulavarty Acked-by: Joe Jin Acked-by: Zach Brown Cc: gurudas pai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed