diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-08-02 23:00:55 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-08-02 23:00:55 +0000 |
commit | 3cda75f5bff339df3272b31a3de9141f3229d816 (patch) | |
tree | 4c3abb1c64330dd116bfd68deb93ce144c8ae381 /sys | |
parent | b74a056a5cd9c84b02ff6d4ae92f895bbdbfbd51 (diff) |
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@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/ses.c | 4 |
1 files 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 <dlg@openbsd.org> @@ -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); |