04 Aug, 2013

1 commit


03 Aug, 2013

1 commit


31 Jul, 2013

1 commit

  • Currently, it is not possible to use neither NLM_F_EXCL nor
    NLM_F_REPLACE from genetlink. This is due to this checking in
    genl_family_rcv_msg:

    if (nlh->nlmsg_flags & NLM_F_DUMP)

    NLM_F_DUMP is NLM_F_MATCH|NLM_F_ROOT. Thus, if NLM_F_EXCL or
    NLM_F_REPLACE flag is set, genetlink believes that you're
    requesting a dump and it calls the .dumpit callback.

    The solution that I propose is to refine this checking to
    make it stricter:

    if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP)

    And given the combination NLM_F_REPLACE and NLM_F_EXCL does
    not make sense to me, it removes the ambiguity.

    There was a patch that tried to fix this some time ago (0ab03c2
    netlink: test for all flags of the NLM_F_DUMP composite) but it
    tried to resolve this ambiguity in *all* existing netlink subsystems,
    not only genetlink. That patch was reverted since it broke iproute2,
    which is using NLM_F_ROOT to request the dump of the routing cache.

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira
     

28 Jul, 2013

1 commit

  • Requesting external module with cb_lock taken can result in
    the deadlock like showed below:

    [ 2458.111347] Showing all locks held in the system:
    [ 2458.111347] 1 lock held by NetworkManager/582:
    [ 2458.111347] #0: (cb_lock){++++++}, at: [] genl_rcv+0x19/0x40
    [ 2458.111347] 1 lock held by modprobe/603:
    [ 2458.111347] #0: (cb_lock){++++++}, at: [] genl_lock_all+0x15/0x30

    [ 2461.579457] SysRq : Show Blocked State
    [ 2461.580103] task PC stack pid father
    [ 2461.580103] NetworkManager D ffff880034b84500 4040 582 1 0x00000080
    [ 2461.580103] ffff8800197ff720 0000000000000046 00000000001d5340 ffff8800197fffd8
    [ 2461.580103] ffff8800197fffd8 00000000001d5340 ffff880019631700 7fffffffffffffff
    [ 2461.580103] ffff8800197ff880 ffff8800197ff878 ffff880019631700 ffff880019631700
    [ 2461.580103] Call Trace:
    [ 2461.580103] [] schedule+0x29/0x70
    [ 2461.580103] [] schedule_timeout+0x1c1/0x360
    [ 2461.580103] [] ? mark_held_locks+0xbb/0x140
    [ 2461.580103] [] ? _raw_spin_unlock_irq+0x2c/0x50
    [ 2461.580103] [] ? trace_hardirqs_on_caller+0xfd/0x1c0
    [ 2461.580103] [] wait_for_completion_killable+0xe8/0x170
    [ 2461.580103] [] ? wake_up_state+0x20/0x20
    [ 2461.580103] [] call_usermodehelper_exec+0x1a5/0x210
    [ 2461.580103] [] ? wait_for_completion_killable+0x3d/0x170
    [ 2461.580103] [] __request_module+0x1b3/0x370
    [ 2461.580103] [] ? trace_hardirqs_on_caller+0xfd/0x1c0
    [ 2461.580103] [] ctrl_getfamily+0x159/0x190
    [ 2461.580103] [] genl_family_rcv_msg+0x1f4/0x2e0
    [ 2461.580103] [] ? genl_family_rcv_msg+0x2e0/0x2e0
    [ 2461.580103] [] genl_rcv_msg+0x8e/0xd0
    [ 2461.580103] [] netlink_rcv_skb+0xa9/0xc0
    [ 2461.580103] [] genl_rcv+0x28/0x40
    [ 2461.580103] [] netlink_unicast+0xdd/0x190
    [ 2461.580103] [] netlink_sendmsg+0x329/0x750
    [ 2461.580103] [] sock_sendmsg+0x99/0xd0
    [ 2461.580103] [] ? local_clock+0x5f/0x70
    [ 2461.580103] [] ? lock_release_non_nested+0x308/0x350
    [ 2461.580103] [] ___sys_sendmsg+0x39e/0x3b0
    [ 2461.580103] [] ? kvm_clock_read+0x2f/0x50
    [ 2461.580103] [] ? sched_clock+0x9/0x10
    [ 2461.580103] [] ? sched_clock_local+0x1d/0x80
    [ 2461.580103] [] ? sched_clock_cpu+0xa8/0x100
    [ 2461.580103] [] ? trace_hardirqs_off+0xd/0x10
    [ 2461.580103] [] ? local_clock+0x5f/0x70
    [ 2461.580103] [] ? lock_release_holdtime.part.28+0xf/0x1a0
    [ 2461.580103] [] ? fget_light+0xf9/0x510
    [ 2461.580103] [] ? fget_light+0x3c/0x510
    [ 2461.580103] [] __sys_sendmsg+0x42/0x80
    [ 2461.580103] [] SyS_sendmsg+0x12/0x20
    [ 2461.580103] [] system_call_fastpath+0x16/0x1b
    [ 2461.580103] modprobe D ffff88000f2c8000 4632 603 602 0x00000080
    [ 2461.580103] ffff88000f04fba8 0000000000000046 00000000001d5340 ffff88000f04ffd8
    [ 2461.580103] ffff88000f04ffd8 00000000001d5340 ffff8800377d4500 ffff8800377d4500
    [ 2461.580103] ffffffff81d0b260 ffffffff81d0b268 ffffffff00000000 ffffffff81d0b2b0
    [ 2461.580103] Call Trace:
    [ 2461.580103] [] schedule+0x29/0x70
    [ 2461.580103] [] rwsem_down_write_failed+0xed/0x1a0
    [ 2461.580103] [] ? update_cpu_load_active+0x10/0xb0
    [ 2461.580103] [] call_rwsem_down_write_failed+0x13/0x20
    [ 2461.580103] [] ? down_write+0x9d/0xb2
    [ 2461.580103] [] ? genl_lock_all+0x15/0x30
    [ 2461.580103] [] genl_lock_all+0x15/0x30
    [ 2461.580103] [] genl_register_family+0x53/0x1f0
    [ 2461.580103] [] ? 0xffffffffa01dbfff
    [ 2461.580103] [] genl_register_family_with_ops+0x20/0x80
    [ 2461.580103] [] ? 0xffffffffa01dbfff
    [ 2461.580103] [] nl80211_init+0x24/0xf0 [cfg80211]
    [ 2461.580103] [] ? 0xffffffffa01dbfff
    [ 2461.580103] [] cfg80211_init+0x43/0xdb [cfg80211]
    [ 2461.580103] [] do_one_initcall+0xfa/0x1b0
    [ 2461.580103] [] ? set_memory_nx+0x43/0x50
    [ 2461.580103] [] load_module+0x1c6f/0x27f0
    [ 2461.580103] [] ? store_uevent+0x40/0x40
    [ 2461.580103] [] SyS_finit_module+0x86/0xb0
    [ 2461.580103] [] system_call_fastpath+0x16/0x1b
    [ 2461.580103] Sched Debug Version: v0.10, 3.11.0-0.rc1.git4.1.fc20.x86_64 #1

    Problem start to happen after adding net-pf-16-proto-16-family-nl80211
    alias name to cfg80211 module by below commit (though that commit
    itself is perfectly fine):

    commit fb4e156886ce6e8309e912d8b370d192330d19d3
    Author: Marcel Holtmann
    Date: Sun Apr 28 16:22:06 2013 -0700

    nl80211: Add generic netlink module alias for cfg80211/nl80211

    Reported-and-tested-by: Jeff Layton
    Reported-by: Richard W.M. Jones
    Signed-off-by: Stanislaw Gruszka
    Reviewed-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Stanislaw Gruszka
     

