1. 03 10月, 2013 1 次提交
  2. 29 3月, 2013 1 次提交
  3. 19 2月, 2013 2 次提交
  4. 04 1月, 2013 1 次提交
    • G
      Drivers: misc: remove __dev* attributes. · 0fe763c5
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0fe763c5
  5. 09 9月, 2012 1 次提交
  6. 17 7月, 2012 1 次提交
  7. 30 6月, 2012 1 次提交
    • P
      netlink: add netlink_kernel_cfg parameter to netlink_kernel_create · a31f2d17
      Pablo Neira Ayuso 提交于
      This patch adds the following structure:
      
      struct netlink_kernel_cfg {
              unsigned int    groups;
              void            (*input)(struct sk_buff *skb);
              struct mutex    *cb_mutex;
      };
      
      That can be passed to netlink_kernel_create to set optional configurations
      for netlink kernel sockets.
      
      I've populated this structure by looking for NULL and zero parameters at the
      existing code. The remaining parameters that always need to be set are still
      left in the original interface.
      
      That includes optional parameters for the netlink socket creation. This allows
      easy extensibility of this interface in the future.
      
      This patch also adapts all callers to use this new interface.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a31f2d17
  8. 27 6月, 2012 1 次提交
  9. 08 6月, 2011 1 次提交
  10. 13 4月, 2011 1 次提交
  11. 31 3月, 2011 1 次提交
    • P
      connector: convert to synchronous netlink message processing · 04f482fa
      Patrick McHardy 提交于
      Commits 01a16b21 (netlink: kill eff_cap from struct netlink_skb_parms)
      and c53fa1ed (netlink: kill loginuid/sessionid/sid members from struct
      netlink_skb_parms) removed some members from struct netlink_skb_parms
      that depend on the current context, all netlink users are now required
      to do synchronous message processing.
      
      connector however queues received messages and processes them in a work
      queue, which is not valid anymore. This patch converts connector to do
      synchronous message processing by invoking the registered callback handler
      directly from the netlink receive function.
      
      In order to avoid invoking the callback with connector locks held, a
      reference count is added to struct cn_callback_entry, the reference
      is taken when finding a matching callback entry on the device's queue_list
      and released after the callback handler has been invoked.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04f482fa
  12. 24 2月, 2011 1 次提交
  13. 11 12月, 2010 1 次提交
  14. 25 10月, 2010 1 次提交
    • T
      connector: remove lazy workqueue creation · 6cebb17b
      Tejun Heo 提交于
      Commit 1a5645bc (connector: create connector workqueue only while
      needed once) implements lazy workqueue creation for connector
      workqueue.  With cmwq now in place, lazy workqueue creation doesn't
      make much sense while adding a lot of complexity.  Remove it and
      allocate an ordered workqueue during initialization.
      
      This also removes a call to flush_scheduled_work() which is deprecated
      and scheduled to be removed.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cebb17b
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 03 2月, 2010 1 次提交
    • E
      connector: Delete buggy notification code. · f98bfbd7
      Evgeniy Polyakov 提交于
      On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
      > > There are at least two ways to fix it: using a big cannon and a small
      > > one. The former way is to disable notification registration, since it is
      > > not used by anyone at all. Second way is to check whether calling
      > > process is root and its destination group is -1 (kind of priveledged
      > > one) before command is dispatched to workqueue.
      > 
      > Well if no one is using it, removing it makes the most sense, right?
      > 
      > No objection from me, care to make up a patch either way for this?
      
      Getting it is not used, let's drop support for notifications about
      (un)registered events from connector.
      Another option was to check credentials on receiving, but we can always
      restore it without bugs if needed, but genetlink has a wider code base
      and none complained, that userspace can not get notification when some
      other clients were (un)registered.
      
      Kudos for Sebastian Krahmer <krahmer@suse.de>, who found a bug in the
      code.
      Signed-off-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f98bfbd7
  17. 03 10月, 2009 3 次提交
  18. 22 7月, 2009 1 次提交
  19. 18 7月, 2009 1 次提交
    • M
      connector: make callback argument type explicit · 0741241c
      Mike Frysinger 提交于
      The connector documentation states that the argument to the callback
      function is always a pointer to a struct cn_msg, but rather than encode it
      in the API itself, it uses a void pointer everywhere.  This doesn't make
      much sense to encode the pointer in documentation as it prevents proper C
      type checking from occurring and can easily allow people to use the wrong
      pointer type.  So convert the argument type to an explicit struct cn_msg
      pointer.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0741241c
  20. 03 2月, 2009 1 次提交
    • F
      connector: create connector workqueue only while needed once · 1a5645bc
      Frederic Weisbecker 提交于
      The netlink connector uses its own workqueue to relay the datas sent
      from userspace to the appropriate callback.  If you launch the test
      from Documentation/connector and change it a bit to send a high flow
      of data, you will see thousands of events coming to the "cqueue"
      workqueue by looking at the workqueue tracer.
      
      This flow of events can be sent very quickly. So, to not encumber the
      kevent workqueue and delay other jobs, the "cqueue" workqueue should
      remain.
      
      But this workqueue is pointless most of the time, it will always be
      created (assuming you have built it of course) although only
      developpers with specific needs will use it.
      
      So avoid this "most of the time useless task", this patch proposes to
      create this workqueue only when needed once.  The first jobs to be
      sent to connector callbacks will be sent to kevent while the "cqueue"
      thread creation will be scheduled to kevent too.
      
      The following jobs will continue to be scheduled to keventd until the
      cqueue workqueue is created, and then the rest of the jobs will
      continue to perform as usual, through this dedicated workqueue.
      
      Each time I tested this patch, only the first event was sent to
      keventd, the rest has been sent to cqueue which have been created
      quickly.
      
      Also, this patch fixes some trailing whitespaces on the connector files.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a5645bc
  21. 28 6月, 2008 1 次提交
    • L
      CONNECTOR: add a proc entry to list connectors · a0a61a60
      Li Zefan 提交于
      I got a problem when I wanted to check if the kernel supports process
      event connector, and It seems there's no way to do this check.
      
      At best I can check if the kernel supports connector or not, by looking
      into /proc/net/netlink, or maybe checking the return value of bind() to
      see if it's ENOENT.
      
      So it would be useful to add /proc/net/connector to list all supported
      connectors:
       # cat /proc/net/connector
       Name            ID
       connector       4294967295:4294967295
       cn_proc         1:1
       w1              3:1
      
      Changelog:
      - fix memory leak: s/seq_release/single_release
      - use spin_lock_bh instead of spin_lock_irqsave
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0a61a60
  22. 27 2月, 2008 1 次提交
  23. 29 1月, 2008 3 次提交
  24. 04 1月, 2008 1 次提交
  25. 31 10月, 2007 1 次提交
  26. 11 10月, 2007 2 次提交
    • D
      [NET]: make netlink user -> kernel interface synchronious · cd40b7d3
      Denis V. Lunev 提交于
      This patch make processing netlink user -> kernel messages synchronious.
      This change was inspired by the talk with Alexey Kuznetsov about current
      netlink messages processing. He says that he was badly wrong when introduced 
      asynchronious user -> kernel communication.
      
      The call netlink_unicast is the only path to send message to the kernel
      netlink socket. But, unfortunately, it is also used to send data to the
      user.
      
      Before this change the user message has been attached to the socket queue
      and sk->sk_data_ready was called. The process has been blocked until all
      pending messages were processed. The bad thing is that this processing
      may occur in the arbitrary process context.
      
      This patch changes nlk->data_ready callback to get 1 skb and force packet
      processing right in the netlink_unicast.
      
      Kernel -> user path in netlink_unicast remains untouched.
      
      EINTR processing for in netlink_run_queue was changed. It forces rtnl_lock
      drop, but the process remains in the cycle until the message will be fully
      processed. So, there is no need to use this kludges now.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Acked-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd40b7d3
    • E
      [NET]: Support multiple network namespaces with netlink · b4b51029
      Eric W. Biederman 提交于
      Each netlink socket will live in exactly one network namespace,
      this includes the controlling kernel sockets.
      
      This patch updates all of the existing netlink protocols
      to only support the initial network namespace.  Request
      by clients in other namespaces will get -ECONREFUSED.
      As they would if the kernel did not have the support for
      that netlink protocol compiled in.
      
      As each netlink protocol is updated to be multiple network
      namespace safe it can register multiple kernel sockets
      to acquire a presence in the rest of the network namespaces.
      
      The implementation in af_netlink is a simple filter implementation
      at hash table insertion and hash table look up time.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4b51029
  27. 26 4月, 2007 2 次提交
  28. 08 3月, 2007 1 次提交
  29. 18 12月, 2006 2 次提交
  30. 22 11月, 2006 1 次提交
  31. 23 6月, 2006 1 次提交
  32. 20 6月, 2006 1 次提交