projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cf89dc
)
IB/ehca: Ensure that guid_entry index is not negative
author
Roel Kluin
<roel.kluin@gmail.com>
Tue, 23 Jun 2009 05:23:48 +0000
(22:23 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Tue, 23 Jun 2009 05:23:48 +0000
(22:23 -0700)
This prevents the memcpy() of a guid_entries element using a negative index.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_hca.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/hw/ehca/ehca_hca.c
b/drivers/infiniband/hw/ehca/ehca_hca.c
index 9209c5332dfe8f8031849cd12fa6dd4b94874906..8b92f85d4dd0eef382420e9d6dd69d7e1c594af1 100644
(file)
--- a/
drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/
drivers/infiniband/hw/ehca/ehca_hca.c
@@
-319,7
+319,7
@@
int ehca_query_gid(struct ib_device *ibdev, u8 port,
ib_device);
struct hipz_query_port *rblock;
- if (index > 255) {
+ if (index
< 0 || index
> 255) {
ehca_err(&shca->ib_device, "Invalid index: %x.", index);
return -EINVAL;
}