On Wed, 2 Nov 2022 22:01:17 +0200 Leonid Ravich <lravich@xxxxxxxxx> wrote: > disagree, without CONFIG_PREEMPTION (which is the default case in some > destros) we will not get any warning, because there will not be > preamption disable. I test all for my code (NON_PREEMPT, VOLUNTEER_PREEMPT, PREEMPT) and with and without lockdep enabled. This would be a bug if you called kmalloc(X, GFP_KERNEL) in *any* non preempt section. > > second issue I see and maybe it is only me, is that the assuption of > atomicity in trace is not a common knowledge for trace users. Well, I suppose we could add more documentation. Would that help? Where would you see it? In the sample code? I advise not even grabbing locks in trace events, because in most cases lockdep will not catch any issues with them (it will be hidden unless the trace event is enabled). -- Steve