Re: [PATCH V3] IB/mad: Fix 0-day build

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

 



On 06/25/2015 12:04 PM, ira.weiny@xxxxxxxxx wrote:
> From: Ira Weiny <ira.weiny@xxxxxxxxx>
> 
> The define OPA_LID_PERMISSIVE is big endian and was compared to cpu value
> opa_drslid.
> 
> 0-day build caught this while building with the OPA (hfi1) driver which was
> recently sent to the list.
> 
> Fixes: 8e4349d13f33 (IB/mad: Add final OPA MAD processing)
> 
> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
> Reviewed-by: John, Jubin <jubin.john@xxxxxxxxx>
> 
> ---
> Changes from V2
> 	Really update the commit message

I made some changes to the commit message, but patch was taken as is.

> 
>  drivers/infiniband/core/mad.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index a4b1466c1bf6..9c90a729db62 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -794,7 +794,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
>  			goto out;
>  		}
>  		opa_drslid = be32_to_cpu(opa_smp->route.dr.dr_slid);
> -		if (opa_drslid != OPA_LID_PERMISSIVE &&
> +		if (opa_drslid != be32_to_cpu(OPA_LID_PERMISSIVE) &&
>  		    opa_drslid & 0xffff0000) {
>  			ret = -EINVAL;
>  			dev_err(&device->dev, "OPA Invalid dr_slid 0x%x\n",
> 


-- 
Doug Ledford <dledford@xxxxxxxxxx>
              GPG KeyID: 0E572FDD


Attachment: signature.asc
Description: OpenPGP digital signature


[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