diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-07-17 04:01:16 +0000 |
---|---|---|
committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-07-17 04:01:16 +0000 |
commit | 12fea464070a9061fda874038614ed55011ad59d (patch) | |
tree | 0e9f4e7052daa7df1724d8bd26d0fd5b1abf9706 /share/doc/usd/22.trofftut/(public-mirror) | |
parent | 10d9ec31bf28949221280c9ddc0816464407a43f (diff) |
The error -1 is actually ERESTART in the context of syscall. It is for
kernel mode only and will not be passed to user mode. When the kernel
sees this error it will restart the syscall.
When the the SFP module data is not available, e.g. the SFP module is
not present, the ioctl handler returns ERESTART and kernel will retry
infinitely, hence the userland `ifconfig -v ql0` will hang forever until
get interrupted. That is apparently wrong.
Fix that by returning error ENODEV to indicate the SFP module data is
not available.
As for the case that ecore_ptt_acquire() fails, it appears to be quite
safe to restart, so keep returning ERESTART.
Reported by: Steve Wheeler
See also: https://redmine.pfsense.org/issues/16248
Reviewed by: kbowling
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D51351
Diffstat (limited to 'share/doc/usd/22.trofftut/(public-mirror)')
0 files changed, 0 insertions, 0 deletions