[PATCH] media: nuvoton: npcm-video: Fix sleeping in atomic context

Kun-Fa Lin milkfafa at gmail.com
Tue Oct 10 23:30:47 AEDT 2023


Hi Hans,

Thanks for the review.

> > -     list = kzalloc(sizeof(*list), GFP_KERNEL);
> > +     list = kzalloc(sizeof(*list), GFP_ATOMIC);
> >       if (!list)
> >               return NULL;
> >
>
> I'm not really sure this is the right approach.
>
> Looking closer at the code I notice that npcm_video_irq is a threaded
> interrupt handler, so wouldn't it be easier to change the video->lock
> spinlock to a mutex?
>

Agree it's better to use mutex. Will send v2 for this.

Regards,
Marvin


More information about the openbmc mailing list