From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: gsp: add checking oversized commands Date: Thu, 19 Feb 2026 18:43:07 +1000 Message-ID: In-Reply-To: <20260219-cmdq-continuation-v2-4-2e8b7615536f@nvidia.com> References: <20260219-cmdq-continuation-v2-0-2e8b7615536f@nvidia.com> <20260219-cmdq-continuation-v2-4-2e8b7615536f@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review > + if size_of::() + size > GSP_MSG_QUEUE_ELEMENT_SIZE_MAX { > + return Err(EMSGSIZE); > + } This adds an early check in `allocate_command` that rejects commands larger than `GSP_MSG_QUEUE_ELEMENT_SIZE_MAX` (64KB). This is the right place for this check -- it prevents the poll loop from waiting forever for space that can never be sufficient. After patch 8, `send_command` uses `SplitState` so `allocate_command` should never actually see oversized commands, but the check still serves as a useful invariant guard. No issues. --- Generated by Claude Code Patch Reviewer