projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
372cd7d
)
RDS: Add a warning if trying to allocate 0 sgs
author
Andy Grover
<andy.grover@oracle.com>
Thu, 4 Feb 2010 03:41:52 +0000
(19:41 -0800)
committer
Andy Grover
<andy.grover@oracle.com>
Thu, 9 Sep 2010 01:12:03 +0000
(18:12 -0700)
rds_message_alloc_sgs() only works when nents is nonzero.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/message.c
patch
|
blob
|
history
diff --git
a/net/rds/message.c
b/net/rds/message.c
index
f4c3be0
..
1f73a73
100644
(file)
--- a/
net/rds/message.c
+++ b/
net/rds/message.c
@@
-240,6
+240,7
@@
struct scatterlist *rds_message_alloc_sgs(struct rds_message *rm, int nents)
struct scatterlist *sg_ret;
WARN_ON(rm->m_used_sgs + nents > rm->m_total_sgs);
+ WARN_ON(!nents);
sg_ret = &sg_first[rm->m_used_sgs];
sg_init_table(sg_ret, nents);