The patch titled Subject: ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio has been removed from the -mm tree. Its filename was ocfs2-o2hb-check-len-for-bio_add_page-to-avoid-getting-incorrect-bio.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: piaojun <piaojun@xxxxxxxxxx> Subject: ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio We need to check len for bio_add_page() to make sure the bio has been set up correctly, otherwise we may submit incorrect data to device. Link: http://lkml.kernel.org/r/5ABC3EBE.5020807@xxxxxxxxxx Signed-off-by: Jun Piao <piaojun@xxxxxxxxxx> Reviewed-by: Yiwen Jiang <jiangyiwen@xxxxxxxxxx> Reviewed-by: Changwei Ge <ge.changwei@xxxxxxx> Acked-by: Joseph Qi <jiangqi903@xxxxxxxxx> Cc: Mark Fasheh <mark@xxxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Cc: Changwei Ge <ge.changwei@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/cluster/heartbeat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff -puN fs/ocfs2/cluster/heartbeat.c~ocfs2-o2hb-check-len-for-bio_add_page-to-avoid-getting-incorrect-bio fs/ocfs2/cluster/heartbeat.c --- a/fs/ocfs2/cluster/heartbeat.c~ocfs2-o2hb-check-len-for-bio_add_page-to-avoid-getting-incorrect-bio +++ a/fs/ocfs2/cluster/heartbeat.c @@ -570,7 +570,16 @@ static struct bio *o2hb_setup_one_bio(st current_page, vec_len, vec_start); len = bio_add_page(bio, page, vec_len, vec_start); - if (len != vec_len) break; + if (len != vec_len) { + mlog(ML_ERROR, "Adding page[%d] to bio failed, " + "page %p, len %d, vec_len %u, vec_start %u, " + "bi_sector %llu\n", current_page, page, len, + vec_len, vec_start, + (unsigned long long)bio->bi_iter.bi_sector); + bio_put(bio); + bio = ERR_PTR(-EIO); + return bio; + } cs += vec_len / (PAGE_SIZE/spp); vec_start = 0; _ Patches currently in -mm which might be from piaojun@xxxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html