On 4/22/17 3:14 AM, Dmitry Vyukov wrote: >> One small question. Why cmpxchg is needed instead >> of a ip6_rt_put() and then assign? >> Is it fixing another bug? > cmpxchg here looks fishy. > If there are no concurrent modifications, then it is not needed. > If there are and cmpxchg fails, then we will put the installed rt and > leak the new one. >
Yes, I need to convert that to changing the rt under a lock. Leftover from the beginning of the investigation when I suspected locking and recalled Li's patch. I'll send a v2.