Message ID | 1497284875-19999-16-git-send-email-stanimir.varbanov@linaro.org |
---|---|
State | Accepted |
Commit | 17571ed6e238ef1353595a87b40414d12b0e0275 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp77282obh; Mon, 12 Jun 2017 09:31:00 -0700 (PDT) X-Received: by 10.84.215.23 with SMTP id k23mr58233219pli.104.1497285060841; Mon, 12 Jun 2017 09:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497285060; cv=none; d=google.com; s=arc-20160816; b=FtVLhWA5uBedIIzEhaIp7gXkwr3snA9dMEBC5JIwjywohxPPFjjlw7PiYZS0Vs69tb w+tS1t0cYC33BeHC2BFEFzhYmi/av6TKK/uZdvzYuROr3a07JaIjUsSERwkKyxGpLyWH kpuwZpi2wXYvFIk7YhBQvis5YzEwwbd12MF3TxKkWo16N9LIRKM+deWXqlSRS0qXZagI gV9K+XsnP6IaQWGb/ieQAldizrH4KTUth4lAobxwlWzufadGKD9WFEA5/fvbm+BmmYpS 5Snb3JUP43rVOJasx1eC/p0PoOR8aWFPof/uKtSxh3Bkjh+30O6P8/fZnR3vtmUjTmKy oPGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LddNM0B7BF2Q1NR9owPFwmfghKr/CobKCgYvCgn0VcA=; b=DNjPgw179d9t+einhrNCT4iJmWvPaVTG9dwxHRHn/qs9MLos+YXMhS195aaIZ5yOpb 6yN8dVgVrGYSQHVfUc9Ia7B7pVVBkkpsGpNYKn+BPwrwzDGpjgIvuQ8WdrBCE07yiFcF 66KY/Uly4+lz4IFt2+aSRx8EQf570lb5sI7skDC1RDKdeu9vGEYuhmrYK3LaaowrY+Ok JRxgdZXJodb1gXIOw/+v6dWbGNC9a0R1pu06mScuu9hxnYWpAU4AFLAWPtW3c13yHxqs b9nLQrSdkWgMOPp46yuWetInPe7gZjMy8xO+Gwta7m3yn7iwFH9aQvtCxHAFe/dAepWx r92g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 142si13486384pgg.72.2017.06.12.09.31.00; Mon, 12 Jun 2017 09:31:00 -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; dkim=pass header.i=@linaro.org; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754829AbdFLQa4 (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Mon, 12 Jun 2017 12:30:56 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33965 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754915AbdFLQaJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Jun 2017 12:30:09 -0400 Received: by mail-wr0-f172.google.com with SMTP id g76so101845637wrd.1 for <linux-kernel@vger.kernel.org>; Mon, 12 Jun 2017 09:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LddNM0B7BF2Q1NR9owPFwmfghKr/CobKCgYvCgn0VcA=; b=bAAlCTgsIBpJQGPhPlOjby8HlVU+w5KWMZ/W+3y1okBH1bIeP2uhy/ddbZXAOCzUtH 0xM9IY2IS0TEq+GKjU3OM2d9c9gGOWI+RRViv5EUMBxTeCNlpoII/MiJqgGFkcmROOZc Mhew3ubpm7CivP8ioukBalKPFMpBoa/rPAJNQ= 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; bh=LddNM0B7BF2Q1NR9owPFwmfghKr/CobKCgYvCgn0VcA=; b=SxMjUICYSN5vpR+1B86I1xiMzwyTa22cyYhkvxyJbxIARBOo5BjEWr5DvwHyVjp24O Y0CngEzJX8W76ev2x+VxrA9aTD7yOLQcd3KTF5dbTu4He4W8DKO2MuG5PsoQ2Ldb4jY7 c2RpXAP9GJPpfa9z6JuYqgsv2Hk51QtpszCZJHQ0OGQDcXgjBFkDpsuT754WyHPu7IVi KHUDeqpU5Gz3LVnE4mJtadnFzLa51QKo8hEMv9rZ3oTLMM0AQIVWP3AV8zCDzRgY71oy O6a7YaSaYFHR5YF1Uc1v1j/BLzTy+nBK2KRy809lUaGVajhRwUdoj0YT3H2b8bHkS3ay laFg== X-Gm-Message-State: AKS2vOwsQjOp1OUm5pFALFGFLMQBLGRIKrx3kGjkMACd4fKvxAPWBqfp 6QAeAEgW0kbTcFIF X-Received: by 10.223.163.93 with SMTP id d29mr8358139wrb.95.1497284996839; Mon, 12 Jun 2017 09:29:56 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 49sm14493531wrz.8.2017.06.12.09.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jun 2017 09:29:56 -0700 (PDT) From: Stanimir Varbanov <stanimir.varbanov@linaro.org> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil@xs4all.nl> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov <stanimir.varbanov@linaro.org> Subject: [PATCH v10 15/18] media: venus: vdec: fix compile error in vdec_close Date: Mon, 12 Jun 2017 19:27:52 +0300 Message-Id: <1497284875-19999-16-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497284875-19999-1-git-send-email-stanimir.varbanov@linaro.org> References: <1497284875-19999-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 96e7e7e71e5f..594315b55b1f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1017,9 +1017,10 @@ static int vdec_close(struct file *file) mutex_destroy(&inst->lock); v4l2_fh_del(&inst->fh); v4l2_fh_exit(&inst->fh); - kfree(inst); pm_runtime_put_sync(inst->core->dev_dec); + + kfree(inst); return 0; }
This fixes the following compile error ocured when building with gcc7: drivers/media/platform/qcom/venus/vdec.c:1022 vdec_close() error: dereferencing freed memory 'inst' by moving kfree as a last call. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- drivers/media/platform/qcom/venus/vdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4