28 Jun, 2013

1 commit

  • Since (c05cdb1 netlink: allow large data transfers from user-space),
    netlink splats if it invokes skb_clone on large netlink skbs since:

    * skb_shared_info was not correctly initialized.
    * skb->destructor is not set in the cloned skb.

    This was spotted by trinity:

    [ 894.990671] BUG: unable to handle kernel paging request at ffffc9000047b001
    [ 894.991034] IP: [] skb_clone+0x24/0xc0
    [...]
    [ 894.991034] Call Trace:
    [ 894.991034] [] nl_fib_input+0x6a/0x240
    [ 894.991034] [] ? _raw_read_unlock+0x26/0x40
    [ 894.991034] [] netlink_unicast+0x169/0x1e0
    [ 894.991034] [] netlink_sendmsg+0x251/0x3d0

    Fix it by:

    1) introducing a new netlink_skb_clone function that is used in nl_fib_input,
    that sets our special skb->destructor in the cloned skb. Moreover, handle
    the release of the large cloned skb head area in the destructor path.

    2) not allowing large skbuffs in the netlink broadcast path. I cannot find
    any reasonable use of the large data transfer using netlink in that path,
    moreover this helps to skip extra skb_clone handling.

    I found two more netlink clients that are cloning the skbs, but they are
    not in the sendmsg path. Therefore, the sole client cloning that I found
    seems to be the fib frontend.

    Thanks to Eric Dumazet for helping to address this issue.

    Reported-by: Fengguang Wu
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira
     

