mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
io_uring_setup: fixing cqentries setup bug.
We should compare against maximum number of allowed cq entries instead of comparing against the flag that allows to set that number. PiperOrigin-RevId: 487045476
This commit is contained in:
committed by
gVisor bot
parent
21b9d59950
commit
a1476ce4f5
@@ -94,7 +94,7 @@ func New(ctx context.Context, vfsObj *vfs.VirtualFilesystem, entries uint32, par
|
||||
if params.Flags&linux.IORING_SETUP_CQSIZE != 0 {
|
||||
var ok bool
|
||||
numCqEntries, ok = roundUpPowerOfTwo(params.CqEntries)
|
||||
if !ok || numCqEntries < numSqEntries || numCqEntries > linux.IORING_SETUP_CQSIZE {
|
||||
if !ok || numCqEntries < numSqEntries || numCqEntries > linux.IORING_MAX_CQ_ENTRIES {
|
||||
return nil, linuxerr.EINVAL
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user