Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a648fa72161d1f6468dabd96c5d3c0db04f598a
Commit:     6a648fa72161d1f6468dabd96c5d3c0db04f598a
Parent:     b291aa7a6564e859af144e1bd14ffa463519b198
Author:     Badari Pulavarty <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 13:00:44 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Aug 11 15:47:40 2007 -0700

    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 <[EMAIL PROTECTED]>
    Acked-by: Joe Jin <[EMAIL PROTECTED]>
    Acked-by: Zach Brown <[EMAIL PROTECTED]>
    Cc: gurudas pai <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/direct-io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 52bb263..6874785 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -974,6 +974,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode 
*inode,
        dio->get_block = get_block;
        dio->end_io = end_io;
        dio->map_bh.b_private = NULL;
+       dio->map_bh.b_state = 0;
        dio->final_block_in_bio = -1;
        dio->next_block_for_io = -1;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to