Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Linus Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
	Josh Triplett <josh@joshtriplett.org>
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree
Date: Wed, 6 Dec 2017 20:42:22 -0800
Message-ID: <20171207044222.GK7829@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171207152521.0036b131@canb.auug.org.au>

On Thu, Dec 07, 2017 at 03:25:21PM +1100, Stephen Rothwell wrote:
> Hi Bart,
> 
> [cc'ing some RCU people ...]
> 
> On Thu, 7 Dec 2017 03:59:30 +0000 Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> >
> > On Thu, 2017-12-07 at 14:57 +1100, Stephen Rothwell wrote:
> > > After merging the scsi-mkp tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > ERROR: "init_rcu_head" [drivers/scsi/scsi_mod.ko] undefined!
> > > ERROR: "destroy_rcu_head" [drivers/scsi/scsi_mod.ko] undefined!
> > > 
> > > Caused by commit
> > > 
> > >   ac90420f17c9 ("scsi: core: Ensure that the SCSI error handler gets woken up")
> > > 
> > > I have used the scsi-mkp tree from next-20171206 for today.  
> > 
> > Does that mean I'm the first one who added RCU code to the SCSI core?
> 
> The only other uses of init_rcu_head() are in drivers/iommu/intel-svm.c
> and kernel/irq/irqdesc.c.  destroy_rcu_head() appears to not be used
> anywhere ...

The key point is that Bart appears to be the first to try using them in
a module, for which exports are needed.  Does the patch below help?

							Thanx, Paul

------------------------------------------------------------------------

commit cde4691a3a4591e7355295dd62610e3262159002
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date:   Wed Dec 6 20:39:38 2017 -0800

    rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules
    
    Use of init_rcu_head() and destroy_rcu_head() from modules results in
    the following build-time error:
    
    	ERROR: "init_rcu_head" [drivers/scsi/scsi_mod.ko] undefined!
    	ERROR: "destroy_rcu_head" [drivers/scsi/scsi_mod.ko] undefined!
    
    This commit therefore adds EXPORT_SYMBOL_GPL() for each to allow them
    to be used by GPL-licensed kernel modules.
    
    Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 8d591d8411fe..4c4d26e9a67b 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -422,11 +422,13 @@ void init_rcu_head(struct rcu_head *head)
 {
 	debug_object_init(head, &rcuhead_debug_descr);
 }
+EXPORT_SYMBOL_GPL(init_rcu_head);
 
 void destroy_rcu_head(struct rcu_head *head)
 {
 	debug_object_free(head, &rcuhead_debug_descr);
 }
+EXPORT_SYMBOL_GPL(destroy_rcu_head);
 
 static bool rcuhead_is_static_object(void *addr)
 {

  reply index

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  3:57 Stephen Rothwell
2017-12-07  3:59 ` Bart Van Assche
2017-12-07  4:25   ` Stephen Rothwell
2017-12-07  4:42     ` Paul E. McKenney [this message]
2017-12-07 17:30       ` Bart Van Assche
2017-12-07 17:40         ` Paul E. McKenney
2017-12-07 20:34           ` Stephen Rothwell
2017-12-07 21:10             ` Paul E. McKenney
2017-12-07 21:11             ` Martin K. Petersen
2017-12-08  1:00               ` Martin K. Petersen
2017-12-11 17:43                 ` Paul E. McKenney
  -- strict thread matches above, loose matches on Subject: below --
2019-10-25  3:07 Stephen Rothwell
2019-10-25 18:03 ` James Smart
2019-10-28  5:49 ` Stephen Rothwell
2019-10-29  2:28   ` Martin K. Petersen
2019-10-29  2:48     ` Stephen Rothwell
2019-04-09  6:27 Stephen Rothwell
2019-04-10  1:21 ` Stephen Rothwell
2019-04-10  1:33   ` Martin K. Petersen
2019-04-10  4:04     ` James Bottomley
2019-04-10  4:57       ` Stephen Rothwell
2018-03-22  6:25 Stephen Rothwell
2018-03-22 16:33 ` Madhani, Himanshu
2017-05-17  2:57 Stephen Rothwell
2017-02-23  3:12 Stephen Rothwell
2017-02-23 14:19 ` Martin K. Petersen
2017-02-23 15:04   ` Chad Dupuis
2017-02-22  2:41 Stephen Rothwell
2017-02-22 21:06 ` Stephen Rothwell
2017-02-22 21:10   ` Martin K. Petersen
2017-02-22 21:13     ` James Bottomley
2017-02-22 21:17       ` Martin K. Petersen
2017-02-27  1:54   ` Stephen Rothwell
2017-02-27 15:25     ` James Bottomley

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171207044222.GK7829@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ptikhomirov@virtuozzo.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git