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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C0D7C2D0B1 for ; Thu, 5 Dec 2019 02:39:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 230032245C for ; Thu, 5 Dec 2019 02:39:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="2AEXe14i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728731AbfLECjJ (ORCPT ); Wed, 4 Dec 2019 21:39:09 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37218 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728132AbfLECjI (ORCPT ); Wed, 4 Dec 2019 21:39:08 -0500 Received: by mail-pg1-f196.google.com with SMTP id q127so840918pga.4 for ; Wed, 04 Dec 2019 18:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=2AEXe14iZdFWfADVPMho1nGLswqsSNlAEnAUgFieMyEajydA5UtIA2BcOw3cvQHdZO +7SSE0yQn7fq3n4nHsbvSjKepiS29Gm5WR9rq8NTOvdFdi1YqxhsWZNbYk8a14XIStKF hb74QE/F9ENthSZE3yzn0ZQDkHdLNmssNPXh/EW0qy0yWmB7IFhwbQ7Hy2WVvJXW05oI H1C0sUhnHCdN0aF6ajXMtxjjgQBm0bYucIo02eLqXp6IojHQsBo24gGBGz9ZhVJZDdLp 4LhMKEeYfNiw1x190FxFAVW9rFhpjJNh7tIG1Cx/l25+RJ0xiWa5+IVfaItxv51z2fvq fu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=L/owLE52HZtgAdLx7Kq6tW8PgewJdfq3GRphJl0wkFaJmnIjxA9YofReMnm4gTWgvw ukC2SJn+FWWSAcQ+nYacuNih8V+a2S27tmNj9XM+B+uqGDCJJDY/9kuuIAaQsTvTeq8N gTRecQ90cjz7ee2TnegG/sJO33Fuv1BMJoaeNS6soEeXMIzc4oqS2+5tg+XsnDL8JgQZ 2aKdcdtsZdvO6lEYracbNvNYirO9oV+3P426r+dcnt1Xw+TVzLuOvRpO8w9n97dBKqTp sMBcsRFVMA8Gwo1+GyIR0e1FA1FUaZCThzs25LQKc/z5kM0rh8nWa6Tq9dfZY4NlY9xf gKbg== X-Gm-Message-State: APjAAAVdMtmGHz50Yr/jIPGPvFisGgK2HAECqvhNxk/MjGy+emk3OqE2 MBl5hQEu3daIu/IX27SCvAgNHQ== X-Google-Smtp-Source: APXvYqyArhAsoFW/09BUx58Mqa57A85qEfp9wqhmY84drnrMDAvAJYGziHESSDaQZke2fKs6Z2jx+w== X-Received: by 2002:a62:6884:: with SMTP id d126mr6446169pfc.109.1575513548166; Wed, 04 Dec 2019 18:39:08 -0800 (PST) Received: from localhost ([2601:602:9200:a1a5:18db:9496:e12f:2012]) by smtp.gmail.com with ESMTPSA id k21sm8765676pgt.22.2019.12.04.18.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 18:39:07 -0800 (PST) From: Kevin Hilman To: Colin King , Maxime Jourdan , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: meson: add missing allocation failure check on new_buf In-Reply-To: <20191204141159.1432387-1-colin.king@canonical.com> References: <20191204141159.1432387-1-colin.king@canonical.com> Date: Wed, 04 Dec 2019 18:39:06 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > > Addresses-Coverity: ("Dereference null return") > Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") > Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Date: Thu, 05 Dec 2019 02:39:06 +0000 Subject: Re: [PATCH] media: meson: add missing allocation failure check on new_buf Message-Id: List-Id: References: <20191204141159.1432387-1-colin.king@canonical.com> In-Reply-To: <20191204141159.1432387-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Colin King , Maxime Jourdan , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > > Addresses-Coverity: ("Dereference null return") > Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") > Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C151CC43603 for ; Thu, 5 Dec 2019 03:01:21 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7336E206DB for ; Thu, 5 Dec 2019 03:01:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="2AEXe14i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7336E206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A8D2523E65; Thu, 5 Dec 2019 03:01:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p230UYjNlQRF; Thu, 5 Dec 2019 03:01:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 588C42379C; Thu, 5 Dec 2019 03:01:17 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 284121BF332 for ; Thu, 5 Dec 2019 03:01:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 222D6886D0 for ; Thu, 5 Dec 2019 03:01:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m1Ayo8Q6sZiI for ; Thu, 5 Dec 2019 03:01:14 +0000 (UTC) X-Greylist: delayed 00:16:09 by SQLgrey-1.7.6 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by hemlock.osuosl.org (Postfix) with ESMTPS id E12468827E for ; Thu, 5 Dec 2019 03:01:14 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id y14so843511pfm.13 for ; Wed, 04 Dec 2019 19:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=2AEXe14iZdFWfADVPMho1nGLswqsSNlAEnAUgFieMyEajydA5UtIA2BcOw3cvQHdZO +7SSE0yQn7fq3n4nHsbvSjKepiS29Gm5WR9rq8NTOvdFdi1YqxhsWZNbYk8a14XIStKF hb74QE/F9ENthSZE3yzn0ZQDkHdLNmssNPXh/EW0qy0yWmB7IFhwbQ7Hy2WVvJXW05oI H1C0sUhnHCdN0aF6ajXMtxjjgQBm0bYucIo02eLqXp6IojHQsBo24gGBGz9ZhVJZDdLp 4LhMKEeYfNiw1x190FxFAVW9rFhpjJNh7tIG1Cx/l25+RJ0xiWa5+IVfaItxv51z2fvq fu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=rK3eJUhlHh3d64QynRDb7JV/0M+scndxWBTMxcYzfrvYuXTdc857Ld8cRt7d0kUlR4 oq29qjUhSbNbfK6eoH/74zdvPR16iWtY1Kdu/oamgIx8oNg60x45AWeLoheUkZeLUjfY gU3l5OS30A109fJCgvPSIusiTFK5O0OXJLPEncRpmuoOVdtveBdaFLuTXQ59aut6jb8g eCGXeFLR5h89fpidiYUUfwNVtUo4CZbUBAOfdtw8AoH7nBMXgcckyjVXjUDaWFTHO+Tk lU4wgjgeUiEW1F3bKkuvHCujGOVkJp3picAkBP3Md1k/zRCusQjt+dhMzYtvt6Bb3boO bYUQ== X-Gm-Message-State: APjAAAU2E8M6JnuCEqGIz5XPgyWnL8jJCzW3eDMes3EjokZNZUd3BTIB 3RwZLInPZhpAH3222ka8xNkogcnUOVs4MQ== X-Google-Smtp-Source: APXvYqyArhAsoFW/09BUx58Mqa57A85qEfp9wqhmY84drnrMDAvAJYGziHESSDaQZke2fKs6Z2jx+w== X-Received: by 2002:a62:6884:: with SMTP id d126mr6446169pfc.109.1575513548166; Wed, 04 Dec 2019 18:39:08 -0800 (PST) Received: from localhost ([2601:602:9200:a1a5:18db:9496:e12f:2012]) by smtp.gmail.com with ESMTPSA id k21sm8765676pgt.22.2019.12.04.18.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 18:39:07 -0800 (PST) From: Kevin Hilman To: Colin King , Maxime Jourdan , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] media: meson: add missing allocation failure check on new_buf In-Reply-To: <20191204141159.1432387-1-colin.king@canonical.com> References: <20191204141159.1432387-1-colin.king@canonical.com> Date: Wed, 04 Dec 2019 18:39:06 -0800 Message-ID: MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > > Addresses-Coverity: ("Dereference null return") > Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") > Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17F3DC43603 for ; Thu, 5 Dec 2019 02:39:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC767214B2 for ; Thu, 5 Dec 2019 02:39:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bq8lF8uB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="2AEXe14i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC767214B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vCIdkLjXx8lwcztPW2xl1Nlb99AvUb8zp09lI4YvOLQ=; b=bq8lF8uBwWj7EX Hp/vxb9KX0dMgHtooO7fxPwrLK3Mf/NrWX31++M0bqgQbU5B+3J1nkuUh5Hn47lRFc1lQEohHy2iK zH2RLZg+n26s/oMPNZiuEUZf9eYwEfAh2ZR99xBIVSrOuneG9NPQ8zp+qnFmSMGJG/Sc2+95d+azc A/IuUell27TcEMH4POwf4Mn2FcWCA/XCUGqhCAu5lbBFt03hcXUjpTjgArzBpvkMF2YHrjei2E67f t7afLf2c7hOROmftRviAKqmaEsrn6/VBbixL5/Yty6Kdd56B0gOJU9G6BtCRm5q2dgWeKeOhO4H6U TLRf3OrVnTE6xXG9M5rA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ich2v-00008C-1t; Thu, 05 Dec 2019 02:39:13 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ich2r-00006f-1e for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2019 02:39:10 +0000 Received: by mail-pf1-x444.google.com with SMTP id 2so835371pfx.6 for ; Wed, 04 Dec 2019 18:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=2AEXe14iZdFWfADVPMho1nGLswqsSNlAEnAUgFieMyEajydA5UtIA2BcOw3cvQHdZO +7SSE0yQn7fq3n4nHsbvSjKepiS29Gm5WR9rq8NTOvdFdi1YqxhsWZNbYk8a14XIStKF hb74QE/F9ENthSZE3yzn0ZQDkHdLNmssNPXh/EW0qy0yWmB7IFhwbQ7Hy2WVvJXW05oI H1C0sUhnHCdN0aF6ajXMtxjjgQBm0bYucIo02eLqXp6IojHQsBo24gGBGz9ZhVJZDdLp 4LhMKEeYfNiw1x190FxFAVW9rFhpjJNh7tIG1Cx/l25+RJ0xiWa5+IVfaItxv51z2fvq fu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=tpnTTLZmSjztAh5k/Nox62rb89IOyBY+PvsFJ7daJIdKf44InTtFqyvxNIR0AZuQIa /WRfjUo8nOdeQeq6t98C8XcXezvsuAAtY5znNgQbq/6AUF4H62qVhYMSkGsQ/jsxukJe Rfjj03vxulWQ4opW81Cl2DpRqQ9x6070JoQI9VIOh6G4xetQUz3NbSL9+HGWhk+U5ac9 yPfdsWLzOasyoE5v2ktJ8RV5LUB68r0amZi9JQsmjHAbK4Pc1TA+DghTLL8A3AkuKToa LLz5S8tk26EF5muwLPZbPeycdmL+w3vx6GFjy6Xt+ZbMV0rSciImaJC5fmH/y+56S8Pm CNng== X-Gm-Message-State: APjAAAVfoHXcKm2SiFWTS5Iy5Ynv+0UJ1fQ3oI2ESnn2+qctkqGs6fca NQXEva3fpaT8YgOc/TZD0Sao1A== X-Google-Smtp-Source: APXvYqyArhAsoFW/09BUx58Mqa57A85qEfp9wqhmY84drnrMDAvAJYGziHESSDaQZke2fKs6Z2jx+w== X-Received: by 2002:a62:6884:: with SMTP id d126mr6446169pfc.109.1575513548166; Wed, 04 Dec 2019 18:39:08 -0800 (PST) Received: from localhost ([2601:602:9200:a1a5:18db:9496:e12f:2012]) by smtp.gmail.com with ESMTPSA id k21sm8765676pgt.22.2019.12.04.18.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 18:39:07 -0800 (PST) From: Kevin Hilman To: Colin King , Maxime Jourdan , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] media: meson: add missing allocation failure check on new_buf In-Reply-To: <20191204141159.1432387-1-colin.king@canonical.com> References: <20191204141159.1432387-1-colin.king@canonical.com> Date: Wed, 04 Dec 2019 18:39:06 -0800 Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_183909_220521_FB446374 X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > > Addresses-Coverity: ("Dereference null return") > Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") > Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDDF1C43603 for ; Thu, 5 Dec 2019 02:39:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A69F4214B2 for ; Thu, 5 Dec 2019 02:39:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DuW4vT0I"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="2AEXe14i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A69F4214B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t8m1OaxuKChh4agZ53PvApIm3FXGNpKhLrFcYCQIYgw=; b=DuW4vT0IJGN+G/ 08gE+/K7ucgTfafDoKryns02XOzeQ+y9wgyAbis8piyUGdCDwQpKqaSJ2ymSkRmq3Ku7WLsF1O90v MQnQKj3U5GJZQ4agaMHpW7OytXHeukewT4AiFoxTBZ7K3yxxipiWMzfJdLWf/dakveecg508cuORL bsSefEoSw//1L9UyJ9Vhpgb/VeAtRV9rRh0xpmT2StERdQZbKojfrX0RmyLjspiDUrAagxxrdqBNP eWKujD+yBnjzZF8OLcQq2XKTZrptyxoPRrVgYMTm78QBbrg3p7EbYnPdlI95JAhfiFH2uKb32BQOp Yowr0EG9OXLuay72smxA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ich2t-00007c-JJ; Thu, 05 Dec 2019 02:39:11 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ich2r-00006e-1L for linux-amlogic@lists.infradead.org; Thu, 05 Dec 2019 02:39:10 +0000 Received: by mail-pg1-x544.google.com with SMTP id r11so853165pgf.1 for ; Wed, 04 Dec 2019 18:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=2AEXe14iZdFWfADVPMho1nGLswqsSNlAEnAUgFieMyEajydA5UtIA2BcOw3cvQHdZO +7SSE0yQn7fq3n4nHsbvSjKepiS29Gm5WR9rq8NTOvdFdi1YqxhsWZNbYk8a14XIStKF hb74QE/F9ENthSZE3yzn0ZQDkHdLNmssNPXh/EW0qy0yWmB7IFhwbQ7Hy2WVvJXW05oI H1C0sUhnHCdN0aF6ajXMtxjjgQBm0bYucIo02eLqXp6IojHQsBo24gGBGz9ZhVJZDdLp 4LhMKEeYfNiw1x190FxFAVW9rFhpjJNh7tIG1Cx/l25+RJ0xiWa5+IVfaItxv51z2fvq fu0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=rUc6ADYdoJ6qwTx/PVN56AlbGHEGI3wX1r10EHlhhWLsvpbnYpl2pC9UmNePkfOP3c I4kPufieNbFQLngxEXIViqQO2E63ZrnckRk5oL6Si3naia9KXu5/2l9nwwOpMmj6igN0 jFtPHfRGr673O1XJSGnILy14A4QitkJThLulz4+0Eh51imkFSa8LyhFeKC9/th4koAcO zADH71DQ9B1jOtjHwZOPIPy+qQIFk/2ZrmyUX7B5ZXVZAX2C/oYILvkaf9DV9XVsKhYX XCj3k94vAGacDtU4jPcWof1vEmtDDAxtdklAJCcTR7eQ/i/o7Oeso6sb/Dy0AI7XGObg oqrg== X-Gm-Message-State: APjAAAVd0aKKRszVuztUtJvmWjKJIulp+yykjoqPWoE+U/IOhN3/8kxS ZZRViZd3Lhj576/lfIvklkXnfg== X-Google-Smtp-Source: APXvYqyArhAsoFW/09BUx58Mqa57A85qEfp9wqhmY84drnrMDAvAJYGziHESSDaQZke2fKs6Z2jx+w== X-Received: by 2002:a62:6884:: with SMTP id d126mr6446169pfc.109.1575513548166; Wed, 04 Dec 2019 18:39:08 -0800 (PST) Received: from localhost ([2601:602:9200:a1a5:18db:9496:e12f:2012]) by smtp.gmail.com with ESMTPSA id k21sm8765676pgt.22.2019.12.04.18.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 18:39:07 -0800 (PST) From: Kevin Hilman To: Colin King , Maxime Jourdan , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] media: meson: add missing allocation failure check on new_buf In-Reply-To: <20191204141159.1432387-1-colin.king@canonical.com> References: <20191204141159.1432387-1-colin.king@canonical.com> Date: Wed, 04 Dec 2019 18:39:06 -0800 Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_183909_224033_93603CC2 X-CRM114-Status: UNSURE ( 7.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Colin King writes: > From: Colin Ian King > > Currently if the allocation of new_buf fails then a null pointer > dereference occurs when assiging new_buf->vb. Avoid this by returning > early on a memory allocation failure as there is not much more can > be done at this point. > > Addresses-Coverity: ("Dereference null return") > Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") > Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic