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" <[email protected]> > > 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
