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 1BC97C433F5 for ; Thu, 29 Sep 2022 16:44:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235854AbiI2Qow (ORCPT ); Thu, 29 Sep 2022 12:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235802AbiI2Qov (ORCPT ); Thu, 29 Sep 2022 12:44:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D9D4627A; Thu, 29 Sep 2022 09:44:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C3B2CB823CB; Thu, 29 Sep 2022 16:44:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E30F2C433D6; Thu, 29 Sep 2022 16:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664469878; bh=08DZeiJIcmGMGqxP734VuYdAt4eOjHGyRG2ZlK6jCII=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l+z9UV3tEk6GZM38E8dzL+JQKVzwmK2yZV25zL4p1L6BYaQRMT52hQ2QaR1jQc0+W 5eAuZkTZfqmFlikwNnMswhqGk6hVrXV7QE0B2XtnwGyONEcOKfBk8N6yLVS2/uSFEc K+T9vfurzt953JdfqkXyUKOQ9q1rvCYOBfAYZ4fuKr0H10bZhtjvfePlLJxwaKDINi d40IP+fdhcaqBVgXtZ2rnXv/Z5ekcDbeVwmMGqJclkFQT/Bwc66/m4RvBDqegrU3Ue aMpA5PVAO/rkEbCDrRKxDMgOeKxiT5P7yxDI8HGC6heJWeelrkfcVCGOj9S12CDk5u W+NrTu/90JdFw== Date: Thu, 29 Sep 2022 22:14:34 +0530 From: Vinod Koul To: Christian Marangi Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Mark Brown , Thomas Pedersen , Jonathan McDowell , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg Message-ID: References: <20220916041256.7104-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220916041256.7104-1-ansuelsmth@gmail.com> Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 16-09-22, 06:12, Christian Marangi wrote: > The calling convention for pre_slave_sg is to return NULL on error and > provide an error log to the system. Qcom-adm instead provide error > pointer when an error occur. This indirectly cause kernel panic for > example for the nandc driver that checks only if the pointer returned by > device_prep_slave_sg is not NULL. Returning an error pointer makes nandc > think the device_prep_slave_sg function correctly completed and makes > the kernel panics later in the code. > > While nandc is the one that makes the kernel crash, it was pointed out > that the real problem is qcom-adm not following calling convention for > that function. > > To fix this, drop returning error pointer and return NULL with an error > log. Applied, thanks -- ~Vinod