From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD73AC43217 for ; Wed, 19 Oct 2022 14:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbiJSO5s (ORCPT ); Wed, 19 Oct 2022 10:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiJSO53 (ORCPT ); Wed, 19 Oct 2022 10:57:29 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94774558FC for ; Wed, 19 Oct 2022 07:50:55 -0700 (PDT) Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J7wnVu010453 for ; Wed, 19 Oct 2022 07:50:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=KgF9aEzQqyB98FNrrI36bFwoTwssNDTibbiRcHxWjt4=; b=lbUGHWjOAIMDHkcJJu3EW192e+XpvdeQRECaSDKWiNXW12t79c6gK+H1mv+XRv4zRT+B Ici+HOfhib9qdS8BGD7s6rqryaN4dxSo7pXTgexbN3+oChVhAteBvyEQ9mHoAvCNPWpV E7pFtChu/o/2ZV97ZmK0jo8m/pwbyEzYX2Z1a8VAyAxfITMyGu4BzEdNjnXr+3thhnY6 zc49Di7Im46d+a+8gcVqDbgRqZGr1IPAVMWIKX86cx3dkcVkX18nyoYCJhHIqOL7UeI4 /LRil9HPkjUvqHENNuIq0CBimYhiIfsRM7Bd0ugMnC4JyKbOjrNISpmeA8SL4gV7ZOjg Rw== Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3kadaqbr99-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 19 Oct 2022 07:50:55 -0700 Received: from twshared9269.07.ash9.facebook.com (2620:10d:c085:208::11) by mail.thefacebook.com (2620:10d:c085:21d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 19 Oct 2022 07:50:53 -0700 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 608357E52F5F; Wed, 19 Oct 2022 07:50:49 -0700 (PDT) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov CC: , , Dylan Yudaken Subject: [PATCH liburing 2/2] fix len type of fgettxattr etc Date: Wed, 19 Oct 2022 07:50:42 -0700 Message-ID: <20221019145042.446477-3-dylany@meta.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221019145042.446477-1-dylany@meta.com> References: <20221019145042.446477-1-dylany@meta.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: Ypc1aM-OJNWrDfVUVlDfIPrfZTzNqLkV X-Proofpoint-GUID: Ypc1aM-OJNWrDfVUVlDfIPrfZTzNqLkV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_09,2022-10-19_03,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 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_r= w Fixes: 73849e908ce0 ("liburing: Add helper functions for fgetxattr and ge= txattr") Fixes: 72f55e271377 ("liburing: add helper functions for setxattr and fse= txattr") Signed-off-by: Dylan Yudaken --- 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_u= ring_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, } =20 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, } =20 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); --=20 2.30.2