From patchwork Mon Jan 7 12:04:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 154880 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3401571ljp; Mon, 7 Jan 2019 04:04:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN6hMBZRf70sXSfSspLYvzG1UTyFVW9iB50jnRBylrlboUel7ic6Tp0Sw0xzC2tZrKDH6vUc X-Received: by 2002:a63:314d:: with SMTP id x74mr10606887pgx.10.1546862666018; Mon, 07 Jan 2019 04:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546862666; cv=none; d=google.com; s=arc-20160816; b=OXMCdsMjZDytVWwKDVJ8hr0vITjQoqvfiI3joxNvRG24GCvfT/7hOD+sGqyuA26lgG 6fuQSu+IOBPOUFJt2TsraRQGJTqPXGmcNuSg51VQF6adLd3sydhgSUUz2zmgv5BDKhmy frypFTE3IsoDwRfBw8+7e2EA3IC8wUnK+/mo/+caIpJMfHNt7yAlwQW2Ket7QalomTWt XyQwR6rk00qX7agPHztHyRXdcEFcnGc+udy6M1s/PLdLU21wckLFg5xRcx1E3Lf4B3eJ mjPQi7YA8xNGcCEDFtWX7yrNtH3PRhZJT5KNNxkT7FB8kt/4dy7ZfjhZape4/Lv/8Pm6 i9sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:content-transfer-encoding:mime-version :dkim-signature:dkim-filter; bh=iI8RbsnQt6T6oUGkyuhicTX6KV6s3Z9+0rdfzteeVVI=; b=LNYlzKQOa8pH+aFNOVSvZ7VSjhMtbgf5FIqajTKe2VXH+IWTv1RWaJMxSQv3piRHzA 2bbHjAcW9Gi7ArLgvScVWV+EmB7Iwu0JhpAixBA9Dm/f5iHjmOHGwHvfTTUgRw61qmGD jOLXVyQyUM7HK9sWJtDVhDWqzeQBNVWi8fcipAPEMOg0G3c18EUaT4bZUzY7gFeACyKq i6WpbSTQrgUpwxIRKQ/bKR6oUrhuDggBx9WlWUm07S1IcvWlFjX2UxS+sJezdgkcP1GQ KEN/L6MIjZVRE6DFi0qLgOHYMNgWgbbsmv59OzCoWShLMBR4gs0CNUP0Jo0W7K3b6s46 dtTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZmCEu6H7; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si3827469plo.12.2019.01.07.04.04.25; Mon, 07 Jan 2019 04:04:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=ZmCEu6H7; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbfAGMEY (ORCPT + 3 others); Mon, 7 Jan 2019 07:04:24 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:35699 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbfAGMEY (ORCPT ); Mon, 7 Jan 2019 07:04:24 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190107120422euoutp01cd767d93bdce3845320e44a6546def88~3j2VbqfVv2312323123euoutp01t; Mon, 7 Jan 2019 12:04:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190107120422euoutp01cd767d93bdce3845320e44a6546def88~3j2VbqfVv2312323123euoutp01t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1546862662; bh=iI8RbsnQt6T6oUGkyuhicTX6KV6s3Z9+0rdfzteeVVI=; h=From:To:Cc:Subject:Date:References:From; b=ZmCEu6H7Waf+NmqKarGTzzIgPbu8y/1cDORIVUTauymapCKSGPIJboS4SAhFVNyJc 2/jcg7SJDScsVz4MaYeqQwDlwaKI7fYs7TdDcCMIVJKxOwYlqQBjKpzIQzrzP4Qfbr PIGdM9IVqTix3MYTxNSLQVH2wFzVfg+rYkXT0DTk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190107120421eucas1p230ab82d5c7b954ee422517842603a98e~3j2Ut6-PL3085630856eucas1p2k; Mon, 7 Jan 2019 12:04:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id EC.47.04806.540433C5; Mon, 7 Jan 2019 12:04:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190107120420eucas1p179b227d5ff0e040540ed9f48573e6e73~3j2T6HfzB1288112881eucas1p1b; Mon, 7 Jan 2019 12:04:20 +0000 (GMT) X-AuditID: cbfec7f5-79db79c0000012c6-1f-5c334045f3e4 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 53.F8.04284.440433C5; Mon, 7 Jan 2019 12:04:20 +0000 (GMT) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PKY004K9MV5AT00@eusync4.samsung.com>; Mon, 07 Jan 2019 12:04:20 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Andrzej Hajda , =?utf-8?q?Pawe=C5=82_Chmi?= =?utf-8?q?el?= Subject: [PATCH] media: s5p-mfc: fix incorrect bus assignment in virtual child device Date: Mon, 07 Jan 2019 13:04:14 +0100 Message-id: <20190107120414.30622-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEIsWRmVeSWpSXmKPExsWy7djPc7quDsYxBrfaxCxurTvHatGzYSur xYzz+5gs1h65y27x43gfs8XhN+2sDmweO2fdZffo27KK0ePzJrkA5igum5TUnMyy1CJ9uwSu jP27djIWHOSsWLhjOVMD4zyOLkZODgkBE4mbS56ygdhCAisYJboWpnQxcgHZnxklbu67z9rF yAFWdPtIJkR8GaPElb8HmEEaeAUEJX5MvscCUsMsIC9x5FI2SJhZQFNi6+717BD1DUwS137M YAdJsAkYSnS97QJbJiLgJLFw1l+wImaB44wSr6d8BUsIC4RLbP16hAXEZhFQlfjxcQcbxDJb iY8zl7FDXC0vsXoDyBFcQHYPm8Tfjv9Ql7pItC/0gKgRlnh1fAtUvYxEZ8dBJoj6ZkaJ9hmz 2KGaGSW2zoHYICFgLXH4+EVWiB/4JCZtm84MMZRXoqNNCKLEQ2Je2xxGkLCQQKxE7yG2CYzS s5DCYhYiLGYhhcUCRuZVjOKppcW56anFxnmp5XrFibnFpXnpesn5uZsYgTF9+t/xrzsY9/1J OsQowMGoxMNrEGAUI8SaWFZcmXuIUYKDWUmEN+epYYwQb0piZVVqUX58UWlOavEhRmkOFiVx 3mqGB9FCAumJJanZqakFqUUwWSYOTqkGxhkmn3u3P/v6gzlteqtR+7Lc9b8lv73a0SGTWneH YdfuPXwGa9KszOIW/U8OKgyduqRlxeyZO1vya8u9O6Xs9tk+OK/mq8zHFtUd33rwT6n8uuW7 Tizs37Tg66TdW22evLmU5/Us4cPaufVTfm1MN5Rc03UlZK6xl8LB75lfvY9vv9fTzXpmrpwS S3FGoqEWc1FxIgCuM0wC5QIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCLMWRmVeSWpSXmKPExsVy+t/xa7ouDsYxBos/q1rcWneO1aJnw1ZW ixnn9zFZrD1yl93ix/E+ZovDb9pZHdg8ds66y+7Rt2UVo8fnTXIBzFFcNimpOZllqUX6dglc Gft37WQsOMhZsXDHcqYGxnkcXYwcHBICJhK3j2R2MXJyCAksYZTY/94FxOYVEJT4MfkeC0gJ s4C8xJFL2SBhZgF1iUnzFjF3MXIBlTcxSZx5+5EdJMEmYCjR9baLDcQWEXCSWDjrLztEw0lG ietPhUBsYYFwifkXfoLVsAioSvz4uIMNYpetxMeZy8DqJYB2rd5wgHkCI+8sJGfMQjhjFpIz FjAyr2IUSS0tzk3PLTbUK07MLS7NS9dLzs/dxAgMu23Hfm7ewXhpY/AhRgEORiUeXoMAoxgh 1sSy4srcQ4wSHMxKIrw5Tw1jhHhTEiurUovy44tKc1KLDzFKc7AoifOeN6iMEhJITyxJzU5N LUgtgskycXBKNTBmaK/SqDo/YZF0p9gZ5vj6NfunXV1VolF2ZmFHyiahh2+LHCxWHnryJT17 Ats9VQHj9V/n7ee6WKvYomrapfH1yq0LbNaZ+00fHIxIfnL1XOgWtlk7HCRFjA0/9k/yFWnm bcw3Xxz4ZbnurK4Jm13vxMwRq9AVf1PxZkvIStNee8Vv7ly6ijFKLMUZiYZazEXFiQBmwAkc NwIAAA== X-CMS-MailID: 20190107120420eucas1p179b227d5ff0e040540ed9f48573e6e73 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190107120420eucas1p179b227d5ff0e040540ed9f48573e6e73 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Virtual MFC codec's child devices must not be assigned to platform bus, because they are allocated as raw 'struct device' and don't have the corresponding 'platform' part. This fixes NULL pointer access revealed recently by commit a66d972465d1 ("devres: Align data[] to ARCH_KMALLOC_MINALIGN"). Reported-by: Paweł Chmiel Fixes: c79667dd93b0 ("media: s5p-mfc: replace custom reserved memory handling code with generic one") Signed-off-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 - 1 file changed, 1 deletion(-) -- 2.17.1 Tested-by: Paweł Chmiel diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 927a1235408d..ca11f8a7569d 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1089,7 +1089,6 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev, device_initialize(child); dev_set_name(child, "%s:%s", dev_name(dev), name); child->parent = dev; - child->bus = dev->bus; child->coherent_dma_mask = dev->coherent_dma_mask; child->dma_mask = dev->dma_mask; child->release = s5p_mfc_memdev_release;