IB/mlx4: Sanity check userspace send queue sizes
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 18 Oct 2007 15:36:43 +0000 (17:36 +0200)
committerRoland Dreier <rolandd@cisco.com>
Thu, 18 Oct 2007 16:27:26 +0000 (09:27 -0700)
Add sanity checks to send queue sizes passed in from userspace. The
minimum sq stride value below is taken from the MT25408 PRM (section
11.10, Table 306, log_sq_stride definition).

Without this check, userspace can submit arbitrarily large/small
values for the number of WQEs and the stride, which can crash the
kernel.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

No differences found