Re: [PATCH V1 1/1] tick: broadcast-hrtimer: Fix a race in bc_set_next

2019-09-24 Thread Eugeniu Rosca
On Mon, Sep 23, 2019 at 09:51:54PM +0200, Thomas Gleixner wrote: > On Wed, 18 Sep 2019, Balasubramani Vivekanandan wrote: > > > > When there are no more cpus subscribed to broadcast, the timer callback > > might not set the expiry time for hrtimer. Therefore the callback timer > > function is modi

Re: [PATCH V1 1/1] tick: broadcast-hrtimer: Fix a race in bc_set_next

2019-09-23 Thread Thomas Gleixner
On Wed, 18 Sep 2019, Balasubramani Vivekanandan wrote: > > When there are no more cpus subscribed to broadcast, the timer callback > might not set the expiry time for hrtimer. Therefore the callback timer > function is modified to set the state of broadcast clock to > CLOCK_EVT_STATE_ONESHOT_STOPP

[PATCH V1 1/1] tick: broadcast-hrtimer: Fix a race in bc_set_next

2019-09-18 Thread Balasubramani Vivekanandan
When a cpu requests broadcasting, before starting the tick broadcast hrtimer, bc_set_next() checks if the timer callback (bc_handler) is active using hrtimer_try_to_cancel(). But hrtimer_try_to_cancel() does not provide the required synchronization when the callback is active on other core. The cal