Messages in this thread |  | | Date | Tue, 2 Jun 2015 12:43:16 +0200 (CEST) | From | Jiri Kosina <> | Subject | Re: [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path |
| |
On Tue, 2 Jun 2015, Jiri Bohac wrote:
> > Looking over the leapsecond code, I noticed the printk messages > > reporting the leapsecond insertion in the second_overflow path > > were not using the printk_deferred method. This was surprising > > since the printk_deferred method was added in part to avoid > > printk-ing while holding the timekeeping locks. > > > > See 6d9bcb621b0b (timekeeping: use printk_deferred when holding > > timekeeping seqlock) for further rational. > > > > I can only guess that this omission was a git add -p oversight. > > second_overflow() is called from accumulate_nsecs_to_secs(). > > accumulate_nsecs_to_secs() is called from update_wall_time() > - once directly > - once via logarithmic_accumulation() > Both calls are before write_seqcount_begin(&tk_core.seq). > > So it looks safe to use printk there.
Couldn't we stuff a couple of
!lockdep_is_held()
assertions into printk() so that we don't have to keep rediscovering this sort of problems over and over again?
Thanks,
-- Jiri Kosina SUSE Labs
|  |