From 13c2458d260977e00ea11701de6a501f8ff5b8bd Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 2 Aug 2010 23:00:54 +0000 Subject: [PATCH] Don't refer to xs->cmd, even via a pointer to xs->cmd, after xs has been put back in the pool. Fixes Daniel Dickman's ses device. ok matthew@ deraadt@ --- sys/scsi/ses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c index b6674ada864..f67b4907130 100644 --- a/sys/scsi/ses.c +++ b/sys/scsi/ses.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.c,v 1.48 2010/07/22 00:31:06 krw Exp $ */ +/* $OpenBSD: ses.c,v 1.49 2010/08/02 23:00:54 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -301,7 +301,7 @@ ses_read_config(struct ses_softc *sc) } cfg = (struct ses_config_hdr *)buf; - if (cfg->pgcode != cmd->pgcode || betoh16(cfg->length) > + if (cfg->pgcode != SES_PAGE_CONFIG || betoh16(cfg->length) > SES_BUFLEN) { free(buf, M_DEVBUF); return (1); -- 2.20.1