Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3620681imm; Wed, 5 Sep 2018 03:16:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZq7YT6EP3Z1NL4XVoIm/oljsGAUg7jIOGuOAbLfVULde39Td3BTocHo1iKRPnp2SqD7/0r X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr38415938pla.131.1536142581143; Wed, 05 Sep 2018 03:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536142581; cv=none; d=google.com; s=arc-20160816; b=ADZxr+iaZxCF8l39n+SnzGbopiiRaJT9t+nFOnJvL0DsSDPd2rXSeXQBYBYev2xE/D H/m/burgY3Ltt6HoQl5xkEyEagTn2ywaN7AO8mbPGRJfyBccFPLdADvr0q2mQCcLBbi0 rNu66h8BRkHztRquRsydGUOWYLVmaXvOQZklz+/z2IZpJf7fKfbZA9iGe7nk1GzRrBfq OSogify0hIC5MXBMrxHb2ArOY1zJ5bV4RjWzg/+fmYtRPaBsqKf57UJLOKe7KIjqf6DY QoG3L0JbBgIWCwKup7298uNEaJ1sTvbz06RXe29tWGznRlGYId0UuGIq4P1rlNdH46EY kbsw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=GeoHkZNTv2kOuSLXH8V5upOKA/aoVbP4n6FJjJTUlK8=; b=M6xqxsY2q4MnrbhPpcWILpk/y1gfn3D6JoDUsATuChdz5LklYI3yrffYswbRuTtQcF yyIGwHN+I5dfY/LlyyXGopjTNCwPTcyASTaiIGJxfnYGryU+9Yg0Br/j+NNWp/wfoOZl jG/Ve+grMg+0yXLJDv+j+6y69cSJEwS7O56qF8x6MCHUaQVtjJcqSjSmx2ASAd0sW/4l bN1ztRadXbU5NaYxbS8V8hKgrvQsnQjLXc9v9eyrrT7QK51nzvX1s0ZNzAdrlIxUWAB6 Ioul8LLsdoiZjh23Rx1Xjn7pVxF2pxJz8JwacH94nYeT09wj5jJWvVZlXcy32BuyoMcx 9Rtw== 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17-v6si1535861pgi.284.2018.09.05.03.16.05; Wed, 05 Sep 2018 03:16:21 -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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727687AbeIEOoc (ORCPT + 99 others); Wed, 5 Sep 2018 10:44:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:52715 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbeIEOoc (ORCPT ); Wed, 5 Sep 2018 10:44:32 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fxUpu-0005bF-OB; Wed, 05 Sep 2018 10:14:58 +0000 Subject: Re: [PATCH] staging: most: video: fix registration of an empty comp core_component To: Alexander Stein Cc: Greg Kroah-Hartman , Christian Gromm , Abdun Nihaal , devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180905094605.14827-1-colin.king@canonical.com> <1588498.TolbaFeo5X@ws-140106> From: Colin Ian King Openpgp: preference=signencrypt Autocrypt: addr=colin.king@canonical.com; prefer-encrypt=mutual; keydata= xsFNBE6TJCgBEACo6nMNvy06zNKj5tiwDsXXS+LhT+LwtEsy9EnraKYXAf2xwazcICSjX06e fanlyhB0figzQO0n/tP7BcfMVNG7n1+DC71mSyRK1ZERcG1523ajvdZOxbBCTvTitYOy3bjs +LXKqeVMhK3mRvdTjjmVpWnWqJ1LL+Hn12ysDVVfkbtuIm2NoaSEC8Ae8LSSyCMecd22d9Pn LR4UeFgrWEkQsqROq6ZDJT9pBLGe1ZS0pVGhkRyBP9GP65oPev39SmfAx9R92SYJygCy0pPv BMWKvEZS/7bpetPNx6l2xu9UvwoeEbpzUvH26PHO3DDAv0ynJugPCoxlGPVf3zcfGQxy3oty dNTWkP6Wh3Q85m+AlifgKZudjZLrO6c+fAw/jFu1UMjNuyhgShtFU7NvEzL3RqzFf9O1qM2m uj83IeFQ1FZ65QAiCdTa3npz1vHc7N4uEQBUxyXgXfCI+A5yDnjHwzU0Y3RYS52TA3nfa08y LGPLTf5wyAREkFYou20vh5vRvPASoXx6auVf1MuxokDShVhxLpryBnlKCobs4voxN54BUO7m zuERXN8kadsxGFzItAyfKYzEiJrpUB1yhm78AecDyiPlMjl99xXk0zs9lcKriaByVUv/NsyJ FQj/kmdxox3XHi9K29kopFszm1tFiDwCFr/xumbZcMY17Yi2bQARAQABzSJDb2xpbiBLaW5n IDxjb2xpbi5raW5nQHVidW50dS5jb20+wsF3BBMBCAAhBQJPCrjvAhsDBQsJCAcDBRUKCQgL BRYCAwEAAh4BAheAAAoJEGjCh9/GqAImjVsP/iA8hDQy7LlMYepND9tKJD2haNLmsBC+yuxX BybYprtSjwvMbx6CtmtiJ4nGfdBzbZv3xOJPr/n6wxrdfGHEFn0W8Au97Xvk087P7alCwBXz y1Hk1aTlhLOGunOLv6SWRYRUAHvWEoVlxPSo2UNJ6D01d9tc7IJU08MlAl+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ng7 SceqjsgxO4J35pPOCG8gy85Tmd5NKe46K1xGsNG2zzfXQ6cNkofUyQFGVbLCtdfQyWV7+dgU nOnPhrTKpFfJ5lnWpLpze0LfyW03CpWx9x4yMlwcvIFw2hLaOQARAQABwsFfBBgBCAAJBQJO kyQoAhsMAAoJEGjCh9/GqAImeJYP/jdppMeb7AZnLGVXd8rN7CLBtfMOkXCWaOUhjMRAY7dV IMiF1iPZc6SgiiMSsdG7JJhMjMuLTxA0kX2Z6P0+6dZlO4bDOKMIv4nNGhgSj9NuSKJPRiyi XKKD/wNnPXVFdBZsoHnEXGyAFGnidu4KLUJIiSm4tHJdoMk0ZaJSmwt0dtytuC1IWH8eIaVo /Ah6FxCaznRzvGNFx+9Ofcc7+aMZ15dkg9XagOuiDZ1/r6VuEw9ovnkDT4H5BAsysxo/qykX 4XQ2RQSY/P3td9WNLeXLvt1aJNRcwcIEKgZ5AO3YQbEJt1dEfCU7TAKiRpsjnC/iQiQHGt2I vNci8oZmM3EQEi7yZqD07A6dpGTnRq9OQ7fGhj0SS99yZvooH3fBIHA2LRuvhfDAgTrpbU0w LvkAIo0T2b9SoRCV8FEpHvR2b86NbTU5WN4eqZQbAbnxC7tJp6kLx2Zn2uQMvfXRfnS9R1ja etvpk3h7F+r/RAAh+EvgsPUNaiRJRRLvf9bxTQZhmNrw79eIFNsRIktniLyomJf2+WPOUECz h1lfLqe9yiuUKv+m5uAalXdayhiPbp/JHs1EDRgSq3tiirOsKrh/KMpwz/22qGMRBjFwYBhf 6ozgujmPlO5DVFtzfwOydzNlXTky7t4VU8yTGXZTJprIO+Gs72Q1e+XVIoKl3MIx Message-ID: Date: Wed, 5 Sep 2018 11:14:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1588498.TolbaFeo5X@ws-140106> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/18 11:06, Alexander Stein wrote: > On Wednesday, September 5, 2018, 11:46:05 AM CEST Colin King wrote: >> From: Colin Ian King >> >> Currently we have structrues comp (which is empty) and comp_info being >> used to register and deregister the component. This mismatch in naming >> occurred from a previous commit that renamed aim_info to comp. Fix this >> to use consistent component naming in line with most/net, most/sound etc. >> >> This fixes the message two issues, one with a null empty name when >> loading the module: >> >> [ 1485.269515] most_core: registered new core component (null) >> >> and an Oops when removing the module: >> >> [ 1485.277971] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 >> [ 1485.278648] PGD 0 P4D 0 >> [ 1485.279253] Oops: 0002 [#2] SMP PTI >> [ 1485.279847] CPU: 1 PID: 32629 Comm: modprobe Tainted: P D WC OE 4.18.0-8-generic #9 >> [ 1485.280442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 >> [ 1485.281040] RIP: 0010:most_deregister_component+0x3c/0x70 [most_core] >> .. etc >> >> Fixes: 1b10a0316e2d ("staging: most: video: remove aim designators") >> Signed-off-by: Colin Ian King >> --- >> drivers/staging/most/video/video.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c >> index cf342eb58e10..ad7e28ab9a4f 100644 >> --- a/drivers/staging/most/video/video.c >> +++ b/drivers/staging/most/video/video.c >> @@ -530,7 +530,7 @@ static int comp_disconnect_channel(struct most_interface *iface, >> return 0; >> } >> >> -static struct core_component comp_info = { >> +static struct core_component comp = { >> .name = "video", >> .probe_channel = comp_probe_channel, >> .disconnect_channel = comp_disconnect_channel, > > Doesn't it make more sense to move that variable defintion where currently the forward declaration is? Probably, I was just keeping this the same as the other most/* drivers to be consistent with those for now while just fixing this current buglet. > This way you can't have 2 variables accidentally. You will need forward declarations for those two functions, but a mismatch here results in a linker error rather than a runtime NULL pointer access > > Best regards, > Alexander > > >