25 Jun, 2013

1 commit

  • Similarly to the networking receive path with ptype_all taps, we add
    the possibility to register netdevices that are for ARPHRD_NETLINK to
    the netlink subsystem, so that those can be used for netlink analyzers
    resp. debuggers. We do not offer a direct callback function as out-of-tree
    modules could do crap with it. Instead, a netdevice must be registered
    properly and only receives a clone, managed by the netlink layer. Symbols
    are exported as GPL-only.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

20 Jun, 2013

1 commit

  • Conflicts:
    drivers/net/wireless/ath/ath9k/Kconfig
    drivers/net/xen-netback/netback.c
    net/batman-adv/bat_iv_ogm.c
    net/wireless/nl80211.c

    The ath9k Kconfig conflict was a change of a Kconfig option name right
    next to the deletion of another option.

    The xen-netback conflict was overlapping changes involving the
    handling of the notify list in xen_netbk_rx_action().

    Batman conflict resolution provided by Antonio Quartulli, basically
    keep everything in both conflict hunks.

    The nl80211 conflict is a little more involved. In 'net' we added a
    dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
    Linus reported. Meanwhile in 'net-next' the handlers were converted
    to use pre and post doit handlers which use a flag to determine
    whether to hold the RTNL mutex around the operation.

    However, the dump handlers to not use this logic. Instead they have
    to explicitly do the locking. There were apparent bugs in the
    conversion of nl80211_dump_wiphy() in that we were not dropping the
    RTNL mutex in all the return paths, and it seems we very much should
    be doing so. So I fixed that whilst handling the overlapping changes.

    To simplify the initial returns, I take the RTNL mutex after we try
    to allocate 'tb'.

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Jun, 2013

1 commit

  • Commit da12c90e099789a63073fc82a19542ce54d4efb9
    "netlink: Add compare function for netlink_table"
    only set compare at the time we create kernel netlink,
    and reset compare to NULL at the time we finially
    release netlink socket, but netlink_lookup wants
    the compare exist always.

    So we should set compare after we allocate nl_table,
    and never reset it. make comapre exist all the time.

    Reported-by: Fengguang Wu
    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     

11 Jun, 2013

