Date: Sun, 18 Jun 2017 11:19:35 +0800 From: Jia-Ju Bai <baijiaju1990@163.com> To: freebsd-drivers@freebsd.org Subject: [Bug 220094] [scsi] sys/cam/scsi/scsi_sa.c: a sleep-under-mutex bug in saioctl Message-ID: <8e0674f6-8df7-7650-4576-fad0b2f48d10@163.com>
next in thread | raw e-mail | index | archive | help
The driver may sleep under a mutex, and the function call path in file "sys/cam/scsi/scsi_sa.c" in FreeBSD 11.0 is: saioctl [line 1680: acquire the mutex] saextget [line 1683] malloc(M_WAITOK) [line 4444] --> may sleep The possible fix of this bug is to replace "M_WAITOK" in malloc with "M_NOWAIT". This bug is found by a static analysis tool written by myself, and it is checked by my review of the FreeBSD code. Thanks, Jia-Ju Bai
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8e0674f6-8df7-7650-4576-fad0b2f48d10>