Check the return value of tsleep() in snpread(). This may be
important, since our sleep is interruptable (PCATCH flag). PR: 30985 Discovered by: Vladimir Jakovenko <vovik@lucky.net> Submitted by: Valentin Nechayev <netch@segfault.kiev.ua>
This commit is contained in:
parent
3278021b94
commit
2c1a6f2178
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86861
@ -256,7 +256,10 @@ snpread(dev, uio, flag)
|
||||
if (flag & IO_NDELAY)
|
||||
return (EWOULDBLOCK);
|
||||
snp->snp_flags |= SNOOP_RWAIT;
|
||||
tsleep((caddr_t)snp, (PZERO + 1) | PCATCH, "snprd", 0);
|
||||
error = tsleep((caddr_t)snp, (PZERO + 1) | PCATCH,
|
||||
"snprd", 0);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
}
|
||||
} while (snp->snp_len == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user