]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gve: Return error for unknown admin queue command
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Mon, 16 Jun 2025 05:45:01 +0000 (22:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:58 +0000 (16:25 +0200)
commit652b0401b2a66980f828436fa8f2b4f31e9f541e
tree9313e031e601e3b5ea4a577ce95af5cb98529eb7
parent4839cf44aa5d2d71905bc9cab0da4c252f3d34c0
gve: Return error for unknown admin queue command

[ Upstream commit b11344f63fdd9e8c5121148a6965b41079071dd2 ]

In gve_adminq_issue_cmd(), return -EINVAL instead of 0 when an unknown
admin queue command opcode is encountered.

This prevents the function from silently succeeding on invalid input
and prevents undefined behavior by ensuring the function fails gracefully
when an unrecognized opcode is provided.

These changes improve error handling.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20250616054504.1644770-2-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/google/gve/gve_adminq.c