Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-15 Thread Anoob Soman
On 15/02/17 13:46, Eric Dumazet wrote: On Wed, 2017-02-15 at 11:07 +, Anoob Soman wrote: On 13/02/17 14:50, Anoob Soman wrote: On 13/02/17 14:26, Eric Dumazet wrote: On Mon, 2017-02-13 at 13:28 +, Anoob Soman wrote: Wouldn't it be easier to call synchronize_net(), before calling

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-15 Thread Eric Dumazet
On Wed, 2017-02-15 at 11:07 +, Anoob Soman wrote: > On 13/02/17 14:50, Anoob Soman wrote: > > On 13/02/17 14:26, Eric Dumazet wrote: > >> On Mon, 2017-02-13 at 13:28 +, Anoob Soman wrote: > >> > >>> Wouldn't it be easier to call synchronize_net(), before calling > >>> fanout_release_data()

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-15 Thread Anoob Soman
On 13/02/17 14:50, Anoob Soman wrote: On 13/02/17 14:26, Eric Dumazet wrote: On Mon, 2017-02-13 at 13:28 +, Anoob Soman wrote: Wouldn't it be easier to call synchronize_net(), before calling fanout_release_data() and kfree(f). The behavior, wrt synchronize_net, would be same as before and

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-13 Thread Anoob Soman
On 13/02/17 14:26, Eric Dumazet wrote: On Mon, 2017-02-13 at 13:28 +, Anoob Soman wrote: Wouldn't it be easier to call synchronize_net(), before calling fanout_release_data() and kfree(f). The behavior, wrt synchronize_net, would be same as before and fanout_release() will cleanup

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-13 Thread Eric Dumazet
On Mon, 2017-02-13 at 13:28 +, Anoob Soman wrote: > Wouldn't it be easier to call synchronize_net(), before calling > fanout_release_data() and kfree(f). > The behavior, wrt synchronize_net, would be same as before and > fanout_release() will cleanup everything without leaving any residue.

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-13 Thread Anoob Soman
On 10/02/17 13:57, Eric Dumazet wrote: On Fri, 2017-02-10 at 12:39 +, Anoob Soman wrote: Commit 6664498280cf ("packet: call fanout_release, while UNREGISTERING a netdev"), unfortunately, introduced the following issues. 1. calling mutex_lock(_mutex) (fanout_release()) from inside

Re: [PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-10 Thread Eric Dumazet
On Fri, 2017-02-10 at 12:39 +, Anoob Soman wrote: > Commit 6664498280cf ("packet: call fanout_release, while UNREGISTERING a > netdev"), unfortunately, introduced the following issues. > > 1. calling mutex_lock(_mutex) (fanout_release()) from inside > rcu_read-side critical section.

[PATCH net] packet: Do not call fanout_release from atomic contexts

2017-02-10 Thread Anoob Soman
Commit 6664498280cf ("packet: call fanout_release, while UNREGISTERING a netdev"), unfortunately, introduced the following issues. 1. calling mutex_lock(_mutex) (fanout_release()) from inside rcu_read-side critical section. rcu_read_lock disables preemption, most often, which prohibits calling