From patchwork Sat Jun 16 20:58:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Efremov X-Patchwork-Id: 930411 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 417VDj714sz9s3M for ; Sun, 17 Jun 2018 07:02:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933401AbeFPVCd (ORCPT ); Sat, 16 Jun 2018 17:02:33 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:44063 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933319AbeFPVCc (ORCPT ); Sat, 16 Jun 2018 17:02:32 -0400 Received: by mail-lf0-f68.google.com with SMTP id p23-v6so7637189lfh.11; Sat, 16 Jun 2018 14:02:31 -0700 (PDT) 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; bh=tzkAfTbELaQ5+K4PoFgOq7mc7OGjnREa9FOC3QC9XZ8=; b=bfI3LzGJZckTjojqmEvbyDYSbIGJ+2I2YFMgWPf0o62G3JhO2f72XjwSPqwZ4qEsHJ Olar5W+GRwGdo6sQ6MbkxojIuDOREd7OT3EfTlz88o+PvDD1PBjD3NF7BptEfcQJcsNq G6sw5f3uzkDvhjUAFkcigyOwSb8ywqqv/SBr3/d714FxccSJqqHt3G/oNjZ1PeJpzsB6 NpvJRqKBpdDryFI3xOOqxNDyPzeBKZSuQ+B6LyakwvR+9bvwt5Z377Mc6PPiMIFwm9Cc aerrUFop1KYHKdougcAHqACGdsYBJZohxndKLzXN4TKOjO9L8Tkd2U1IS6ObzD/kUhhk zkjg== X-Gm-Message-State: APt69E18mjOzylyOIP/6HxnuhZAIPdiE4az9ZSKdzf+t6dsyLagnlnfL 1MFuIva5uLZTtVoRYVTzX31jqHBO X-Google-Smtp-Source: ADUXVKLMp4O6sAVeHi4ieicTtzFWPo4QhAXP7wgdjwsALTB20OabtK+9oSWJblzGt4JqQSA5PtGJAw== X-Received: by 2002:a19:380a:: with SMTP id f10-v6mr4208290lfa.47.1529182951061; Sat, 16 Jun 2018 14:02:31 -0700 (PDT) Received: from green.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.googlemail.com with ESMTPSA id c20-v6sm2036260lji.82.2018.06.16.14.02.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 14:02:30 -0700 (PDT) From: efremov@linux.com To: Steffen Klassert Cc: Denis Efremov , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] xfrm4: Remove export declaration from xfrm4_protocol_init Date: Sat, 16 Jun 2018 23:58:40 +0300 Message-Id: <20180616205840.19822-1-efremov@linux.com> X-Mailer: git-send-email 2.17.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Denis Efremov The function xfrm4_protocol_init is exported as GPL symbol and annotated as __init. That is reasonable only in the case when this function is called from another's module __init section. Otherwise, we will face section mismatch error. xfrm4_protocol_init is used in xfrm4_init along with xfrm4_state_init and xfrm4_policy_init. The last two functions are not exported as GPL symbols. According to this, it seem's like there is no reason to export xfrm4_protocol_init too. Fix potential section mismatch by removing export declaration from xfrm4_protocol_init. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov --- net/ipv4/xfrm4_protocol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv4/xfrm4_protocol.c b/net/ipv4/xfrm4_protocol.c index 8dd0e6ab8606..0e1f5dc2766b 100644 --- a/net/ipv4/xfrm4_protocol.c +++ b/net/ipv4/xfrm4_protocol.c @@ -297,4 +297,3 @@ void __init xfrm4_protocol_init(void) { xfrm_input_register_afinfo(&xfrm4_input_afinfo); } -EXPORT_SYMBOL(xfrm4_protocol_init);