This is a note to let you know that I've just added the patch titled
net/mlx5: FPGA, return -EINVAL if size is zero
to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: net-mlx5-fpga-return-einval-if-size-is-zero.patch and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
From foo@baz Sun Dec 31 11:12:48 CET 2017
From: Kamal Heib kamalh@mellanox.com Date: Sun, 29 Oct 2017 04:03:37 +0200 Subject: net/mlx5: FPGA, return -EINVAL if size is zero
From: Kamal Heib kamalh@mellanox.com
[ Upstream commit bae115a2bb479142605726e6aa130f43f50e801a ]
Currently, if a size of zero is passed to mlx5_fpga_mem_{read|write}_i2c() the "err" return value will not be initialized, which triggers gcc warnings:
[..]/mlx5/core/fpga/sdk.c:87 mlx5_fpga_mem_read_i2c() error: uninitialized symbol 'err'. [..]/mlx5/core/fpga/sdk.c:115 mlx5_fpga_mem_write_i2c() error: uninitialized symbol 'err'.
fix that.
Fixes: a9956d35d199 ('net/mlx5: FPGA, Add SBU infrastructure') Signed-off-by: Kamal Heib kamalh@mellanox.com Reviewed-by: Yevgeny Kliteynik kliteyn@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c | 6 ++++++ 1 file changed, 6 insertions(+)
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c @@ -66,6 +66,9 @@ static int mlx5_fpga_mem_read_i2c(struct u8 actual_size; int err;
+ if (!size) + return -EINVAL; + if (!fdev->mdev) return -ENOTCONN;
@@ -95,6 +98,9 @@ static int mlx5_fpga_mem_write_i2c(struc u8 actual_size; int err;
+ if (!size) + return -EINVAL; + if (!fdev->mdev) return -ENOTCONN;
Patches currently in stable-queue which might be from kamalh@mellanox.com are
queue-4.14/net-mlx5-fpga-return-einval-if-size-is-zero.patch
linux-stable-mirror@lists.linaro.org