Re: [PATCH v4 08/24] seqlock: lockdep assert non-preemptibility on seqcount_t write

From: Greg KH
Date: Mon Aug 10 2020 - 04:59:45 EST


On Sun, Aug 09, 2020 at 08:42:51PM +0200, Ahmed S. Darwish wrote:
> On Sat, Aug 08, 2020 at 04:21:22PM -0700, Guenter Roeck wrote:
> > On Mon, Jul 20, 2020 at 05:55:14PM +0200, Ahmed S. Darwish wrote:
> > > Preemption must be disabled before entering a sequence count write side
> > > critical section. Failing to do so, the seqcount read side can preempt
> > > the write side section and spin for the entire scheduler tick. If that
> > > reader belongs to a real-time scheduling class, it can spin forever and
> > > the kernel will livelock.
> > >
> > > Assert through lockdep that preemption is disabled for seqcount writers.
> > >
> >
> > This patch is causing compile failures for various images (eg arm:allmodconfig,
> > arm:imx_v6_v7_defconfig, mips:allmodconfig).
> >
> > In file included from arch/arm/include/asm/bug.h:60,
> > from include/linux/bug.h:5,
> > from include/linux/thread_info.h:12,
> > from include/asm-generic/current.h:5,
> > from ./arch/arm/include/generated/asm/current.h:1,
> > from include/linux/sched.h:12,
> > from arch/arm/kernel/asm-offsets.c:11:
> > include/linux/seqlock.h: In function 'write_seqcount_begin_nested':
> > include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id'
> >
> > Reverting it fixes the problem. Is this being addressed ?
> >
>
> @Peter, I think let's revert this one for now?

Please do, it's blowing up my local builds as well :(

thanks,

greg k-h