Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1235656pxb; Wed, 10 Feb 2021 03:39:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxE7o7t167mOEV+pvQzPdIxXHZMi2C36ZwIdip3ZICvoBg9SqWyrxP6GtVNFxkL7ViLxZ8Z X-Received: by 2002:aa7:cd87:: with SMTP id x7mr2862767edv.210.1612957190795; Wed, 10 Feb 2021 03:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612957190; cv=none; d=google.com; s=arc-20160816; b=ySSORNRt9qZEKKoHVWENwvO1MfvQJRSUWEEAzxLS2v527I9i+sUXKuWIAKKbDR7DXw S+mJziAd7lrYZ+IBnEUbstlbBdHZ2Ucw2/U4S/zB+dEHk2eMjLeLl3gt7CW4d64qfcUv QHMY1KWVbaDd0MYqp/VZlR9mADM6p0RTNUAeOicBH9zpyWXeM+ERZnlqRFfZbi6GaZWo LKDg2WbVu0N/jxHJ02ExbWLdNCjLwfczkQ/gnff5Js+Bh8utJ98K050PZ3SA88vBWdVB UlaDJi+3v6lOtQw8spvCj4zsgGcGGbrJ5XLHdgDGZpF7TGoVmbP9QkJuPc+/Ysf33Fdy hkeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ZTT5yWAttLg1aAPI3ziGR5Ht0gucArUIncPh/zW+Slo=; b=e7zWP7kQOzGk2mATA3HbvUahaD0W/JGLWSiJqZoB6hXgUmIbdABublMl7/VjzSE+3n fXlvyD3xW94dpynlziePtBkez4pc2CLG+UjF3dU94StP07w9aNuwOBNQ9LG3G6sUCkkt 9kcKaQGj35f1aU522ljdNysqaUhYYPA7Z3U0bsfCnjsdH+vejuWE9RrzA7HLKK6Dhi7C +en/kg8CIgV+i7DJIYINQ2gHKZICWJacroX/ePAIx9q4dd/jID4oxKjyhxwRoVzi3RHe zkgQcRM7/wLtb7M1/dao80clSBGVFQadehxP77NCjqjvoRG2z3pZqgpwmlfUz631al+1 2zsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fLrc9Bga; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si1171219ejm.1.2021.02.10.03.39.26; Wed, 10 Feb 2021 03:39:50 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=fLrc9Bga; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbhBJLh3 (ORCPT + 99 others); Wed, 10 Feb 2021 06:37:29 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:44928 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbhBJLgI (ORCPT ); Wed, 10 Feb 2021 06:36:08 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 11ABYhsG084287; Wed, 10 Feb 2021 05:34:43 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1612956883; bh=ZTT5yWAttLg1aAPI3ziGR5Ht0gucArUIncPh/zW+Slo=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=fLrc9Bga7XGx1ykAbm/5P1m4+6987rvctjneHqEbVsSS0IGPFeeyMtWRWjsgS3Ls6 AxM85HnMtnEe6AiDd3muA4ZbuxiL8V2HLYJ7ZbGDxV4Vq2/hEpKSPsrQqphOtYEAru xcHHs76MZ4TP3c0PBNA+GbXKqkSTRW5Kf+LVx0Zo= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 11ABYhdl120259 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Feb 2021 05:34:43 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 10 Feb 2021 05:34:43 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 10 Feb 2021 05:34:43 -0600 Received: from [10.250.232.207] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 11ABYdg2126128; Wed, 10 Feb 2021 05:34:40 -0600 Subject: Re: [PATCH] dmaengine: ti: k3-udma: Fix NULL pointer dereference error To: =?UTF-8?Q?P=c3=a9ter_Ujfalusi?= , Dan Williams , Vinod Koul , Grygorii Strashko , Vignesh Raghavendra CC: , References: <20210209120238.9476-1-kishon@ti.com> <8e9954cd-53fa-2c7e-2019-9821e5f9d45a@gmail.com> From: Kishon Vijay Abraham I Message-ID: <30bfe6ef-de01-e019-d2d3-a999d6261fd8@ti.com> Date: Wed, 10 Feb 2021 17:04:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <8e9954cd-53fa-2c7e-2019-9821e5f9d45a@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 10/02/21 3:33 pm, Péter Ujfalusi wrote: > Hi Kishon, > > On 2/9/21 2:02 PM, Kishon Vijay Abraham I wrote: >> bcdma_get_*() and udma_get_*() checks if bchan/rchan/tchan/rflow is >> already allocated by checking if it has a NON NULL value. For the >> error cases, bchan/rchan/tchan/rflow will have error value >> and bcdma_get_*() and udma_get_*() considers this as already allocated >> (PASS) since the error values are NON NULL. This results in >> NULL pointer dereference error while de-referencing >> bchan/rchan/tchan/rflow. >> >> Reset the value of bchan/rchan/tchan/rflow to NULL if the allocation >> actually fails. >> >> Fixes: 017794739702 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA") >> Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA") >> Signed-off-by: Kishon Vijay Abraham I > > Is this the same patch as the other with the similar subject? Right, sorry for the duplicate patch (thought it didn't go out initially). Regards Kishon