From patchwork Thu Aug 22 23:27:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2848455 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1390BF547 for ; Thu, 22 Aug 2013 23:26:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2B69204CD for ; Thu, 22 Aug 2013 23:26:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C958204B0 for ; Thu, 22 Aug 2013 23:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616Ab3HVX0c (ORCPT ); Thu, 22 Aug 2013 19:26:32 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:36036 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754615Ab3HVX0a (ORCPT ); Thu, 22 Aug 2013 19:26:30 -0400 Received: from avalon.ideasonboard.com (unknown [91.178.239.253]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0350E35A6F; Fri, 23 Aug 2013 01:26:07 +0200 (CEST) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] v4l: vsp1: Fix mutex double lock at streamon time Date: Fri, 23 Aug 2013 01:27:41 +0200 Message-Id: <1377214061-16484-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A mutex_lock() was left when the driver was converted to use the vb2 ioctl helpers, resulting in a deadlock at streamon time. Fix it. Signed-off-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_video.c | 2 -- 1 file changed, 2 deletions(-) Yet another v3.12 fix for the VSP1 driver. I'm not sure how I've managed to let this bug slip in. This should hopefully be the last one, sorry for the noise :-/ diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c index f51f842..714c53e 100644 --- a/drivers/media/platform/vsp1/vsp1_video.c +++ b/drivers/media/platform/vsp1/vsp1_video.c @@ -839,8 +839,6 @@ vsp1_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) struct vsp1_pipeline *pipe; int ret; - mutex_lock(&video->lock); - if (video->queue.owner && video->queue.owner != file->private_data) return -EBUSY;