All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3] IB/mad: Fix 0-day build
@ 2015-06-25 16:04 ira.weiny-ral2JQCrhuEAvxtiuMwx3w
       [not found] ` <1435248289-16477-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2015-06-25 16:04 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ira Weiny

From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: John, Jubin <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

---
Changes from V2
	Really update the commit message

 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",
-- 
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V3] IB/mad: Fix 0-day build
       [not found] ` <1435248289-16477-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-06-25 17:28   ` Bart Van Assche
       [not found]     ` <558C3A55.3050701-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  2015-07-08 23:01   ` Doug Ledford
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2015-06-25 17:28 UTC (permalink / raw)
  To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 06/25/2015 09:04 AM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> 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)

Hello Ira,

For future patches please make sure that the subject of the patch 
describes what has been fixed instead of referring to the tool that 
detected the issue.

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: COMMERCIAL: Re: [PATCH V3] IB/mad: Fix 0-day build
       [not found]     ` <558C3A55.3050701-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2015-07-01  7:46       ` Or Gerlitz
  0 siblings, 0 replies; 4+ messages in thread
From: Or Gerlitz @ 2015-07-01  7:46 UTC (permalink / raw)
  To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w
  Cc: Bart Van Assche, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 6/25/2015 8:28 PM, Bart Van Assche wrote:
> On 06/25/2015 09:04 AM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
>> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>
>> 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)
>
> Hello Ira,
>
> For future patches please make sure that the subject of the patch 
> describes what has been fixed instead of referring to the tool that 
> detected the issue.
>

Also, Ira, make sure to avoid two patches with the same name in the same 
series, such as

f28990b IB/mad: Add partial Intel OPA MAD support
548ead1 IB/mad: Add partial Intel OPA MAD support

Maybe you should ask Sean to go over patch titles and change-logs till 
you'll be up to speed on how this should be done, he has lots of kernel 
experience

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V3] IB/mad: Fix 0-day build
       [not found] ` <1435248289-16477-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2015-06-25 17:28   ` Bart Van Assche
@ 2015-07-08 23:01   ` Doug Ledford
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2015-07-08 23:01 UTC (permalink / raw)
  To: ira.weiny-ral2JQCrhuEAvxtiuMwx3w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

On 06/25/2015 12:04 PM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
> From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: John, Jubin <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> ---
> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-08 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 16:04 [PATCH V3] IB/mad: Fix 0-day build ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1435248289-16477-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-06-25 17:28   ` Bart Van Assche
     [not found]     ` <558C3A55.3050701-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-07-01  7:46       ` COMMERCIAL: " Or Gerlitz
2015-07-08 23:01   ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.