Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp973517ybg; Mon, 1 Jun 2020 20:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOqnDdZRNFWSkyNUzrIliCkaM+h8MA1lH/cTBuD+qSwPWFPhwcCYYq/AW5oGY/aCPAYjcA X-Received: by 2002:a17:906:b88c:: with SMTP id hb12mr21235796ejb.483.1591069278594; Mon, 01 Jun 2020 20:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591069278; cv=none; d=google.com; s=arc-20160816; b=m0cUG7PDM9kDZ/aqoh0T7Bh0DfzZl43LHBXKcjvsgyMSYeK7pxox6GOvBSSFfObNkb EQbXbzjvQNVBj7K4TTRQfvPJFJp0hChOGYmpvHOe9Q7q+kEgzJVGq/07EMTB2xLWk7bH Llt+GDbxaeDL5xrsfl75sXVdmgSn7oTepHjn+oIzS/ypC25zOM+6LmhtiQxnxTpavBAA 8ljwi2UD9IxqiJag+bPvwDCmc1ee2ZmCLYmRdBHDrBeA21SK55QiQNstWUNqCiSpkTNX S4BpJcAAnvTofQ1V/6XTgT/CCk9CoQnILIINTRz59r1jbIPE/L9W9CABqhe4UDwUTf/P r+wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4Tu35wMUvVaUbJZZGmEqYD6hl6BjE9qoHA2F4LLuwpc=; b=LOfDe8He6C4qs+8uLfACe1UZDHswqVAIUqccT6GFW5LWpflPq38ssYQwQicvz8La9r Syhti4M96am8mmLWDDKJGNAQZCfLh20voUyfpcuKjr1aUMnnyH/GpXTnpHxlZ23vUmM3 pLdjx+uai1lW4GSK67IrrkLNQSpIo3GGHHWuTds7ZlNX+9lrNr3wPVu3ee8F+n9aA4hM UjVt7C3chc3AU33l2eZPLiQZMYqtzNok63PhxZCPdwfExHe2ilvf1jNWGOXGeW/zRig/ Ot8YU1/P5qiZWE+9npQ8KPqSRPwf6GLvXvAdHwwxlxZJMWpGLbiKvDCtWPfjAHQgYoE3 GZ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=e0nXZ01G; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si743062ejb.289.2020.06.01.20.40.55; Mon, 01 Jun 2020 20:41:18 -0700 (PDT) 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=@chromium.org header.s=google header.b=e0nXZ01G; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726267AbgFBDh6 (ORCPT + 99 others); Mon, 1 Jun 2020 23:37:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725793AbgFBDh5 (ORCPT ); Mon, 1 Jun 2020 23:37:57 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D97AC061A0E for ; Mon, 1 Jun 2020 20:37:56 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id a68so1218478vsd.8 for ; Mon, 01 Jun 2020 20:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Tu35wMUvVaUbJZZGmEqYD6hl6BjE9qoHA2F4LLuwpc=; b=e0nXZ01G9yqKOkxkRH/jBSACUc09CJtCCX4fdvqm/EU8DnLD75VaMN4adRxzPObMIe PFN2dMI9s/CCAjPncFv8ziDpLR5xr/RG+MLjLWinktrMEYX9z/M3kyeOyB/ywBapzCZF 8Bk72OHQ+Yyji3hqPHvrZf8pF5YEaM0Runqus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Tu35wMUvVaUbJZZGmEqYD6hl6BjE9qoHA2F4LLuwpc=; b=jo1GLsuQjPngZKdeB03g8ADymAVp9Bvf1tot7u/q51750YbUo0c/WoSQuUEFjMCoOM wT/luZUOEYQx82pIcF+s99zzrrQxMBvHh4pEAT8e5Ab/Gk7S56m9YR3vahJq+hSNq5TD HKM7u8w7aOYlqrf6V02DESahYj3gH4lcd1t/RJRisOxQqJLQIT4iRj18d4uYK4cLmj+x +0cvyUf4LwdQc7XL2EvbFWFxc/T4WMwtTGLsNOb9cBzwNlwBNfxIAZShtHVaROXV2+bj M2bRFlL7eRFv/YB8/KNL1JFWCmDrv9XW5RrUhSa5+M1+v1oZcjnSrZpofuW9dw2MTyYL V2yg== X-Gm-Message-State: AOAM530igRJTYjvzEixtPuaz3r44evOXJAlnnM9m4JtpRCJWgpWjgzxJ etLvKvJ4Dt/RqW2zr7MuiOj1udwFsCA= X-Received: by 2002:a67:7c94:: with SMTP id x142mr6461298vsc.192.1591069075336; Mon, 01 Jun 2020 20:37:55 -0700 (PDT) Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com. [209.85.222.45]) by smtp.gmail.com with ESMTPSA id f138sm246984vke.54.2020.06.01.20.37.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Jun 2020 20:37:54 -0700 (PDT) Received: by mail-ua1-f45.google.com with SMTP id d8so741829uam.12 for ; Mon, 01 Jun 2020 20:37:54 -0700 (PDT) X-Received: by 2002:ab0:1684:: with SMTP id e4mr15730387uaf.22.1591069073999; Mon, 01 Jun 2020 20:37:53 -0700 (PDT) MIME-Version: 1.0 References: <1588314480-22409-1-git-send-email-mansur@codeaurora.org> In-Reply-To: <1588314480-22409-1-git-send-email-mansur@codeaurora.org> From: Doug Anderson Date: Mon, 1 Jun 2020 20:37:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2] venus: fix multiple encoder crash To: Mansur Alisha Shaik Cc: stanimir.varbanov@linaro.org, LKML , linux-arm-msm , vgarodia@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Apr 30, 2020 at 11:28 PM Mansur Alisha Shaik wrote: > > Currently we are considering the instances which are available > in core->inst list for load calculation in min_loaded_core() > function, but this is incorrect because by the time we call > decide_core() for second instance, the third instance not > filled yet codec_freq_data pointer. > > Solve this by considering the instances whose session has started. > > Signed-off-by: Mansur Alisha Shaik > --- > Changes in V2: > - As per Alex and Jeffrey comments, elaborated problem > and addressed review comments. > > drivers/media/platform/qcom/venus/pm_helpers.c | 4 ++++ > 1 file changed, 4 insertions(+) This fixes the same crash I reported here: https://lore.kernel.org/r/20200601150314.RFC.1.I1e40623bbe8fa43ff1415fc273cba66503b9b048@changeid Thus: Fixes: eff82f79c562 ("media: venus: introduce core selection") Tested-by: Douglas Anderson I still have the same reservations I expressed in the patch I posed about whether this is truly safe from a locking point of view, but certainly it puts us in a better state than we are today. -Doug