Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1518341pxb; Thu, 4 Feb 2021 15:28:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzM/fttnIAg3IYH2K2ohIQJAgyH/33+Yl23OY0AboFdDDOBAHAkzgIYTNdiy1mOv1KJfarN X-Received: by 2002:aa7:cb8a:: with SMTP id r10mr924243edt.152.1612481302626; Thu, 04 Feb 2021 15:28:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481302; cv=none; d=google.com; s=arc-20160816; b=mJKTLIkXx0DkzkGYMWzyWzoYH5ThYBGkpKRoBAOe4Qiey7oI25I9Fygiwhj3qRZsaR o4eme5RkHxazUwTb8k4delQ25Is4X9XjcrdYU4kKcCmxTLMQ5REdZ8tJoJtqO6BmwjTB n5MzdkDdguvBJLP5EmcdBwe0giN327SdaJaFB8F1XVkaEy9VwFxBBJ/Q+XaoqoEVpTFO lokgbliyYHZSnuBQpM3ZUFWBbyh/POVB68YsEZt5eKVoCi7gIJR2I6rvX1pyPQIcbilF YuQJPJ54qyHaFydSGoE9nC9PHvD1qw+38jOKoGqhFE2KC7zhgLsvsecolxePenXp1r6t iK+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=8NA16pgrmr+hZCZ5N/nNI47zYO39E+Z5pyXAWJADZvM=; b=HkqebT7IhprkjwiIbB22i2uhbb0RDJO5yLm2Apl401kAGQ9RlgjOpfOmpeW8MSonP6 1mw4v57M0sG9oChSDwWR6JkNHpslYmsuQdV4eubS8SVSyIhxbDAwVjaRFTIg/wfoR7OE Hf7CJeH+dhb4PzI4qMXlHFLfSH+hxd4kVTqwDHOCJ/iyKF+xKZ6NjPVHA7gvDnQ2aYE9 vXXAXO0iFEzkEaU8Zauwje+F/Ysa/rrjYD7agWjMr+P3E/9p9nF6C7iFRVnHATPNbuDW 2Hch2cNUWV+YKH7h5WH0/Bl4S0+1HFLUj2Btm1JBE0HxMzGl1iEHuIdJx08BC5su8jV/ QSeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PcItGjwT; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si4089656edq.562.2021.02.04.15.27.58; Thu, 04 Feb 2021 15:28:22 -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=@gmail.com header.s=20161025 header.b=PcItGjwT; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbhBDHWv (ORCPT + 99 others); Thu, 4 Feb 2021 02:22:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233803AbhBDHWt (ORCPT ); Thu, 4 Feb 2021 02:22:49 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28DF6C061573 for ; Wed, 3 Feb 2021 23:22:09 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id g10so2896771eds.2 for ; Wed, 03 Feb 2021 23:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8NA16pgrmr+hZCZ5N/nNI47zYO39E+Z5pyXAWJADZvM=; b=PcItGjwTS/37G6Az/tk9ZvGb4LiMfYQ+uLHWZqQ8V6/rQZvFLwnKvJDvmXaTVHwpD5 qCwGe1OhOBhkpCQb7/Vkb9EJtfb9/HwsQa1szNrNtvY/bTXym+joShlGzJQd0VIxXp7L Qk8RDXYckHWpvLxyplqyn4XqaAd56I+adwzu4EMevtqJWXLePShBBfzEPwWenzWwXL72 6JyjhU20p94t3Rv6G8aGv8qsGxBuPgSCz9zS3FHeCsv5RYe2fQC1oICzKmT+VUaZcBEV VsvYQaWNFlZ2URdsvgiCGCjsUMqhjLKWuIWQeOAIh2BREuBTRsKeZudAjVo1B0nBfn2/ Xy9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8NA16pgrmr+hZCZ5N/nNI47zYO39E+Z5pyXAWJADZvM=; b=HlJv/1FPPq5pkficO415xsvRlYJj7CnGf/7mfgEWZupLu5tErscjwtrvtEuUOjHIN+ LUS1dSAukLcMRcWwAWIx/xsszflNJnUSvYV/yhMpZznX090RRh/vf9nNnck4pvFyTB5X bSv8QdZBsRE/UqgEEndff1QdUGPuJwXJUDtm/PFEEjzi1GyCFrGFuICRyxspjLVmWJiW X9/Hh/RdvMT6DpWbi1nQPh6HltQ/D4CFMoVjUIvX6CVTQp8kz/Nbtcl0DvbqlX4mf8Ml QPWO9SPE2odUCkoh32X0R15M3Sh6BuLDKAU6nt5n+Nwmpo/DgsM6Ci5OSkFy7YtVid2n ejmg== X-Gm-Message-State: AOAM532s85Pk02mUL9ch3SCZfzF2crjx0b1uU4VPasG300pdNM9iBVcz 3YcpShQkKlP9ecwSnf/PON7nacXXNryrx1bPVOU= X-Received: by 2002:aa7:d692:: with SMTP id d18mr6790728edr.327.1612423327916; Wed, 03 Feb 2021 23:22:07 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a17:906:1959:0:0:0:0 with HTTP; Wed, 3 Feb 2021 23:22:07 -0800 (PST) In-Reply-To: References: <1608022118-29993-1-git-send-email-yaohaidong369@gmail.com> From: Yao Haidong Date: Thu, 4 Feb 2021 15:22:07 +0800 Message-ID: Subject: Re: [PATCH] add chan->cl check in mbox_chan_received_data() To: Jassi Brar Cc: natechancellor@gmail.com, Nick Desaulniers , Linux Kernel Mailing List , clang-built-linux@googlegroups.com, Orson Zhai , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oh, I see, thank you 2021-02-01 14:28 GMT+08:00, Jassi Brar : > On Thu, Jan 7, 2021 at 5:53 AM haidong yao wrote: >> >> Hi Jassi Brar >> >> Thank you very much for your reply. >> >> Look at the function sprd_mbox_outbox_isr . >> >> Chan is !NULL. >> >> chan->cl is NULL when the client driver not loaded, the controller >> driver don't know the client driver loaded successfully, so, I do not >> use mbox_free_channel. >> >> Here,How do you know chan->cl is ok? >> > The channel is supposed to get/send data _only_ if it is being used by a > client. > Which you can mark in .startup() and .shutdown(). > > Checking for chan->cl will make your symptoms disappear but that is > not the right fix for the issue. > The right fix is to EITHER not cause Rx/Tx interrupt on a channel not > being used, OR not send it to upper layers. > > thanks. >