]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipath: ipath_skip_sge() can break if num_sge > 1
authorRalph Campbell <ralphc@pathscale.com>
Tue, 18 Jul 2006 01:21:24 +0000 (18:21 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 24 Jul 2006 16:18:07 +0000 (09:18 -0700)
commit64aa802198a83879235f51cc8091b8e1681f9b9e
tree561234eaf2a32f143566f62ef660f1cac2b68ebf
parentb825098def717c5d842dbcfee18c077795726160
IB/ipath: ipath_skip_sge() can break if num_sge > 1

ipath_skip_sge() doesn't exactly duplicate the side effects of
ipath_copy_sge() if num_sge > 1 since it doesn't decrement ss->num_sge.
This could result in the sg_list being accessed out of bounds.
Since ipath_skip_sge() is almost always called with num_sge == 1,
the original "optimization" is almost never used.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_verbs.c