The patch titled Subject: scatterlist: don't BUG when we can trivially return a proper error. has been removed from the -mm tree. Its filename was scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Nick Bowler <nbowler@xxxxxxxxxxxxxxxx> Subject: scatterlist: don't BUG when we can trivially return a proper error. There is absolutely no reason to crash the kernel when we have a perfectly good return value already available to use for conveying failure status. Let's return an error code instead of crashing the kernel: that sounds like a much better plan. [akpm@xxxxxxxxxxxxxxxxxxxx: s/E2BIG/EINVAL/] Signed-off-by: Nick Bowler <nbowler@xxxxxxxxxxxxxxxx> Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/scatterlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN lib/scatterlist.c~scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error lib/scatterlist.c --- a/lib/scatterlist.c~scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error +++ a/lib/scatterlist.c @@ -248,7 +248,8 @@ int __sg_alloc_table(struct sg_table *ta unsigned int left; #ifndef ARCH_HAS_SG_CHAIN - BUG_ON(nents > max_ents); + if (WARN_ON_ONCE(nents > max_ents)) + return -EINVAL; #endif memset(table, 0, sizeof(*table)); _ Patches currently in -mm which might be from nbowler@xxxxxxxxxxxxxxxx are origin.patch -- 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