ucode-mod-uline: fix crash on cleanup
authorFelix Fietkau <[email protected]>
Wed, 30 Apr 2025 08:40:38 +0000 (10:40 +0200)
committerFelix Fietkau <[email protected]>
Wed, 30 Apr 2025 09:04:14 +0000 (11:04 +0200)
commitd07c48fa091d09f3bf5247799e08ef722b932f3c
tree19d087ea0234663095adabd8d96f0ac80e4b4599
parentb9685dcf3de53294017b99952dc7eb6245938422
ucode-mod-uline: fix crash on cleanup

- only run a single poll in the uloop_fd cb to avoid use-after-free on close
- delete the uloop_fd on close
- when calling into ucode, fetch the vm pointer before the call in order
  to avoid accessing the stale uline context

Signed-off-by: Felix Fietkau <[email protected]>
package/utils/ucode-mod-uline/src/ucode.c