diff options
author | iedowse <iedowse@FreeBSD.org> | 2005-11-12 17:39:31 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2005-11-12 17:39:31 +0000 |
commit | 9356bfb7e0a49fe397086b7d9c7335c1f3fd5de2 (patch) | |
tree | a39e2c791699bbad119ee5f8b1d4574b939ca22f | |
parent | 7e11077be27d1e79c7fc6515ba9f40a995d9d6ca (diff) | |
download | FreeBSD-src-9356bfb7e0a49fe397086b7d9c7335c1f3fd5de2.zip FreeBSD-src-9356bfb7e0a49fe397086b7d9c7335c1f3fd5de2.tar.gz |
Fix a > 1 year old typo that caused the ulpt driver to try reading
from the printer and discarding the data even if the ulpt device
was opened for reading. This resulted in crashes because two
conconcurrent read transfers were using the same transfer structure.
PR: usb/88886
Reported By: Alex Pivovarov
MFC after: 1 week
-rw-r--r-- | sys/dev/usb/ulpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 8a6ac3f..76dc4f4 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -578,7 +578,7 @@ ulptopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) } /* If it's not opened for read the set up a reader. */ - if (!(flags & FREAD)) { + if (!(flag & FREAD)) { DPRINTF(("ulpt_open: start read callout\n")); usb_callout_init(sc->sc_read_callout); usb_callout(sc->sc_read_callout, hz/5, ulpt_tick, sc); |