From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFA86EAD8 for ; Mon, 4 Nov 2024 07:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730705426; cv=none; b=SaAz+fx/ugc5cmPnVyWmt/aIA2altIvnpjz0IDNDT6odu2KRaMl/smPB3uhdLL+1wjH+ZFP5TOdjIru4ouu4HEmXjUARITOxbsbe19td3wqB5NN/Z6uxqGcWEfnnIrcc/9NWBI/x3CgV7hFqDFC2TRDdBvoaWu94DmXsNOj145Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730705426; c=relaxed/simple; bh=Lm6FoqocilW6YyaC8xa4epmZQuuVdYCw3powq9JwH6Q=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=kEXhWpVWqmikj7cqmqsnx2rHPkrTQMomeOXEm+hGDQKY/YdEmx4jeSEiwQafVHpHfOztfy/DLLD6Ezv/S3booVEnn1GMZ2nBIQaNf15peZjjZLfhl6aFA196KvQNxc790i0CRCzYrPSke6XeyUgIhbVhXXXu/jOGINszINwG738= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Xhjg92zJMz1HMDx; Mon, 4 Nov 2024 15:25:41 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id 351FD140360; Mon, 4 Nov 2024 15:30:15 +0800 (CST) Received: from [10.67.110.237] (10.67.110.237) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 4 Nov 2024 15:30:14 +0800 Subject: Re: [PATCH] media: atomisp: Add check for rgby_data memory allocation failure To: Andy Shevchenko CC: , , , , , , References: <20241101154823.3067891-1-lihuafei1@huawei.com> From: Li Huafei Message-ID: Date: Mon, 4 Nov 2024 15:30:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemf500004.china.huawei.com (7.202.181.242) On 2024/11/1 18:55, Andy Shevchenko wrote: > On Fri, Nov 01, 2024 at 12:16:03PM +0200, Andy Shevchenko wrote: >> On Fri, Nov 01, 2024 at 05:57:36PM +0800, Li Huafei wrote: >>> On 2024/11/1 16:30, Andy Shevchenko wrote: >>>> On Fri, Nov 01, 2024 at 11:48:23PM +0800, Li Huafei wrote: >>>>> In ia_css_3a_statistics_allocate(), there is no check on the allocation >>>>> result of the rgby_data memory. If rgby_data is not successfully >>>>> allocated, it may trigger the assert(host_stats->rgby_data) assertion in >>>>> ia_css_s3a_hmem_decode(). Adding a check to fix this potential issue. >>>> >>>> Not sure if this code even run on currently supported hardware / firmware, >>>> but fix looks okay. >>>> >>>>> Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") >>>> >>>> No, this is an intermediate commit, you should find the original, which is >>>> earlier in the history. >>> >>> Apologies, the correct fix tag should be: >>> >>> Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") >>> >>> If this fix can be applied, do I need to send a v2, or can you help add the Fix tag? >> >> Up to Hans, but there is another question left unanswered about SoB chain. >> Can you clarify that? > > Ah, sorry, I misread the From and answered to the wrong thread. > Fixes tag seems better now. > Okay, I have sent v2: v2: https://lore.kernel.org/lkml/20241104145051.3088231-1-lihuafei1@huawei.com/ Thanks, Huafei