Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3858353imu; Mon, 7 Jan 2019 10:45:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6KftoLHWX/hq6hgRNGlZsGFDtWys3f2zaF+N6oNLRpWPzDcCWRIg9KNWWPBnPdOFvbmay3 X-Received: by 2002:a62:6ac8:: with SMTP id f191mr58166163pfc.13.1546886719320; Mon, 07 Jan 2019 10:45:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546886719; cv=none; d=google.com; s=arc-20160816; b=LC8F3Wa9rrZHUaQgJj1QhRKp5sbsHTZ3Z2prsREsNGmUGsjU4mHVb4oHiKCkycXPjw 8BG3UTafFV+SbEKcLdD3jMovXo9gVrS64EmRyJle570AyLbtlX66rNuAmyBQzLA/mKcN FGYjJeKS4MHGI+Fc3dafUb7S1besITiWcDAYvbdGBIK8SqiiBIU4P6HuFEc5EDeUn/BA /JrTVs1gcrFCpoD3m2zrlU8PMePCmFpehr5uTj8MqyZWqzEMwws4jbIYBgku8KKTCft4 f9ByfrYCRrHRsf47ocFCLW+trMLhI+JM+VEUOFsYBmrL/4guSL/a7V7fOpyDDa2EKY6r 8QgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+e20adiiIsVJrqIRnMvs0eZOMkWeFWPPsAvwerXo8kA=; b=hNgD8Mz4xhBHFUjMsfJ3jGz+l3EHxoL376XemC1HvcverwFXePSoxegnkGWaoXBjuG Ztbav1C4dGVl091hy3kL6jXjvL7OpvypZWXp+xQgt0nZBkQCHDJcsc8G0GSyYeMk5Atg ahOSdjhYg2GD1qOGiAXisdukd5MoD4N2MYPk2yJdDIKq0oBDMSXTnPmjVdi+K0jdmAtL DcLUkf6i51jeLsxsqSNAfuP9Be0QSaF6/vJZN5WioKgyOyevSaTJAYwnBXAeaSPiB9+l 9KQYo/+JNQ58f2ZbD9MWqWDHewHrPdK1sA6Li9mAKKR7dTNsgov67MzLg7DGnZG8lU0N g5jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZP0x3eOe; 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 u186si24621435pgd.131.2019.01.07.10.45.04; Mon, 07 Jan 2019 10:45:19 -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=@kernel.org header.s=default header.b=ZP0x3eOe; 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 S1731132AbfAGNEo (ORCPT + 99 others); Mon, 7 Jan 2019 08:04:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:52324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731254AbfAGNEk (ORCPT ); Mon, 7 Jan 2019 08:04:40 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 864562089F; Mon, 7 Jan 2019 13:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866280; bh=RQNPaTqBQeT0iDHGFwVEO9pAs+gkUR6NjSjJltxAuHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZP0x3eOe2v5FACNh9klsplrntojz/m2PFR5s4FxsdhtC5K1otH3PjX/ZB4N8YZkkk Kt4a6ko8rndmQGEWBYqFy9qKrgZEvU5Azg/LKvm/qjyxPmjMRaX6H6wYf8VwthIYmx Fvp0zarHRKqhRznL5KfljoXpl3oPI2Y40lWoozx8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans Verkuil , syzbot+0cc8e3cc63ca373722c6@syzkaller.appspotmail.com, Mauro Carvalho Chehab Subject: [PATCH 4.14 087/101] media: vivid: free bitmap_cap when updating std/timings/etc. Date: Mon, 7 Jan 2019 13:33:15 +0100 Message-Id: <20190107105337.661088101@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans Verkuil commit 560ccb75c2caa6b1039dec1a53cd2ef526f5bf03 upstream. When vivid_update_format_cap() is called it should free any overlay bitmap since the compose size will change. Signed-off-by: Hans Verkuil Reported-by: syzbot+0cc8e3cc63ca373722c6@syzkaller.appspotmail.com Cc: # for v3.18 and up Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vivid/vivid-vid-cap.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/media/platform/vivid/vivid-vid-cap.c +++ b/drivers/media/platform/vivid/vivid-vid-cap.c @@ -455,6 +455,8 @@ void vivid_update_format_cap(struct vivi tpg_s_rgb_range(&dev->tpg, v4l2_ctrl_g_ctrl(dev->rgb_range_cap)); break; } + vfree(dev->bitmap_cap); + dev->bitmap_cap = NULL; vivid_update_quality(dev); tpg_reset_source(&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap); dev->crop_cap = dev->src_rect;