git: a83c64a59cf5 - stable/12 - Partially revert r248770.

Dmitry Chagin dchagin at FreeBSD.org
Fri Apr 16 08:36:24 UTC 2021


The branch stable/12 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=a83c64a59cf5dd4c8eb86ce9dbdcf84c2c874fb8

commit a83c64a59cf5dd4c8eb86ce9dbdcf84c2c874fb8
Author:     Dmitry Chagin <dchagin at FreeBSD.org>
AuthorDate: 2021-04-02 08:43:17 +0000
Commit:     Dmitry Chagin <dchagin at FreeBSD.org>
CommitDate: 2021-04-16 08:36:12 +0000

    Partially revert r248770.
    
    Under geom(4) nvme_ns_bio_process() is on the path where sleep
    is prohibited as g_io_shedule_down() calls THREAD_NO_SLEEPNG()
    before geom->start().
    
    Reviewed By:            imp
    Differential Revision:  https://reviews.freebsd.org/D29539
    
    (cherry picked from commit a78109d5db87b08785a822770e2e4fdb15f921b6)
---
 sys/dev/nvme/nvme_ns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c
index ef38c8dc7826..9452f6460973 100644
--- a/sys/dev/nvme/nvme_ns.c
+++ b/sys/dev/nvme/nvme_ns.c
@@ -473,7 +473,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
 	case BIO_DELETE:
 		dsm_range =
 		    malloc(sizeof(struct nvme_dsm_range), M_NVME,
-		    M_ZERO | M_WAITOK);
+		    M_ZERO | M_NOWAIT);
 		if (!dsm_range) {
 			err = ENOMEM;
 			break;


More information about the dev-commits-src-all mailing list