From a4fd1a6147ce5788e91e16d857b06fd334068915 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sun, 13 Feb 2000 11:23:16 +0000 Subject: Handle out-of-bounds errors correctly --- sys/dev/ic/gdt_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 58ff4f729cd..b18c608854d 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.3 2000/02/13 10:56:41 niklas Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.4 2000/02/13 11:23:15 niklas Exp $ */ /* * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -555,9 +555,11 @@ gdt_scsi_cmd(xs) } if (blockno >= gdt->sc_hdr[target].hd_size || blockno + blockcnt > gdt->sc_hdr[target].hd_size) { + GDT_UNLOCK_GDT(gdt); printf("%s: out of bounds %u-%u >= %u\n", gdt->sc_dev.dv_xname, blockno, blockcnt, gdt->sc_hdr[target].hd_size); + scsi_done(xs); xs->error = XS_DRIVER_STUFFUP; return (COMPLETE); } -- cgit v1.2.3