Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev As with usbverbose and pciverbose, these modules are...



details:   https://anonhg.NetBSD.org/src/rev/d5dfd6938a20
branches:  trunk
changeset: 379548:d5dfd6938a20
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Jun 05 22:21:15 2021 +0000

description:
As with usbverbose and pciverbose, these modules are not safe to be
auto-unloaded.  Disable for now.

All of these need to be updated with an appropriate refcount mechanism
to ensure that the code and/or tables aren't unloaded while they are
being used.

diffstat:

 sys/dev/mii/mii_verbose.c       |  6 ++++--
 sys/dev/scsipi/scsipi_verbose.c |  6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (54 lines):

diff -r 5664a335b930 -r d5dfd6938a20 sys/dev/mii/mii_verbose.c
--- a/sys/dev/mii/mii_verbose.c Sat Jun 05 22:17:15 2021 +0000
+++ b/sys/dev/mii/mii_verbose.c Sat Jun 05 22:21:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $ */
+/*     $NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.7 2021/06/05 22:21:15 pgoyette Exp $");
 
 #include <sys/module.h>
 #include <dev/mii/miidevs.h>
@@ -81,6 +81,8 @@ miiverbose_modcmd(modcmd_t cmd, void *ar
                mii_get_descr = saved_mii_get_descr;
                mii_verbose_loaded = 0;
                return 0;
+       casce MODULE_CMD_AUTOUNLOAD:
+               return EBUSY;
        default:
                return ENOTTY;
        }
diff -r 5664a335b930 -r d5dfd6938a20 sys/dev/scsipi/scsipi_verbose.c
--- a/sys/dev/scsipi/scsipi_verbose.c   Sat Jun 05 22:17:15 2021 +0000
+++ b/sys/dev/scsipi/scsipi_verbose.c   Sat Jun 05 22:21:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_verbose.c,v 1.34 2018/09/16 23:20:18 mrg Exp $  */
+/*     $NetBSD: scsipi_verbose.c,v 1.35 2021/06/05 22:21:15 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_verbose.c,v 1.34 2018/09/16 23:20:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_verbose.c,v 1.35 2021/06/05 22:21:15 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/time.h>
@@ -853,6 +853,8 @@ scsiverbose_modcmd(modcmd_t cmd, void *a
                scsipi_print_sense_data = saved_print_sense_data;
                scsi_verbose_loaded = 0;
                return 0;
+       case MODULE_CMD_AUTOUNLOAD:
+               return EBUSY;
        default:
                return ENOTTY;
        }



Home | Main Index | Thread Index | Old Index