From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>,
Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] IB/core: Suppress a sparse warning
Date: Wed, 12 Mar 2014 11:15:33 +0100 [thread overview]
Message-ID: <532033C5.7030803@acm.org> (raw)
In-Reply-To: <20140310160803.GC21124-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
On 03/10/14 17:08, Paul E. McKenney wrote:
> On Mon, Mar 10, 2014 at 04:02:13PM +0100, Yann Droneaud wrote:
>> Hi,
>>
>> Le lundi 10 mars 2014 à 15:26 +0100, Bart Van Assche a écrit :
>>> On 03/10/14 14:33, Yann Droneaud wrote:
>>>> Le lundi 10 mars 2014 à 13:22 +0100, Bart Van Assche a écrit :
>>>>> Suppress the following sparse warning:
>>>>> include/rdma/ib_addr.h:187:24: warning: cast removes address space of expression
>>>>
>>>> You should explain why there's a warning here, and why is it safe to
>>>> cast. (I believe it's related to RCU domain ?)
>>>
>>> Hello Yann,
>>>
>>> Now that I've had a closer look at the code in include/rdma/ib_addr.h,
>>> that code probably isn't safe. How about the (untested) patch below ?
>>>
>>
>> Thanks for investigating.
>>
>> I'm not an expert in RCU, but I believe it then miss the RCU annotations
>> around the RCU reader section (ensure correct ordering if I recall
>> correctly).
>>
>> Cc: "Paul E. McKenney" <paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>
> If the rcu_read_lock() isn't supplied by all callers to this function,
> then yes, it needs to be supplied as Yann shows below.
>
> The CONFIG_PROVE_RCU=y Kconfig option can help determine that they are
> needed, but of course cannot prove that they are not needed, at least
> not unless you have a workload that exercises all possible calls to
> this function.
Hello Moni,
I think this warning got introduced via commit "IB/cma: IBoE (RoCE)
IP-based GID addressing" (7b85627b9f02f9b0fb2ef5f021807f4251135857;
December 12, 2013). Can you follow this up further ?
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
next prev parent reply other threads:[~2014-03-12 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 12:22 [PATCH] IB/core: Suppress a sparse warning Bart Van Assche
[not found] ` <531DAEA1.7060703-HInyCGIudOg@public.gmane.org>
2014-03-10 13:33 ` Yann Droneaud
[not found] ` <1394458406.3257.53.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-03-10 14:26 ` Bart Van Assche
[not found] ` <531DCB7D.9020104-HInyCGIudOg@public.gmane.org>
2014-03-10 15:02 ` Yann Droneaud
[not found] ` <1394463733.3257.62.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-03-10 16:08 ` Paul E. McKenney
[not found] ` <20140310160803.GC21124-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2014-03-12 10:15 ` Bart Van Assche [this message]
[not found] ` <532033C5.7030803-HInyCGIudOg@public.gmane.org>
2014-03-12 17:54 ` Moni Shoua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532033C5.7030803@acm.org \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.