Re: "panic: malloc(M_WAITOK) in non-sleepable context" after r364296 -> r364341

From: Mateusz Guzik <mjguzik_at_gmail.com>
Date: Tue, 18 Aug 2020 15:37:50 +0200
So the previous patch should just print a warning.

Does this take care of the problem in general? I don't have means to
test the patch.

diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index b299fbddd84..c6d6a5da403 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
_at__at_ -652,6 +652,7 _at__at_ passregister(struct cam_periph *periph, void *arg)
        args.mda_gid = GID_OPERATOR;
        args.mda_mode = 0600;
        args.mda_si_drv1 = periph;
+       args.mda_flags = MAKEDEV_NOWAIT;
        error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name,
            periph->unit_number);
        if (error != 0) {


On 8/18/20, David Wolfskill <david_at_catwhisker.org> wrote:
> On Tue, Aug 18, 2020 at 03:24:52PM +0200, Mateusz Guzik wrote:
>> Try this:
>> [replacing new KASSERT() with WITNESS_WARN()...]
>> ....
>
> Thanks; on it.  Should take care of it, I think.
>
> Peace,
> david
> --
> David H. Wolfskill				david_at_catwhisker.org
> Donald Trump is either ignorant of how to govern or is refusing to do so.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
>


-- 
Mateusz Guzik <mjguzik gmail.com>
Received on Tue Aug 18 2020 - 11:37:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:24 UTC