From patchwork Mon Oct 19 16:53:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 11844777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E93B91580 for ; Mon, 19 Oct 2020 16:54:12 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A8DD22269 for ; Mon, 19 Oct 2020 16:54:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.elisa.tech header.i=@lists.elisa.tech header.b="MnXncU9E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A8DD22269 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+72012+115+4688437+8417402@lists.elisa.tech X-Received: by 127.0.0.2 with SMTP id exhkYY4689772xKT71pv5oal; Mon, 19 Oct 2020 09:54:11 -0700 X-Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web10.1121.1603126451055590530 for ; Mon, 19 Oct 2020 09:54:11 -0700 X-Received: by mail-wr1-f65.google.com with SMTP id t9so470375wrq.11 for ; Mon, 19 Oct 2020 09:54:10 -0700 (PDT) X-Gm-Message-State: NpAHTpqMqx441mPQ74UjLGCex4688437AA= X-Google-Smtp-Source: ABdhPJzz1tw+tlF9YXyGpI5YTYn6qrFFreWMowAEDuRlpOJHH75ycXo3sv5hkErByH/yksGbAzXDWw== X-Received: by 2002:adf:fb8b:: with SMTP id a11mr104865wrr.407.1603126449283; Mon, 19 Oct 2020 09:54:09 -0700 (PDT) X-Received: from felia.fritz.box ([2001:16b8:2df7:1800:3c8f:878f:cc06:9a83]) by smtp.gmail.com with ESMTPSA id a3sm340660wrh.94.2020.10.19.09.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 09:54:08 -0700 (PDT) From: "Lukas Bulwahn" To: linux-safety@lists.elisa.tech Cc: Lukas Bulwahn Subject: [linux-safety] [PATCH] ipv6: mcast: make annotations ip6_mc_msfget() consistent Date: Mon, 19 Oct 2020 18:53:58 +0200 Message-Id: <20201019165358.28391-1-lukas.bulwahn@gmail.com> Precedence: Bulk List-Unsubscribe: Sender: linux-safety@lists.elisa.tech List-Id: Mailing-List: list linux-safety@lists.elisa.tech; contact linux-safety+owner@lists.elisa.tech Delivered-To: mailing list linux-safety@lists.elisa.tech List-Post: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.elisa.tech; q=dns/txt; s=20140610; t=1603126451; bh=m62jY60AXJphmfjCjVeRGYdX2LRKvY36FDPUetFyNd0=; h=Cc:Date:From:Subject:To; b=MnXncU9EY5HeXzGgWhiJ8hluQcJtQ0S8dLNPdrM1FtQo9FhMo1ydMMf667Yt1t4kbHU HL0O5HLowlZC/mhG1fnpA7Y7r/m9DWN/482RWW/ljmf0Lu4V0mMlpP9LqfLSDWyvQ+h9T gsqzCtvdfOnxBI8O/BNKD4YQzT9xq9XCZkY= Commit 931ca7ab7fe8 ("ip*_mc_gsfget(): lift copyout of struct group_filter into callers") adjusted the type annotations of ip6_mc_msfget() at its declaration, but missed the type annotations at its definition. Hence, sparse complains on ./net/ipv6/mcast.c: mcast.c:550:5: error: symbol 'ip6_mc_msfget' redeclared with different type \ (incompatible argument 3 (different address spaces)) Make ip6_mc_msfget() annotations consistent, which also resolves this warning from sparse: mcast.c:607:34: warning: incorrect type in argument 1 (different address spaces) mcast.c:607:34: expected void [noderef] __user *to mcast.c:607:34: got struct __kernel_sockaddr_storage *p No functional change. No change in object code. Signed-off-by: Lukas Bulwahn --- linux-safety developers, please review, test and confirm. Thanks. net/ipv6/mcast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 8cd2782a31e4..6c8604390266 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -548,7 +548,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf, } int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, - struct sockaddr_storage *p) + struct sockaddr_storage __user *p) { int err, i, count, copycount; const struct in6_addr *group;