]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
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)
commit839041329fd3410e07d614f81e75bb43367d8f89
treeae9b3f9dd42bb9f4652637d6700b685e2f41e961
parentfd312561adcc90e924f35d3032d5493aeb4c3017
IB/mlx4: Sanity check userspace send queue sizes

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>
drivers/infiniband/hw/mlx4/qp.c