LibBSD | sys/kern/kern_event.c: Fix kqueue double hold (!71)

Kinsey Moore (@opticron) gitlab at rtems.org
Tue May 27 13:56:03 UTC 2025




Kinsey Moore started a new discussion on freebsd/sys/kern/kern_event.c: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/71#note_122899

 >  			if (ffd < 0)
 >  				error = EBADF;
 >  			else {
 > -				if (iop == NULL)
 > +				if (iop == NULL) {
 >  					error = fget(td, ffd, &cap_event_rights, &fp);
 > -				else
 > +					if (!error) {
 > +						rtems_bsd_libio_iop_drop(kev->ident);
 > +					}

Doesn't this logic need to be replicated in the other locations that use rtems_bsd_libio_iop_hold()?

Why not integrate this functionality into rtems_bsd_libio_iop_hold() directly?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/71#note_122899
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250527/26d8c585/attachment.htm>


More information about the bugs mailing list