Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp209612iog; Mon, 13 Jun 2022 00:25:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznFLN/BTv1KLqreWZ0wlli1WXPjxx8IeHlVUsZQXOO4Nh7e7aHIbX/k8gtIh9unT2Lw459 X-Received: by 2002:a17:907:8b06:b0:711:e7f6:1728 with SMTP id sz6-20020a1709078b0600b00711e7f61728mr26416127ejc.32.1655105130093; Mon, 13 Jun 2022 00:25:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655105130; cv=pass; d=google.com; s=arc-20160816; b=MuUOvvj5RZcS68O6EYTQiv/+7xzG+cp1bGGseGScKhLGR5JB08+rKDwnnezu6g5ezr ciQhwIYuUChIk4TASQQ17B5swujZkbzPhPiHc/x5SVtz58WWE7uyVLIWz+/vKIQFUEa6 D/S+klLKk+1amcCsAkOkSlfxJ7c680DB6vkMJuxQJJiiTTuP/ccZY+GBsStttMmjwW2Y VNCs+4V5nOXhoGiIEUyWfixgjJCtH6LEhUEJpmJ4FV7Mubt95BcnZLmZOvA7CLhhRab+ j58q1O7FPWbUAVdHFWsLKF3fv1pHLc2xDmdotQp5S9923E5wlxjCUrMKGfLW7wQ1Dqg0 SGSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=arDNSCeXRsklq9mW+JL7BqNOqyj25pMBpThfU9iVk0M=; b=QjadjxkZ+8zBnmiysVVfug7n8e3yQIaJpxFSVmPRY8E+OeGJ6FqkAj2KnFPH6Yamn5 D7aj+EW8g8O8gOzp/b+/Jx1YXBWJR+FsMEX2ewAFWlO8HIicp9qt6b6L8JyDUYRcwzsY jPDchl3nwoZqhwq8EZjFJULjxgbFrjcJ6q73ci4sMhYoDp1byYOiHn0QcEvFRGBLRCIL fhUIrDUuC4zphKc6XRM4WKKiPipVGqq8Ul0z5/sOUnVdf8hMl9zpfpdQejvYV2M8CGh2 2Pk7VUWJ4xTdai4490do/5BrnfWAjBmuWDtRdc1cXI8hD/selQpGRFVpAYkV/Ls3+h/w /9rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BwpnMHJS; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc4-20020a1709071c0400b006f4e2763791si8074892ejc.663.2022.06.13.00.25.04; Mon, 13 Jun 2022 00:25:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=BwpnMHJS; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237956AbiFMGwC (ORCPT + 99 others); Mon, 13 Jun 2022 02:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238555AbiFMGvg (ORCPT ); Mon, 13 Jun 2022 02:51:36 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2064.outbound.protection.outlook.com [40.107.236.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E03161A06C for ; Sun, 12 Jun 2022 23:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VkwIDUpHbKDd6xvWMJqEoggAqpQxj3oFMvklgdgEhjTFNxuu+XMIIlo0VIlUCKQ7KsvlqLFQlOGDN0xnvFcpCnDRAHMzU2YhZAEA5GJNQXP8kjiYpOUGIX/DLDvwt+Djhu4aaRqtBiNXdF1R2QFXaUqJHdhFuVskEkdFbB12YVan+dfO1TLWTkGgthNFbdNUnf8WEnUhFPN8cB0k5GnjrtXo1I3TAPYVTyffdLyytPdbj4h9wQXT6EN2dTIfe22rUJZD4zKCSOItr3MYT2AeHbIZbjVJuIv8t1HJMUEYxtGE0/cXJ37xKzCWnVqCBZM0D9l1tKi1kG+hwnrDmBozAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=arDNSCeXRsklq9mW+JL7BqNOqyj25pMBpThfU9iVk0M=; b=OAKVcz8OriZhwhoTc6WwizZmhIjO4iv7r0k7JN/CyPPYOa9g/bOw5b5pSNAn3AWJgj7IZaPU5O0WgIzOeAx9zhqLYRggMkcVko9TQoHcixOIczGA/18zU9mmDiClgamZe0bgOY9S8cQs4pLOT9gflhQKgxUsw+mTnHfcw57mVn8VFoP3txG0WXu1/vCOugAHf71NqKtBmuBxKtR30MxjVEkivOimSNQmcgwfye4ZpR3A/q9Y8Ai6yHHl0CWAtKuP+0f0VR8ue6jg00P1WVlX5QGwPZHjHnYhvQvD/+eRmwm9jSIQcyQwFF5fFufGwRgyWf9IKoZ/2GYvUrHU1f2oXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=arDNSCeXRsklq9mW+JL7BqNOqyj25pMBpThfU9iVk0M=; b=BwpnMHJSTKKWMzlzY2mddDnKmDxW/9pyJXDbmTO6/4JD6sNydegtYSaxERNwnABQ9IiSStnsIEYU4LAOQZqCGNrNMbuplTIGKqyRA8aNc3GV536E9iU/qV/wZUnubTbfvWfjkdbMpYhCc/OibCLxZMtLVwT3fKukgxoL4Z0uaTc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by BN8PR12MB3300.namprd12.prod.outlook.com (2603:10b6:408:6a::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Mon, 13 Jun 2022 06:51:30 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::e0fd:45cf:c701:2731]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::e0fd:45cf:c701:2731%6]) with mapi id 15.20.5332.019; Mon, 13 Jun 2022 06:51:28 +0000 Message-ID: <4845ad23-476c-97b9-9b3f-d8aaa9027d26@amd.com> Date: Mon, 13 Jun 2022 08:51:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH -next] drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline() Content-Language: en-US To: Yang Yingliang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: daniel.vetter@ffwll.ch References: <20220613063454.2609364-1-yangyingliang@huawei.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20220613063454.2609364-1-yangyingliang@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AS9PR04CA0082.eurprd04.prod.outlook.com (2603:10a6:20b:48b::6) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf0cc945-79c6-4763-d6f8-08da4d0923c1 X-MS-TrafficTypeDiagnostic: BN8PR12MB3300:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DFKMJUuoQvNmt9odTI55KqP77WhFIiPfnO6Frnmosv2Z1yp0q9/7RbyGzMTbTf0lFjKdguzwGMq5uabnb2pFc4QezaITb99RWn5JdVagsGLEs7j7hcrrGbvX5Qx1Rvu60MA16TuYD6wre4kl+i6xqm+D6Enyv0cNSdO1JmGC2LSCxejQQ/beIgbjildU2yKrKfo73gLD0KSiLTaJhvUjBt7p4dq375t5ZONc9Ye7Xx0lY/sMOVj8vqLxMvPlijwr8+El2jDrmAhdeNc7gFl4Pn9nQwOvS9xFXBTzoD73jyIbfwCC6KvH8qXDUYLh83UBHiZl0Vlyi76+ZvFqTkflDcvNNiDCz1mVtIRYsefTwVqD3qc54p+oiY0brsWA/Uc75iTyaHRsuGTxENlYJEY0zBTKbqRYr5Cmw4oixS1b2kchZMx2elkwnKCg/Jn3Zt5oDVZZ6wpmsnl0dxrfCEpx3hk8H0XMlkSZHiQxZ0h2q4wxJIEnqI1INCCHr85CNH0evQyVWR9FqgzbOUGYpmsaC07tZLyM4YrVB2g9k9Wotjw9XBtDImUUWeRHxQs8Dybfo0Gt+sJd42dE0bVUxsF/E0X3zEwYQg4AtfS2QurtxASEKVSKfI1MYpmMPGzJZanuaVELC+2bBWXC1nm1oe/ckd2p/uFx1BRo9V2z8vY9C4lr7dTlODS0YMzv8eiw+6sPsy77XhPlyFAt8AkBZly8ySV+e+KL9YOb7lCXOcI1FRc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(31686004)(38100700002)(86362001)(31696002)(66476007)(66556008)(8676002)(316002)(4326008)(66946007)(2906002)(6506007)(5660300002)(8936002)(186003)(66574015)(2616005)(6486002)(6512007)(83380400001)(508600001)(26005)(36756003)(6666004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFIveE94YkI1TlorN0NabFJQMEg3YS9UTEJPWmN2bmFUOWMyYVBlWWRHYlRa?= =?utf-8?B?OGlZNVJ4a3Fzck9ualZIMzlvcG45WE9vWHhYMEhrbC96YkljWUthRmRJbjYr?= =?utf-8?B?R2FzRUhiekhqOEZPSEhaWDN6VHFUUGRLYXViM0NtTXB6MlVQSFZKSVpDbXZP?= =?utf-8?B?RzVFM2R0TlVzbTlaUm96YVZWdnhtMFNicnZEVXlhTk1na0xRb1lmbkRxS3hv?= =?utf-8?B?OEhsRjVINnBHYjZjQ0Y2SXNFWEpXV3dXWVQ0NytEWEkxS2NNT3grQWd3YkZX?= =?utf-8?B?WHhiem1nRE1sVXp4S3NRTkhSQjBCT2JlOVdOQUZiYXdzRnV4UFFRUHRSR1RJ?= =?utf-8?B?SXZUZ1Ftb1NoS2dPUytEWlZRSzdlaXRnc3pWaDcrNWVhbjNMaTREK3dSdjlL?= =?utf-8?B?d3dzSUFPYlgwSFZKVVc2UkprdUk1czhpd1dDeTBXemU2MnZpcFJ1blNHaU1u?= =?utf-8?B?cmp6QzF1WmZzMVZuVWdSMVdmM2d1SWhuSXlP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-8?B?dm9IK3pjbWZweUVwNXc3R1ZmTW8xKzdwZ0lXL1UzVldSdHpZSGpwQT09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf0cc945-79c6-4763-d6f8-08da4d0923c1 X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2022 06:51:27.9265 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4vLu/xK12Df/98/3aK4DLkqT1f6idNIyUfixFz5jTMdNkcJJEr0qcEr5/KSw5jZg X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3300 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 13.06.22 um 08:34 schrieb Yang Yingliang: > If dma_fence_unwrap_merge() fails, it should return error code > in drm_syncobj_transfer_to_timeline() > > Fixes: ec8d985ff26f ("drm: use dma_fence_unwrap_merge() in drm_syncobj") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang Reviewed-by: Christian König Going to push that in a minute. Thanks, Christian. > --- > drivers/gpu/drm/drm_syncobj.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c > index bbad9e4696e7..0c2be8360525 100644 > --- a/drivers/gpu/drm/drm_syncobj.c > +++ b/drivers/gpu/drm/drm_syncobj.c > @@ -874,8 +874,10 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private, > > fence = dma_fence_unwrap_merge(tmp); > dma_fence_put(tmp); > - if (!fence) > + if (!fence) { > + ret = -ENOMEM; > goto err_put_timeline; > + } > > chain = dma_fence_chain_alloc(); > if (!chain) {