Messages in this thread | | | From | Miguel Ojeda <> | Date | Fri, 8 Feb 2019 05:30:18 +0100 | Subject | Re: [RFC v1 0/3] Address potential user-after-free on module unload |
| |
On Thu, Feb 7, 2019 at 11:33 PM Sven Van Asbroeck <thesven73@gmail.com> wrote: > > On Thu, Feb 7, 2019 at 5:21 PM Dmitry Torokhov > <dmitry.torokhov@gmail.com> wrote: > > > > > ./drivers//input/keyboard/matrix_keypad.c:512:1-18: missing clean-up > > > of INIT_WORK/INIT_DELAYED_WORK initialized here > > > > This is not as simple. > > > > PS If you change > flush_work(&keypad->work.work); > to > flush_delayed_work(&keypad->work); > > then the Coccinelle script works correctly, and does not flag > this driver.
Similarly, in drivers/auxdisplay/ht16k33.c, the cancel_delayed_work() is there, instead of cancel_delayed_work_sync(). Having the script suggest this change would be useful, too (i.e. instead of the devm_ change, assuming the cancel_delayed_work() is already there).
Thanks! Miguel
| |