2 commits

  • Return the error if something went wrong instead of unconditionally
    returning 0.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • As we know, netlink sockets are private resource of
    net namespace, they can communicate with each other
    only when they in the same net namespace. this works
    well until we try to add namespace support for other
    subsystems which use netlink.

    Don't like ipv4 and route table.., it is not suited to
    make these subsytems belong to net namespace, Such as
    audit and crypto subsystems,they are more suitable to
    user namespace.

    So we must have the ability to make the netlink sockets
    in same user namespace can communicate with each other.

    This patch adds a new function pointer "compare" for
    netlink_table, we can decide if the netlink sockets can
    communicate with each other through this netlink_table
    self-defined compare function.

    The behavior isn't changed if we don't provide the compare
    function for netlink_table.

    Signed-off-by: Gao feng
    Acked-by: Serge E. Hallyn
    Signed-off-by: David S. Miller

    Gao feng
     

08 Jun, 2013

1 commit

  • I can hit ENOBUFS in the sendmsg() path with a large batch that is
    composed of many netlink messages. Here that limit is 8 MBytes of
    skbuff data area as kmalloc does not manage to get more than that.

    While discussing atomic rule-set for nftables with Patrick McHardy,
    we decided to put all rule-set updates that need to be applied
    atomically in one single batch to simplify the existing approach.
    However, as explained above, the existing netlink code limits us
    to a maximum of ~20000 rules that fit in one single batch without
    hitting ENOBUFS. iptables does not have such limitation as it is
    using vmalloc.

    This patch adds netlink_alloc_large_skb() which is only used in
    the netlink_sendmsg() path. It uses alloc_skb if the memory
    requested is
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     

05 Jun, 2013

1 commit

  • Eric Dumazet spotted that we have to check skb->head instead
    of skb->data as skb->head points to the beginning of the
    data area of the skbuff. Similarly, we have to initialize the
    skb->head pointer, not skb->data in __alloc_skb_head.

    After this fix, netlink crashes in the release path of the
    sk_buff, so let's fix that as well.

    This bug was introduced in (0ebd0ac net: add function to
    allocate sk_buff head without data area).

    Reported-by: Eric Dumazet
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira
     

02 May, 2013

2 commits

  • Currently, in menuconfig, Netlink's new mmaped IO is the very first
    entry under the ``Networking support'' item and comes even before
    ``Networking options'':

    [ ] Netlink: mmaped IO
    Networking options --->
    ...

    Lets move this into ``Networking options'' under netlink's Kconfig,
    since this might be more appropriate. Introduced by commit ccdfcc398
    (``netlink: mmaped netlink: ring setup'').

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Commit f9c2288837ba072b21dba955f04a4c97eaa77b1e (netlink:
    implement memory mapped recvmsg) increamented skb->users
    ref count twice for a dump op which does not look right.

    Following patch fixes that.

    CC: Patrick McHardy
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

27 Apr, 2013

1 commit

  • 'attrbuf' is malloced in genl_family_rcv_msg() when family->maxattr &&
    family->parallel_ops, thus should be freed before leaving from the error
    handling cases, otherwise it will cause memory leak.

    Introduced by commit def3117493eafd9dfa1f809d861e0031b2cc8a07
    (genl: Allow concurrent genl callbacks.)

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     

25 Apr, 2013

2 commits

  • All genl callbacks are serialized by genl-mutex. This can become
    bottleneck in multi threaded case.
    Following patch adds an parameter to genl_family so that a
    particular family can get concurrent netlink callback without
    genl_lock held.
    New rw-sem is used to protect genl callback from genl family unregister.
    in case of parallel_ops genl-family read-lock is taken for callbacks and
    write lock is taken for register or unregistration for any family.
    In case of locked genl family semaphore and gel-mutex is locked for
    any openration.

    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • Depending of the kernel configuration (CONFIG_UIDGID_STRICT_TYPE_CHECKS), we can
    get the following errors:

    net/netlink/af_netlink.c: In function ‘netlink_queue_mmaped_skb’:
    net/netlink/af_netlink.c:663:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kuid_t’
    net/netlink/af_netlink.c:664:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kgid_t’
    net/netlink/af_netlink.c: In function ‘netlink_ring_set_copied’:
    net/netlink/af_netlink.c:693:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kuid_t’
    net/netlink/af_netlink.c:694:14: error: incompatible types when assigning to type ‘__u32’ from type ‘kgid_t’

    We must use the helpers to get the uid and gid, and also take care of user_ns.

    Fix suggested by Eric W. Biederman .

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     

