]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ntb: off by one sanity checks
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 22 Jan 2013 07:19:14 +0000 (10:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2013 18:36:04 +0000 (11:36 -0700)
commit79f4ae0c560fab0e66c21f8b666a8b408cdb4586
tree244c6d3e1d4190c7697b2fa7e61ad5ece6abea9d
parentf22351258e21247e1faa73fa2b477510481d7f7c
ntb: off by one sanity checks

commit ad3e2751e7c546ae678be1f8d86e898506b42cef upstream.

These tests are off by one.  If "mw" is equal to NTB_NUM_MW then we
would go beyond the end of the ndev->mw[] array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ntb/ntb_hw.c