ipmi problem introduced with sys/conf.h 1.150 enodev->selfalse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ipmi problem introduced with sys/conf.h 1.150 enodev->selfalse

Stuart Henderson
Thanks to Jens A. Griepentrog for reporting and bisecting, we discovered
that sys/conf.h r1.150 broke /dev/ipmi. I found a machine to test on and
reverting the commit fixes things, but given the commit message I guess
the diff below (which also fixes it) might be better?

https://github.com/openbsd/src/commit/425727428bd010ccd7d8cfa0fb087fccdcd9e500



Index: conf.h
===================================================================
RCS file: /cvs/src/sys/sys/conf.h,v
retrieving revision 1.152
diff -u -p -r1.152 conf.h
--- conf.h 26 May 2020 07:53:00 -0000 1.152
+++ conf.h 28 Jun 2020 20:53:52 -0000
@@ -473,7 +473,7 @@ extern struct cdevsw cdevsw[];
 #define cdev_ipmi_init(c,n) { \
  dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
  (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
- (dev_type_stop((*))) enodev, 0, selfalse, \
+ (dev_type_stop((*))) enodev, 0, seltrue, \
  (dev_type_mmap((*))) enodev, 0 }
 
 /* open, close, ioctl, mmap */




Reply | Threaded
Open this post in threaded view
|

Re: ipmi problem introduced with sys/conf.h 1.150 enodev->selfalse

Martin Pieuchot
On 28/06/20(Sun) 22:17, Stuart Henderson wrote:
> Thanks to Jens A. Griepentrog for reporting and bisecting, we discovered
> that sys/conf.h r1.150 broke /dev/ipmi. I found a machine to test on and
> reverting the commit fixes things, but given the commit message I guess
> the diff below (which also fixes it) might be better?

Thanks for the finding.  Your diff is indeed better and is ok mpi@.

Could you please commit the version below that adds a matching kqfilter
filter for `seltrue' as well?  That will allow us to keep the behavior
when switching poll(2) to use kqueue filters.

Index: sys/conf.h
===================================================================
RCS file: /cvs/src/sys/sys/conf.h,v
retrieving revision 1.152
diff -u -p -r1.152 conf.h
--- sys/conf.h 26 May 2020 07:53:00 -0000 1.152
+++ sys/conf.h 29 Jun 2020 07:22:40 -0000
@@ -473,8 +473,8 @@ extern struct cdevsw cdevsw[];
 #define cdev_ipmi_init(c,n) { \
  dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
  (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
- (dev_type_stop((*))) enodev, 0, selfalse, \
- (dev_type_mmap((*))) enodev, 0 }
+ (dev_type_stop((*))) enodev, 0, seltrue, (dev_type_mmap((*))) enodev, \
+ 0, 0, seltrue_kqfilter }
 
 /* open, close, ioctl, mmap */
 #define cdev_kcov_init(c,n) { \