24 Apr, 2013

2 commits


20 Apr, 2013

10 commits

  • Based on AF_PACKET.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add flow control for memory mapped RX. Since user-space usually doesn't
    invoke recvmsg() when using memory mapped I/O, flow control is performed
    in netlink_poll(). Dumps are allowed to continue if at least half of the
    ring frames are unused.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add support for mmap'ed recvmsg(). To allow the kernel to construct messages
    into the mapped area, a dataless skb is allocated and the data pointer is
    set to point into the ring frame. This means frames will be delivered to
    userspace in order of allocation instead of order of transmission. This
    usually doesn't matter since the order is either not determinable by
    userspace or message creation/transmission is serialized. The only case
    where this can have a visible difference is nfnetlink_queue. Userspace
    can't assume mmap'ed messages have ordered IDs anymore and needs to check
    this if using batched verdicts.

    For non-mapped sockets, nothing changes.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add support for mmap'ed sendmsg() to netlink. Since the kernel validates
    received messages before processing them, the code makes sure userspace
    can't modify the message contents after invoking sendmsg(). To do that
    only a single mapping of the TX ring is allowed to exist and the socket
    must not be shared. If either of these two conditions does not hold, it
    falls back to copying.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add helper functions for looking up mmap'ed frame headers, reading and
    writing their status, allocating skbs with mmap'ed data areas and a poll
    function.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add support for mmap'ed RX and TX ring setup and teardown based on the
    af_packet.c code. The following patches will use this to add the real
    mmap'ed receive and transmit functionality.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • For mmap'ed I/O a netlink specific skb destructor needs to be invoked
    after the final kfree_skb() to clean up state. This doesn't work currently
    since the skb's ownership is transfered to the receiving socket using
    skb_set_owner_r(), which orphans the skb, thereby invoking the destructor
    prematurely.

    Since netlink doesn't account skbs to the originating socket, there's no
    need to orphan the skb. Add a netlink specific skb_set_owner_r() variant
    that does not orphan the skb and use a netlink specific destructor to
    call sock_rfree().

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Netlink doesn't account skbs to the sending socket, so the there's no
    need to orphan the skb before trimming it.

    Removing the skb_orphan() call is required for mmap'ed netlink, which uses
    a netlink specific skb destructor that must not be invoked before the
    final freeing of the skb.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Memory mapped netlink needs to store the receiving userspace socket
    when sending from the kernel to userspace. Rename 'ssk' to 'sk' to
    avoid confusion.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

29 Mar, 2013

1 commit


22 Mar, 2013

2 commits

  • The netlink_diag can be built as a module, just like it's done in
    unix sockets.

    The core dumping message carries the basic info about netlink sockets:
    family, type and protocol, portis, dst_group, dst_portid, state.

    Groups can be received as an optional parameter NETLINK_DIAG_GROUPS.

    Netlink sockets cab be filtered by protocols.

    The socket inode number and cookie is reserved for future per-socket info
    retrieving. The per-protocol filtering is also reserved for future by
    requiring the sdiag_protocol to be zero.

    The file /proc/net/netlink doesn't provide enough information for
    dumping netlink sockets. It doesn't provide dst_group, dst_portid,
    groups above 32.

    v2: fix NETLINK_DIAG_MAX. Now it's equal to the last constant.

    Acked-by: Pavel Emelyanov
    Cc: "David S. Miller"
    Cc: Eric Dumazet
    Cc: Pablo Neira Ayuso
    Cc: "Eric W. Biederman"
    Cc: Gao feng
    Cc: Thomas Graf
    Signed-off-by: Andrey Vagin
    Signed-off-by: David S. Miller

    Andrey Vagin
     
  • Move a few declarations in a header.

    Acked-by: Pavel Emelyanov
    Cc: "David S. Miller"
    Cc: Eric Dumazet
    Cc: Pablo Neira Ayuso
    Cc: "Eric W. Biederman"
    Cc: Gao feng
    Cc: Thomas Graf
    Signed-off-by: Andrey Vagin
    Signed-off-by: David S. Miller

    Andrey Vagin
     

