lkml.org 
[lkml]   [2006]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 14 of 53] ipath - forbid empty MRs
Date
From
Don't allow zero-length regions to be created.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>

diff -r 02a05b853d20 -r 5d9fbba3222e drivers/infiniband/hw/ipath/ipath_mr.c
--- a/drivers/infiniband/hw/ipath/ipath_mr.c Fri May 12 15:55:28 2006 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_mr.c Fri May 12 15:55:28 2006 -0700
@@ -168,6 +168,11 @@ struct ib_mr *ipath_reg_user_mr(struct i
struct ib_umem_chunk *chunk;
int n, m, i;
struct ib_mr *ret;
+
+ if (region->length == 0) {
+ ret = ERR_PTR(-EINVAL);
+ goto bail;
+ }

n = 0;
list_for_each_entry(chunk, &region->chunk_list, list)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-05-13 02:06    [W:0.209 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site