public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [query] payload size check in fuse_uring_create_ring_ent
@ 2025-10-27 14:49 ALOK TIWARI
  2025-10-27 14:59 ` Bernd Schubert
  0 siblings, 1 reply; 2+ messages in thread
From: ALOK TIWARI @ 2025-10-27 14:49 UTC (permalink / raw)
  To: bschubert, miklos, linux-fsdevel, asml.silence, luis, io-uring
  Cc: alok.a.tiwari

Hi,

I am wondering if this condition is intentional.
It seems that ring->max_payload_sz represents the maximum allowed 
payload size, so rejecting payloads smaller than that looks unexpected.

Could you please confirm whether the current < check is correct or
if this should be > instead?

24fe962c86f5 ("fuse: {io-uring} Handle SQEs - register commands")

Thanks,
Alok
---
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index f6b12aebb8bb..4106fc80c1e8 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -1051,7 +1051,7 @@ fuse_uring_create_ring_ent(struct io_uring_cmd *cmd,
         }

         payload_size = iov[1].iov_len;
-       if (payload_size < ring->max_payload_sz) {
+       if (payload_size > ring->max_payload_sz) {
                 pr_info_ratelimited("Invalid req payload len %zu\n",
                                     payload_size);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-27 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 14:49 [query] payload size check in fuse_uring_create_ring_ent ALOK TIWARI
2025-10-27 14:59 ` Bernd Schubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox