Re: __put_task_struct unresolved when being used in modules

From: Christoph Hellwig (hch_at_infradead.org)
Date: 10/13/04

  • Next message: David Howells: "Re: [Linux-cachefs] Re: [PATCH] NFS using CacheFS"
    Date:	Wed, 13 Oct 2004 11:29:55 +0100
    To: Thomas Spatzier <thomas.spatzier@de.ibm.com>
    
    

    On Wed, Oct 13, 2004 at 12:17:54PM +0200, Thomas Spatzier wrote:
    >
    >
    >
    >
    > I have a module that keeps a reference to a task_struct and uses
    > get_task_struct and put_task_struct to increment/decrement the
    > task_struct's ref count.
    > Function __put_task_struct defined in kernel/fork.c does not have
    > an associated EXPORT_SYMBOL , so I get an unresolved symbol
    > error.
    > Is there a reason why __put_task_struct is not exported? Otherwise,
    > I would just add the missing EXPORT_SYMBOL. There are a number
    > of EXPORT_SYMBOLs already defined in fork.c anyway.

    In general module shouldn't deal with task reference counts. If we decide
    you have a legitimate reason for doing this from a module after a review here
    on lkml we could add an EXPORT_SYMBOL_GPL at the same time your module gets
    merged.

    p.s. this is really becoming a FAQ ;-)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: David Howells: "Re: [Linux-cachefs] Re: [PATCH] NFS using CacheFS"

    Relevant Pages

    • Re: oops with USB Storage on 2.6.14
      ... > I mean we get a ref to the sdev in the upper level driver opens, scan, and ... So where are we not getting a ref? ... holding the only remaining reference to the device. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC][PATCH] inotify 0.13.1
      ... Most of the time that we grab inode->i_lock, ... So we need an inotify_data reference count to track its lifetime. ... Freeing the structure is then a consequence of the ref ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Undefined symbols in 2.6.11-rc5-mm1
      ... On Wed, 2005-03-02 at 15:00 +0100, Adrian Bunk wrote: ... > Why doesn't an EXPORT_SYMBOL create a reference? ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: kernel error in system call accept() under kernel 2.6.8
      ... > copied on the stack. ... > reference). ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [linux-usb-devel] Re: [OOPS, usbcore, releaseintf] 2.6.0-test10-mm1
      ... > If the file is open, keep the reference count. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)