From patchwork Thu Oct 10 13:13:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 11183543 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33A8F76 for ; Thu, 10 Oct 2019 13:14:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 1B58521920 for ; Thu, 10 Oct 2019 13:14:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B58521920 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 594A56EB34; Thu, 10 Oct 2019 13:14:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 53C226EB31; Thu, 10 Oct 2019 13:14:38 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id w6so4365284lfl.2; Thu, 10 Oct 2019 06:14:38 -0700 (PDT) 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YiNIRjj0pudykJaz7uCOQvjxph1wvoZUlYbTUR43Ji8=; b=bb52yX8YwGl9jj2OkVPsUY4Fg2BcI79cF0Zj91vWReJs8Sqhs4FYhgieS+JFRgRJ21 uvUkh58v8T4sBAbc126VlZS3AcDiiiV2i1TlbwlmSjykCz7Bp0Lx8ysUnDB4M1xy21EG GVoYoTJ0Os2bAFO81xwEagWUbWyAPOBhqj0l0QgBHzPEImc6ts4Jjnw+bWFSuoZ/x2B+ yBarfLDYwTyH6L0/u0jjwFwyictj9vmC8XlGrLNCf5/P0dhYIb6+bGGwU3LmwujXXgaQ krcH6IgD4vDWKkwsugE9uKuT+Ly0tGe+b5W0Lm0dOQDZIuS7wxCaZ3curuosF7V+MqTa 224A== X-Gm-Message-State: APjAAAUj3D4MytFrn4wALDbsQVaztmWVtXbH21zkauyfy0Dxy8SvSVQR 7PM6gRoTT14fGppSd/6JxBM= X-Google-Smtp-Source: APXvYqyCmQVkR/2FdzzVJEX6PjL3GNGbTAsSSuxU3ZMwE47t/9gz7cSpM9BywTnZ/2vtXS5zoQXYCg== X-Received: by 2002:a19:c392:: with SMTP id t140mr6140469lff.156.1570713276646; Thu, 10 Oct 2019 06:14:36 -0700 (PDT) Received: from xi.terra (c-51f1e055.07-184-6d6c6d4.bbcust.telenor.se. [85.224.241.81]) by smtp.gmail.com with ESMTPSA id f22sm1255270lfk.56.2019.10.10.06.14.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2019 06:14:34 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.92.2) (envelope-from ) id 1iIYHF-0006Au-Ju; Thu, 10 Oct 2019 15:14:45 +0200 From: Johan Hovold To: Rob Clark , Sean Paul , Fabien Dessenne , Mauro Carvalho Chehab , Harald Freudenberger Subject: [PATCH 3/4] media: radio: wl1273: fix interrupt masking on release Date: Thu, 10 Oct 2019 15:13:32 +0200 Message-Id: <20191010131333.23635-4-johan@kernel.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010131333.23635-1-johan@kernel.org> References: <20191010131333.23635-1-johan@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, Mauro Carvalho Chehab , Vasily Gorbik , David Airlie , linux-arm-msm@vger.kernel.org, Heiko Carstens , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Johan Hovold , Christian Borntraeger , Matti Aaltonen , stable , Greg Kroah-Hartman , freedreno@lists.freedesktop.org, linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" If a process is interrupted while accessing the radio device and the core lock is contended, release() could return early and fail to update the interrupt mask. Note that the return value of the v4l2 release file operation is ignored. Fixes: 87d1a50ce451 ("[media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver") Cc: stable # 2.6.38 Cc: Matti Aaltonen Cc: Mauro Carvalho Chehab Signed-off-by: Johan Hovold --- drivers/media/radio/radio-wl1273.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 104ac41c6f96..112376873167 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c @@ -1148,8 +1148,7 @@ static int wl1273_fm_fops_release(struct file *file) if (radio->rds_users > 0) { radio->rds_users--; if (radio->rds_users == 0) { - if (mutex_lock_interruptible(&core->lock)) - return -EINTR; + mutex_lock(&core->lock); radio->irq_flags &= ~WL1273_RDS_EVENT;