[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALnjE+rLksz68ybjvU+bzExsbDo2evEfXHv5dEc6ixTBzWrFEw@mail.gmail.com>
Date: Mon, 14 Jul 2014 16:48:29 -0700
From: Pravin Shelar <pshelar@...ira.com>
To: David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>, Alex Wang <alexw@...ira.com>
Subject: Re: [PATCH 01/11] openvswitch: Allow each vport to have an array of 'port_id's.
On Mon, Jul 14, 2014 at 4:17 PM, David Miller <davem@...emloft.net> wrote:
> From: Pravin Shelar <pshelar@...ira.com>
> Date: Mon, 14 Jul 2014 15:28:23 -0700
>
>> On Mon, Jul 14, 2014 at 3:13 PM, David Miller <davem@...emloft.net> wrote:
>>> From: Pravin B Shelar <pshelar@...ira.com>
>>> Date: Sun, 13 Jul 2014 17:12:54 -0700
>>>
>>>> void ovs_vport_free(struct vport *vport)
>>>> {
>>>> + kfree((struct vport_portids __force *)vport->upcall_portids);
>>>
>>> This cast is ugly and never correct for this situation, you need to
>>> use rcu_dereference().
>>
>> This function is called either from RCU callback or error path, So it is fine.
>> I do not use rcu_dereference() since rcu_read lock is not held. To
>> avoid rcu sparse checker warning the typecast is done.
>
> You need to find a cleaner way to express this, it's too ugly.
ok, I will add another rcu_callback for freeing upcall_portids.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists