[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+pSnhG4W55j-QBhsQLdmHQ1BU-rLbjj_Nf-Ju04Y1972g@mail.gmail.com>
Date: Mon, 14 Jul 2014 15:28:23 -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 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.
--
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