Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2351636ybp; Thu, 10 Oct 2019 06:15:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB7/DFH8Rl/o18f0V7OEP2MbYgIqvn+kFmBqU25l1w3daYNbhg9sJuxtj4/f2I6WF7fYlK X-Received: by 2002:a17:906:b74f:: with SMTP id fx15mr8004812ejb.69.1570713322482; Thu, 10 Oct 2019 06:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570713322; cv=none; d=google.com; s=arc-20160816; b=uCRBpjQC5I64JucVXtjLmfc97KTBPrKqzTp3Hl13NOa0xeL3q6960WiV0rMoqaicDr y5iFqftfelTWKuFbX/D2k0PodsGX1HLKhBJ3R22I3Jn/TSINuOMSieU5m2jguM0dQ67V r9NQylzkauA/bbs7+SewcAnkVmduAMy0LIYHiFEwpGV5CJKkLX7RRv0x3M6R6Gv41C8e fO0TZC3wyk3LqsYKZAIoKlVqK6u5S13MNXJCsdlKwmWDwfgPT9/MKTkRHnLaxYA13nYK WcLRL0EkGt0glcqeRNQbZxm5kEHqc2qbHBvRESg6TIIKv15RYoImsshLKylw0v5hCAVc zbOw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YiNIRjj0pudykJaz7uCOQvjxph1wvoZUlYbTUR43Ji8=; b=UQIOutETdmsZcAZeGi6z04e2QWWxsffHdgnBAzhdaw8kBLmeUPD5Dl53nC309nZ0CM +hP8NIfbC9CvJ/yUELJJEys4G+zTcSBC/fPQYESxjHR/79jT/d9EV373wbPYIxUJ55/a NVJUORwrNtkfOSQ/KSo8eKdKe0RA8fuQ3A9fVB19lJrWrbFYwdT3e7uBoIoZw4hqFGOv kMjbc6i3XNDPXNle77t77eq2JrmITVbvcg+vqTNfZ+hmru5/QXTkOOdSokef38+qF4Qb SnpE4nROBhKoyVH/Di6DDCa7x0ux/6Xt36wujhfT2EXadB4YUJJe/Ol+3qXnM2bVySre CeQA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch13si3064262ejb.203.2019.10.10.06.14.58; Thu, 10 Oct 2019 06:15:22 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388148AbfJJNOk (ORCPT + 99 others); Thu, 10 Oct 2019 09:14:40 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:40974 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387711AbfJJNOj (ORCPT ); Thu, 10 Oct 2019 09:14:39 -0400 Received: by mail-lf1-f66.google.com with SMTP id r2so4343859lfn.8; Thu, 10 Oct 2019 06:14:37 -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=MyIKDDiCOcI/soRQUQl/XqxL9YioxJR3LTsTQfjHbMI9BWyDvWYTU7snZGBHOWIJzn zSD/89oLA3dZtfQapStsoSA2Lexc2nIp/h0iAi17IJZ+85E21cu86nlDw27DHThw0q9x eqL4Q25qJqzxbAEYrTPVaWz9BdPcsCgRPjNhTCLA9xLLKD1sZIQlxAfufmfa81uW7zB9 0vyW+/CtubHJCfehkPVNve454QAFg8T+gPbMFybJDa8dC5xWa+7AgFxk8rzbEMpYLgaX TPLtziwZ94J0FjzK+g9GEcJs9jw7FgR63wMFuMZaJvMorvE0gpqGHuYAngddZMnD0OtY HlfA== X-Gm-Message-State: APjAAAUxkQOCTBbH7yFyd+B25yMc8JdcTrdPPUARnetQJ9XJQ+6S2sTa 1FHa1n4gkybv+lSgx9zAwFI= 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 Cc: David Airlie , Daniel Vetter , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-s390@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold , stable , Matti Aaltonen , Mauro Carvalho Chehab 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.23.0