Re: [PATCH for-next] RDMA/rxe: Fix coding error in rxe_recv.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 27, 2021 at 03:45:01PM -0600, Bob Pearson wrote:
> check_type_state() in rxe_recv.c is written as if the type bits in
> the packet opcode were a bit mask which is not correct. This patch
> corrects this code to compare all 3 type bits to the required type.
> 
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Bob Pearson <rpearson@xxxxxxx>
> ---
>  drivers/infiniband/sw/rxe/rxe_recv.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

Applied to for-next, thanks
 
> diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
> index c9984a28eecc..0c9b857194fe 100644
> --- a/drivers/infiniband/sw/rxe/rxe_recv.c
> +++ b/drivers/infiniband/sw/rxe/rxe_recv.c
> @@ -9,21 +9,26 @@
>  #include "rxe.h"
>  #include "rxe_loc.h"
>  
> +/* check that QP matches packet opcode type and is in a valid state */
>  static int check_type_state(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
>  			    struct rxe_qp *qp)
>  {
> +	int pkt_type;

I fixed this to 'unsigned int'

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux