Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1168850ybl; Wed, 4 Dec 2019 18:39:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxXC/Qr3X1uJ/fgwo0zDeZvN8h755gPZXQbObxlMbQmABYDkbl9Ln2kcd5OZCFudwOYgCn7 X-Received: by 2002:a05:6830:4d9:: with SMTP id s25mr5128319otd.171.1575513588464; Wed, 04 Dec 2019 18:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575513588; cv=none; d=google.com; s=arc-20160816; b=f3zhd/oB381oIDXyqKb30BG4H1wlsv0er6ku502D8GLKLbObI06F0/MolFrmYB0lCt qgISlbyOqBn1nzjfpa4P/S2KhOfLkoyb6jzkp/ndzb2VVBMokhDWg/cShzPV6511lzhu ZP2w6reDqzoRjRDjAnXEohtqiXXIL568MfCbNkQ3AHpgcITqueJSe4iJAXGLccJ6ROGX JUWY5gmV2BNfkyqVhl6byiaKyZfEpxeeR+VEnT+1mCehteBkvyJyWKQ9ZYkrAuv83d2b RBjn0lQXdK5XkQSOD7QjUfjDzRvJID7ZV+n7fhvyafvc11euD0fXzBD77EzFzJpHgaKV 0SPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=27jaH0vN7Z1055mM7vLy7qQTaIl7MlRb9ifdmBrbZDM=; b=xOfnX3RXceTzXNpQTZDx/GGtLrEGOL630WasBKozTonlDm+Y9hLbjE1QAs2/gztS00 Lrbw5R8aLinQdCG5exsNWhbYAFQ3KIeAzgxbBG+Gx0/ulQx7U7x1dnk8h0TW8UPqpnoA StdolM0ZY5PdHT2IWXOCSmoz/6xjMsl2mVjsoRYMozs1PbTjhKVMiQRUx/WCOUjYry1X XDAan79GFFYnX0ch/5tnJjmpX5NSNGcM+1n7VQgg4oMqeUZkak430o5XuOq7F8quQXxr a1kV7BxuSbLnjxzPVnn4LR1QgrLnzCFvYS0WLh1t5jKXECfPz4vDBC+wyAEufpmzwuiz UVkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=2AEXe14i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si4250025oia.239.2019.12.04.18.39.36; Wed, 04 Dec 2019 18:39:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=2AEXe14i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728711AbfLECjJ (ORCPT + 99 others); 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-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