Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp181117pxb; Mon, 13 Sep 2021 16:24:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzCXIPlZv2Zdjqhhhy6Np4n2oMg4/g65gn3LrqGkquVI9OwPoJnTM+A3IOgdwmKM/aUNxZ X-Received: by 2002:a17:906:311b:: with SMTP id 27mr15762676ejx.428.1631575499648; Mon, 13 Sep 2021 16:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631575499; cv=none; d=google.com; s=arc-20160816; b=WxvA+grumCri7n7tuyJ39g1KL/4TdPfjiofInz94UhnOJbMw5PE/Ts6lbRJNyBgfzX G8M8fqelU3UjcHhWCM2xC5fy2x9bH6wziZBQqB3mRCySiDYrNrA76p8mRbgGo9UOI3uP 8pNzvjFCowRAMxn7ZIrNtxPMxmRbO/OEtO/Y6dNh6Znro7x0MzgV5La2YJ+s7byusSfB 3xYpuxvh74q12bWyXij2Fl6issBtDsyOxiPdlcLamhSdUZCphIFvwXPmgVDO0KgwIMvZ k5aNjGlRc/IpefY2dFnVXT/5ZRHLMW/XLWJFGygTGSJ6S0iZ3UGIi7mLZ+DU57TcCGf8 HRcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Br26/ms/DCwX5cc5cT3zAeHWO2Uk4H3mb5AD2XHmKco=; b=wKbDRBpZiBtUdiQ9103raLAUj2ggRKrdLbAG8xD/nwe6sM7cCN4EzCvG8hY4jVd85V sfVxAP82vq0VCWiSci4Vd6nVg0JdVpm0ochxVBnL956zs5UYZEvV09TNJwhja5NvUYaN nWUZGtRucI62ZB9G7Aj/3bqU/c8wb+7qSEyzGw7LXZBi4TPC0J6GlHzx/dHGB8hfVIWP ricn+Ur54Y4Eur4Yr/Qny+LgBhHEK6d4RjEXohlLao5ewjHWi4PTej5tpajsjT5Hampt VuS3OE65Gu0QoyFLUaV3B7LVkl46PIGbiF+omZjtxefNEMnevAbuoYLYyEHs1+V7F8PJ 9Wyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tz+d404Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z59si9231831ede.326.2021.09.13.16.24.35; Mon, 13 Sep 2021 16:24:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tz+d404Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347287AbhIMOtN (ORCPT + 99 others); Mon, 13 Sep 2021 10:49:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:58814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347635AbhIMOoY (ORCPT ); Mon, 13 Sep 2021 10:44:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 12DEB63218; Mon, 13 Sep 2021 13:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541453; bh=13A01LPjfB4eZPKnfQC7GBgeot9w4T5Qi5wyGWRiV/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tz+d404ZeSfU2CWtbSOyxOK055Lf0wKiKPwIDBrSKpCBFnHk5UimzAA/qwaqtgvR7 vGx319CT1a9Bv+HIC7hi0vNlu+ypvRoLomaLtx8D/h0Swn0Fa1fLzR4cTSuyZWSZ6I vpKNNALQpAmWYc0FlCfcVYTqGtFcJj2VWbWf7y+I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Axboe Subject: [PATCH 5.14 302/334] io_uring: io_uring_complete() trace should take an integer Date: Mon, 13 Sep 2021 15:15:56 +0200 Message-Id: <20210913131123.628995207@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jens Axboe commit 2fc2a7a62eb58650e71b4550cf6fa6cc0a75b2d2 upstream. It currently takes a long, and while that's normally OK, the io_uring limit is an int. Internally in io_uring it's an int, but sometimes it's passed as a long. That can yield confusing results where a completions seems to generate a huge result: ou-sqp-1297-1298 [001] ...1 788.056371: io_uring_complete: ring 000000000e98e046, user_data 0x0, result 4294967171, cflags 0 which is due to -ECANCELED being stored in an unsigned, and then passed in as a long. Using the right int type, the trace looks correct: iou-sqp-338-339 [002] ...1 15.633098: io_uring_complete: ring 00000000e0ac60cf, user_data 0x0, result -125, cflags 0 Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- include/trace/events/io_uring.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/trace/events/io_uring.h +++ b/include/trace/events/io_uring.h @@ -295,14 +295,14 @@ TRACE_EVENT(io_uring_fail_link, */ TRACE_EVENT(io_uring_complete, - TP_PROTO(void *ctx, u64 user_data, long res, unsigned cflags), + TP_PROTO(void *ctx, u64 user_data, int res, unsigned cflags), TP_ARGS(ctx, user_data, res, cflags), TP_STRUCT__entry ( __field( void *, ctx ) __field( u64, user_data ) - __field( long, res ) + __field( int, res ) __field( unsigned, cflags ) ), @@ -313,7 +313,7 @@ TRACE_EVENT(io_uring_complete, __entry->cflags = cflags; ), - TP_printk("ring %p, user_data 0x%llx, result %ld, cflags %x", + TP_printk("ring %p, user_data 0x%llx, result %d, cflags %x", __entry->ctx, (unsigned long long)__entry->user_data, __entry->res, __entry->cflags) );