From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> On Sun, 05 May 2024 22:11:56 +0800, Zhongqiu Han wrote: > The use-after-free issue occurs as follows: when the GPIO chip device file > is being closed by invoking gpio_chrdev_release(), watched_lines is freed > by bitmap_free(), but the unregistration of lineinfo_changed_nb notifier > chain failed due to waiting write rwsem. Additionally, one of the GPIO > chip's lines is also in the release process and holds the notifier chain's > read rwsem. Consequently, a race condition leads to the use-after-free of > watched_lines. > > [...] Applied, thanks! [1/1] gpiolib: cdev: Fix use after free in lineinfo_changed_notify commit: 02f6b0e1ec7e0e7d059dddc893645816552039da Best regards, -- Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>