diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-22 22:23:48 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-06-22 22:23:48 -0700 |
commit | af04662b4d80de5797a595bc9855d09ef4fe55cc (patch) | |
tree | 7ca724aeb6bffe8883d42658f76d0c720051f129 /drivers/infiniband | |
parent | 0cf89dcdbc53f2b43e4ce7419b6ff47f4309c2eb (diff) | |
download | kernel_samsung_tuna-af04662b4d80de5797a595bc9855d09ef4fe55cc.zip kernel_samsung_tuna-af04662b4d80de5797a595bc9855d09ef4fe55cc.tar.gz kernel_samsung_tuna-af04662b4d80de5797a595bc9855d09ef4fe55cc.tar.bz2 |
IB/ehca: Ensure that guid_entry index is not negative
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_hca.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index 9209c53..8b92f85 100644 --- 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; } |