Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp519988imm; Thu, 26 Jul 2018 07:36:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcu9KPGp+Opw31KYchi2w5YCt1OFniwcvjou358B1T1fVlbpElJ7YjTzQt1j3QdFhAjFlqu X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr267991pld.202.1532615775526; Thu, 26 Jul 2018 07:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532615775; cv=none; d=google.com; s=arc-20160816; b=I/fNxf9FupRvMK2aWmxnHotF7Sf7hQEbUJaBkIvxsquJZqPEEPBnEO2AHxP+xSu0j0 vDkhlIVgeqns+DB9gP+ASrxpYpXAkHRJvt0nsSAEXk6mz4vQkS+H6H0E7zMoDyvi/+KQ AYjMwe4VO3a6jfJxF/yjA/JLTQYIHM8X75J8G0B+gTqFU85O4KUOQbvQwcWjjb1unuhX Qs8N026M9fJw6edvUsURsejD9uK3GobIcm1NTJP3Vw0C8PfbOSvnejZsjsDYcmPBZHjP /uGOe5IlJdgJdE+2JzkGbCRg8jJU1ysB5hZaab/JDKFQLeZSB+t0g2j7e3pz36QOLnK7 A3zA== 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 :content-transfer-encoding:mime-version:in-reply-to:user-agent :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=YmR3C4vh2L8Q6PFGq13UgDypEQcunQpHR905biFEyLc=; b=vRLqNAtsyiKolTYuDL1J+oenkYg/LjC45Hh+xW0w6jWug3nunXSbf2308G2BvrKBtP XsmsneUUY43+GDGi1/r80y14f0zB8PBFmrImRWvTgNxI7ryVuI5qNLTo6HNheztjx5Yb W/ZATC62oCByD6T/jq6h1XH86rZtrIW9luxwqzLE30xKcbrfUCtQDV4uOxLJlZ7M/MEg V1FQ5jueYWijfDZ0YuHT7k6mLTq2ZrXvzQI115x/AinIp9YTsGv7d/ghA/V4Va+u0Uhj gcUxxmjP6b55cO0SFvkWFv35bPdnaAPxTklEWPG7SE554N5vxUt5zNLXQ5oDfyFmEznT G8tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QW3VQtRY; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g35-v6si1498444pgm.54.2018.07.26.07.36.00; Thu, 26 Jul 2018 07:36:15 -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=@samsung.com header.s=mail20170921 header.b=QW3VQtRY; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731230AbeGZPwF (ORCPT + 99 others); Thu, 26 Jul 2018 11:52:05 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:40809 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729923AbeGZPwF (ORCPT ); Thu, 26 Jul 2018 11:52:05 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180726143455euoutp01cad51788aaa858d4d7da29a0596bb714~E8drPHWnN1765617656euoutp01B; Thu, 26 Jul 2018 14:34:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180726143455euoutp01cad51788aaa858d4d7da29a0596bb714~E8drPHWnN1765617656euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1532615695; bh=YmR3C4vh2L8Q6PFGq13UgDypEQcunQpHR905biFEyLc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=QW3VQtRYn7A+kk888us2QHOWlXi4cQPZ5q41TCe+6c8SzYZlKEUEDCmlUtAn36GAt TpBc3HnOg69CQH1Nh7hlJzaMi2Pk+giqunxVFfmPVwyAcDXg7xp6RIUXM6ve/ZpY7F ur7FBVgvS/RUJ5ZVvug0n18lI9pnaesjRZDwnKsE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180726143454eucas1p27fe2de26588295c5dcbc802db371a5ef~E8dqzldp51246512465eucas1p2E; Thu, 26 Jul 2018 14:34:54 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id A3.3C.61560.E0CD95B5; Thu, 26 Jul 2018 15:34:54 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180726143454eucas1p202f3b7d108ecc9130480d3d493c4c3fb~E8dqI7E653149531495eucas1p2J; Thu, 26 Jul 2018 14:34:54 +0000 (GMT) X-AuditID: cbfec7f5-207ff7000002f078-8e-5b59dc0ed81e Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5B.23.04183.D0CD95B5; Thu, 26 Jul 2018 15:34:53 +0100 (BST) Received: from amdc3058.localnet ([106.120.53.102]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PCH003AS9U5Z590@eusync4.samsung.com>; Thu, 26 Jul 2018 15:34:53 +0100 (BST) From: Bartlomiej Zolnierkiewicz To: bai Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] video: fbdev: broadsheetfb: Possible null function pointers Date: Thu, 26 Jul 2018 16:34:53 +0200 Message-id: <2568790.PcaMMF1rzM@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJIsWRmVeSWpSXmKPExsWy7djPc7p8dyKjDY59k7VYN3Ehk8WVr+/Z LE70fWC1uLxrDpsDi8fOWXfZPe53H2fy+LxJLoA5issmJTUnsyy1SN8ugSvj/tnfzAWn2CsW fT/P3sD4lrWLkZNDQsBE4v6/icxdjFwcQgIrGCWaL/yGcj4zSmy4vBWoigOsavJdH4j4MkaJ dava2CCc34wSe45cYgcZxSZgJTGxfRUjiC0ioCDRvOYuC4jNLJAgcXrRPTBbWCBA4u/OJjYQ m0VAVWL/xGdgvbwCmhJHu+eB1YgKeEls2dfOBGJzCthKvLn9lAWiRlDix+R7UDPlJfbtn8oK YetInD22jhHkIAmBGWwS25++Zof4zUVi2pZGqD+FJV4d3wIVl5G4PLmbBaJhOqPEm19LoZz1 jBJrzhxjgqiyljh8/CLUCj6JSdumM0PCgleio00IosRDorV3PzS8JjBKXLlwh3kCo8wsJNfO QnLtLCTXLmBkXsUonlpanJueWmycl1quV5yYW1yal66XnJ+7iREY4af/Hf+6g3Hfn6RDjAIc jEo8vBdmRkQLsSaWFVfmHmKU4GBWEuFdcz0yWog3JbGyKrUoP76oNCe1+BCjNAeLkjivtA9Q tUB6YklqdmpqQWoRTJaJg1OqgdFhsvObKeErDv8qsb2Us+7+r9V7V3kdjiifKDR7epT5jG2s fkJzRS6xcPFXCZxPK6rj27HZcvLjfzue33fR+m4856GehEHb9aAFAt3OzxerO2wVDUjMSNvM HN2j++psZ4T/D6Z74Uynj1z+dnTa9Rf+TJLhomrsk3N6UgOObfk7S+HTu7WPJz9SYinOSDTU Yi4qTgQATDoJN+wCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsVy+t/xa7q8dyKjDabPMbVYN3Ehk8WVr+/Z LE70fWC1uLxrDpsDi8fOWXfZPe53H2fy+LxJLoA5issmJTUnsyy1SN8ugSvj/tnfzAWn2CsW fT/P3sD4lrWLkYNDQsBEYvJdny5GLg4hgSWMEtfef2eHcP4ySiz708fcxcjJwSZgJTGxfRUj iC0ioCDRvOYuC0gzs0CCxLN5KSCmsICfxOV3eSAVLAKqEvsnPmMHsXkFNCWOds9jAbFFBbwk tuxrZwKxOQVsJd7cfsoCsWoSo8S3V1tYIBoEJX5MvgdmMwvIS+zbP5UVwtaSWL/zONMERv5Z SMpmISmbhaRsASPzKkaR1NLi3PTcYiO94sTc4tK8dL3k/NxNjMCw3Hbs55YdjF3vgg8xCnAw KvHwXpgZES3EmlhWXJl7iFGCg1lJhHfN9choId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rznDSqj hATSE0tSs1NTC1KLYLJMHJxSDYw+97Vdrh1d4Lzif7JP6rrNVXXHOlrXCNeHPC9we5K35P48 69McsitqZ3hV7dbn3rlEr/mG3OUH158d72GemnVmoptaYdbyx5GKnasCHIR1Iss0UvOv3eto Efwd/u4U65TEKrmAFol3UbPkXk6dYXAu+eo0qQD+G0HaDyQv5V5f/SbSydlsKbcSS3FGoqEW c1FxIgDEmeqJRwIAAA== X-CMS-MailID: 20180726143454eucas1p202f3b7d108ecc9130480d3d493c4c3fb X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180726141748epcas1p28f6f11fea0152ed22113351e3a0affbc References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, July 26, 2018 10:17:44 PM bai wrote: > In Linux-4.16, drivers/video/fbdev/broadsheetfb.c, > > 158. static void broadsheet_mmio_send_cmdargs(...) { > ...... > 163. par->board->mmio_write(...); > ...... > 166. par->board->mmio_write(...); > 167. } > > For x86 kernel configuration, I find that there is no assignment of the > function pointer ".mmio_write" in the kernel code. > So calling the function pointer in lines 163 and 166 may cause a null > pointer dereference. > > In this file, there are many calls to this function pointer... This is a platform driver and it won't be used on x86 (actually it is used only by single ARM PXA board). The dependency for FB_BROADSHEET in Kconfig file could be improved to i.e. depends on FB && (ARCH_PXA || COMPILE_TEST) but there is no bug there. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics