Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/external/bsd
Module Name: src
Committed By: mrg
Date: Tue Apr 16 10:00:04 UTC 2019
Modified Files:
src/sys/external/bsd/common/include/linux: err.h errno.h
src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_drm.c
nouveau_fence.c
src/sys/external/bsd/drm2/drm: drm_cdevsw.c
src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h
src/sys/external/bsd/drm2/linux: linux_fence.c linux_ww_mutex.c
Log Message:
fix various problems i've seen where cv_*wait*() return ERESTART,
which is -3 in netbsd, which we have mapped linux ERESTARTSYS to.
this has a problem because linux code often returns errors and
pointers in the same value, and pointer values between -4095 and
-1 are considered as error returns, but -3 ends up as 3 and thus
is not considered an error, and mayhem ensues.
with this in place my kabylake system seems actually stable, i
have not triggered any of my prior issues in almost 4 weeks now.
Taylor asked me to write up a description and then wrote most of
the text below for me :-)
In Linux code, we always work with ERESTARTSYS so the code meaning
start over is a positive NetBSD errno safe for PTR_ERR/ERR_PTR.
To achieve this:
1. adapt all cv_waits that return to Linux so they map ERESTART to
ERESTARTSYS, and
2. adapt all returns to userland so they convert ERESTARTSYS to
ERESTART.
Leave EINTR and all other error codes alone.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/common/include/linux/err.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/common/include/linux/errno.h
cvs rdiff -u -r1.16 -r1.17 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
cvs rdiff -u -r1.13 -r1.14 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/drm/drm_cdevsw.c
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/linux/linux_fence.c
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/linux/linux_ww_mutex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index