From patchwork Fri Oct 5 15:44:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Mandychev X-Patchwork-Id: 1554311 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 481723FE80 for ; Fri, 5 Oct 2012 15:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750917Ab2JEPqr (ORCPT ); Fri, 5 Oct 2012 11:46:47 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:43494 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710Ab2JEPqr (ORCPT ); Fri, 5 Oct 2012 11:46:47 -0400 Received: by mail-wi0-f178.google.com with SMTP id hr7so874053wib.1 for ; Fri, 05 Oct 2012 08:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=TkbknZeg/mVjEjJNQVOc20ca/IpEiUKmX4fD0vtYx08=; b=s0cEwh+b80pRrdSGEUJV+MLWR1EShUlryg1s9lQRzJdK+1ciu4hLc3NS1QPA9lxzWP TX9Tivyqh3XKovRsYYcHHs31cm0Rwjrl3fbKfAuMGhecfDUd43uNfiDMLXu2Hf7vQzAH oadp4Ak8DqdyiwzhBXLgdg1Bhxq9jEMaPLumox9VT3KCPmdsih74ELavudIXMHvq4gs6 cBJVd70izOQh3N2Y5/X/cXjt90dS+7KDxfyHm/3At1ttdc4fo9+W2jEa3jfRa1Lg4WXO 5N0S8DPblJ+9O4+2a6fu/gvIHcHbnHm8jtpDYh4fFYX2qOYPm1S+cQMyrVRvaBUM3A5g ycRg== Received: by 10.180.106.9 with SMTP id gq9mr4207365wib.12.1349452005785; Fri, 05 Oct 2012 08:46:45 -0700 (PDT) Received: from mandrew-HP.Parrot.Biz ([46.218.109.82]) by mx.google.com with ESMTPS id cl8sm2966241wib.10.2012.10.05.08.46.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 08:46:44 -0700 (PDT) From: Andrei Mandychev To: hvaibhav@ti.com Cc: archit@ti.com, tomi.valkeinen@ti.com, sumit.semwal@ti.com, linux-media@vger.kernel.org, Andrei Mandychev Subject: [PATCH] Fixed list_del corruption in videobuf-core.c : videobuf_queue_cancel() Date: Fri, 5 Oct 2012 17:44:25 +0200 Message-Id: <1349451865-26678-1-git-send-email-andrei.mandychev@parrot.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If there is a buffer with VIDEOBUF_QUEUED state it won't be deleted properly because the head of queue loses its elements by calling INIT_LIST_HEAD() before videobuf_streamoff(). --- drivers/media/video/omap/omap_vout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 409da0f..f02eb8e 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -1738,8 +1738,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode in" " streamoff\n"); - INIT_LIST_HEAD(&vout->dma_queue); ret = videobuf_streamoff(&vout->vbq); + INIT_LIST_HEAD(&vout->dma_queue); return ret; }