21 Mar, 2013

1 commit


28 Feb, 2013

1 commit

  • I'm not sure why, but the hlist for each entry iterators were conceived

    list_for_each_entry(pos, head, member)

    The hlist ones were greedy and wanted an extra parameter:

    hlist_for_each_entry(tpos, pos, head, member)

    Why did they need an extra pos parameter? I'm not quite sure. Not only
    they don't really need it, it also prevents the iterator from looking
    exactly like the list iterator, which is unfortunate.

    Besides the semantic patch, there was some manual work required:

    - Fix up the actual hlist iterators in linux/list.h
    - Fix up the declaration of other iterators based on the hlist ones.
    - A very small amount of places were using the 'node' parameter, this
    was modified to use 'obj->member' instead.
    - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
    properly, so those had to be fixed up manually.

    The semantic patch which is mostly the work of Peter Senna Tschudin is here:

    @@
    iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

    type T;
    expression a,c,d,e;
    identifier b;
    statement S;
    @@

    -T b;

    [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
    [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
    [akpm@linux-foundation.org: checkpatch fixes]
    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foudnation.org: redo intrusive kvm changes]
    Tested-by: Peter Senna Tschudin
    Acked-by: Paul E. McKenney
    Signed-off-by: Sasha Levin
    Cc: Wu Fengguang
    Cc: Marcelo Tosatti
    Cc: Gleb Natapov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     

27 Feb, 2013

1 commit

  • Pull vfs pile (part one) from Al Viro:
    "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
    locking violations, etc.

    The most visible changes here are death of FS_REVAL_DOT (replaced with
    "has ->d_weak_revalidate()") and a new helper getting from struct file
    to inode. Some bits of preparation to xattr method interface changes.

    Misc patches by various people sent this cycle *and* ocfs2 fixes from
    several cycles ago that should've been upstream right then.

    PS: the next vfs pile will be xattr stuff."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
    saner proc_get_inode() calling conventions
    proc: avoid extra pde_put() in proc_fill_super()
    fs: change return values from -EACCES to -EPERM
    fs/exec.c: make bprm_mm_init() static
    ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
    ocfs2: fix possible use-after-free with AIO
    ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
    get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
    target: writev() on single-element vector is pointless
    export kernel_write(), convert open-coded instances
    fs: encode_fh: return FILEID_INVALID if invalid fid_type
    kill f_vfsmnt
    vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
    nfsd: handle vfs_getattr errors in acl protocol
    switch vfs_getattr() to struct path
    default SET_PERSONALITY() in linux/elf.h
    ceph: prepopulate inodes only when request is aborted
    d_hash_and_lookup(): export, switch open-coded instances
    9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
    9p: split dropping the acls from v9fs_set_create_acl()
    ...

    Linus Torvalds
     

23 Feb, 2013

1 commit


19 Feb, 2013

2 commits

  • proc_net_remove is only used to remove proc entries
    that under /proc/net,it's not a general function for
    removing proc entries of netns. if we want to remove
    some proc entries which under /proc/net/stat/, we still
    need to call remove_proc_entry.

    this patch use remove_proc_entry to replace proc_net_remove.
    we can remove proc_net_remove after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • Right now, some modules such as bonding use proc_create
    to create proc entries under /proc/net/, and other modules
    such as ipv4 use proc_net_fops_create.

    It looks a little chaos.this patch changes all of
    proc_net_fops_create to proc_create. we can remove
    proc_net_fops_create after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     

10 Jan, 2013

1 commit


18 Dec, 2012

1 commit