search for: rst2init_qp_out

Displaying 3 results from an estimated 3 matches for "rst2init_qp_out".

2020 Aug 06
1
[PATCH][next] vdpa/mlx5: fix memory allocation failure checks
...loc(*inlen, GFP_KERNEL); *out = kzalloc(*outlen, GFP_KERNEL); - if (!in || !out) + if (!*in || !*out) goto outerr; MLX5_SET(qp_2rst_in, *in, opcode, cmd); @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(rst2init_qp_out); *in = kzalloc(*inlen, GFP_KERNEL); *out = kzalloc(MLX5_ST_SZ_BYTES(rst2init_qp_out), GFP_KERNEL); - if (!in || !out) + if (!*in || !*out) goto outerr; MLX5_SET(rst2init_qp_in, *in, opcode, cmd); @@ -896,7 +896,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void...
2020 Aug 07
1
[PATCH] vdpa/mlx5: Fix erroneous null pointer checks
...loc(*outlen, GFP_KERNEL); > - if (!in || !out) > + if (!*in || !*out) > goto outerr; > > MLX5_SET(qp_2rst_in, *in, opcode, cmd); > @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl > *outlen = MLX5_ST_SZ_BYTES(rst2init_qp_out); > *in = kzalloc(*inlen, GFP_KERNEL); > *out = kzalloc(MLX5_ST_SZ_BYTES(rst2init_qp_out), GFP_KERNEL); > - if (!in || !out) > + if (!*in || !*out) > goto outerr; > > MLX5_SET(rst2init_qp_in, *in, opcode, cmd); > @@ -896,7 +896,7 @@ static void alloc_in...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...t; + > + MLX5_SET(qp_2rst_in, *in, opcode, cmd); > + MLX5_SET(qp_2rst_in, *in, uid, ndev->mvdev.res.uid); > + MLX5_SET(qp_2rst_in, *in, qpn, qpn); > + break; > + case MLX5_CMD_OP_RST2INIT_QP: > + *inlen = MLX5_ST_SZ_BYTES(rst2init_qp_in); > + *outlen = MLX5_ST_SZ_BYTES(rst2init_qp_out); > + *in = kzalloc(*inlen, GFP_KERNEL); > + *out = kzalloc(MLX5_ST_SZ_BYTES(rst2init_qp_out), GFP_KERNEL); > + if (!in || !out) > + goto outerr; > + > + MLX5_SET(rst2init_qp_in, *in, opcode, cmd); > + MLX5_SET(rst2init_qp_in, *in, uid, ndev->mvdev.res.uid); > + M...