Date: Sun, 13 Jun 2004 10:18:10 GMT From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54808 for review Message-ID: <200406131018.i5DAIAQu097584@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54808 Change 54808 by jmallett@jmallett_oingo on 2004/06/13 10:17:48 Use check_address when checking the GIO slots. Affected files ... .. //depot/projects/mips/sys/mips/sgimips/gio/gio.c#3 edit Differences ... ==== //depot/projects/mips/sys/mips/sgimips/gio/gio.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/mips/sys/mips/sgimips/gio/gio.c#2 $ + * $P4: //depot/projects/mips/sys/mips/sgimips/gio/gio.c#3 $ */ #include <sys/cdefs.h> @@ -36,6 +36,7 @@ #include <sys/bus.h> #include <sys/rman.h> +#include <machine/trap.h> #include <platform/models.h> #include <platform/gio/gioreg.h> #include <platform/gio/giovar.h> @@ -85,8 +86,13 @@ struct gio_device *gd; uint32_t product; device_t dev; + int error; product = bus_space_read_4(iv->gi_tag, iv->gi_handle, 0); + /* XXX subverts bus space */ + error = check_address((char *)MIPS_PHYS_TO_KSEG1(iv->gi_handle)); + if (error != 0) + return (ENODEV); for (gd = gio_devices; gd->gd_name != NULL; gd++) { if (gd->gd_product == product) { dev = device_add_child(gio, gd->gd_name, -1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406131018.i5DAIAQu097584>