]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ntb: use 64-bit arithmetic for the MSI doorbell mask
authorFedor Pchelkin <pchelkin@ispras.ru>
Wed, 15 Jan 2025 18:28:17 +0000 (21:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:18:24 +0000 (10:18 +0200)
commit14bb11e73f1dafefd63143bb3cc8c9f6aebd46bb
tree884f11bf24c081b1219162fe94c7f1f17b7866aa
parent9315bea56a1e970eb47d6bbb1af97b17caa1c85b
ntb: use 64-bit arithmetic for the MSI doorbell mask

commit fd5625fc86922f36bedee5846fefd647b7e72751 upstream.

msi_db_mask is of type 'u64', still the standard 'int' arithmetic is
performed to compute its value.

While most of the ntb_hw drivers actually don't utilize the higher 32
bits of the doorbell mask now, this may be the case for Switchtec - see
switchtec_ntb_init_db().

Found by Linux Verification Center (linuxtesting.org) with SVACE static
analysis tool.

Fixes: 2b0569b3b7e6 ("NTB: Add MSI interrupt support to ntb_transport")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ntb/ntb_transport.c