From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>, Pavel Begunkov <[email protected]>
Cc: <[email protected]>, <[email protected]>,
Dylan Yudaken <[email protected]>
Subject: [PATCH liburing 2/2] fix len type of fgettxattr etc
Date: Wed, 19 Oct 2022 07:50:42 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
The size_t len was passed to an unsigned int directly.
Take an unsigned int instead which is what is expected by io_uring_prep_rw
Fixes: 73849e908ce0 ("liburing: Add helper functions for fgetxattr and getxattr")
Fixes: 72f55e271377 ("liburing: add helper functions for setxattr and fsetxattr")
Signed-off-by: Dylan Yudaken <[email protected]>
---
src/include/liburing.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 118bba9eea15..780a19ccb1d9 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -991,7 +991,7 @@ static inline void io_uring_prep_getxattr(struct io_uring_sqe *sqe,
const char *name,
char *value,
const char *path,
- size_t len)
+ unsigned int len)
{
io_uring_prep_rw(IORING_OP_GETXATTR, sqe, 0, name, len,
(__u64) (uintptr_t) value);
@@ -1004,7 +1004,7 @@ static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
const char *value,
const char *path,
int flags,
- size_t len)
+ unsigned int len)
{
io_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len,
(__u64) (uintptr_t) value);
@@ -1013,10 +1013,10 @@ static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
}
static inline void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,
- int fd,
+ int fd,
const char *name,
char *value,
- size_t len)
+ unsigned int len)
{
io_uring_prep_rw(IORING_OP_FGETXATTR, sqe, fd, name, len,
(__u64) (uintptr_t) value);
@@ -1024,11 +1024,11 @@ static inline void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,
}
static inline void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe,
- int fd,
- const char *name,
- const char *value,
- int flags,
- size_t len)
+ int fd,
+ const char *name,
+ const char *value,
+ int flags,
+ unsigned int len)
{
io_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len,
(__u64) (uintptr_t) value);
--
2.30.2
next prev parent reply other threads:[~2022-10-19 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 14:50 [PATCH liburing 0/2] liburing: fix shortening api issues Dylan Yudaken
2022-10-19 14:50 ` [PATCH liburing 1/2] fix int shortening bug in io_uring_recvmsg_validate Dylan Yudaken
2022-10-19 14:50 ` Dylan Yudaken [this message]
2022-10-19 19:49 ` [PATCH liburing 0/2] liburing: fix shortening api issues Jens Axboe
2022-10-19 20:52 ` Ammar Faizi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox