svn commit: r308674 - stable/11/sys/dev/mlx5/mlx5_core
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Nov 15 08:50:44 UTC 2016
Author: hselasky
Date: Tue Nov 15 08:50:42 2016
New Revision: 308674
URL: https://svnweb.freebsd.org/changeset/base/308674
Log:
MFC r308409:
When a firmware command times out do not free the command structure to
avoid use after free.
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Tue Nov 15 07:13:16 2016 (r308673)
+++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Tue Nov 15 08:50:42 2016 (r308674)
@@ -1245,8 +1245,11 @@ static int cmd_exec_helper(struct mlx5_c
err = mlx5_cmd_invoke(dev, inb, outb, out, out_size, callback, context,
pages_queue, &status);
- if (err)
+ if (err) {
+ if (err == -ETIMEDOUT)
+ return err;
goto out_out;
+ }
mlx5_core_dbg(dev, "err %d, status %d\n", err, status);
if (status) {
More information about the svn-src-stable-11
mailing list