12 Oct, 2006

2 commits

  • Dave Jones wrote:
    > sfuzz D 724EF62A 2828 28717 28691 (NOTLB)
    > cd69fe98 00000082 0000012d 724ef62a 0001971a 00000010 00000007 df6d22b0
    > dfd81080 725bbc5e 0001971a 000cc634 00000001 df6d23bc c140e260 00000202
    > de1d5ba0 cd69fea0 de1d5ba0 00000000 00000000 de1d5b60 de1d5b8c de1d5ba0
    > Call Trace:
    > [] lock_sock+0x75/0xa6
    > [] dn_getname+0x18/0x5f [decnet]
    > [] sys_getsockname+0x5c/0xb0
    > [] sys_socketcall+0xef/0x261
    > [] syscall_call+0x7/0xb
    > DWARF2 unwinder stuck at syscall_call+0x7/0xb
    >
    > I wonder if the plethora of lockdep related changes inadvertantly broke something?

    Looks like unbalanced locking.

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

    Patrick McHardy
     
  • They are not necessarily initialized to zero by the compiler,
    for example when using run-time initializers of automatic
    on-stack variables.

    Noticed by Eric Dumazet and Patrick McHardy.

    Signed-off-by: David S. Miller

    David S. Miller
     

23 Sep, 2006

15 commits


03 Aug, 2006

1 commit

  • This patch fixes a bug in the DECnet routing code where we were
    selecting a loopback device in preference to an outward facing device
    even when the destination was known non-local. This patch should fix
    the problem.

    Signed-off-by: Patrick Caulfield
    Signed-off-by: Steven Whitehouse
    Signed-off-by: David S. Miller

    Patrick Caulfield
     

22 Jul, 2006

1 commit


09 Jul, 2006

1 commit


01 Jul, 2006

1 commit


30 Jun, 2006

1 commit

  • This patch encapsulates the usage of eff_cap (in netlink_skb_params) within
    the security framework by extending security_netlink_recv to include a required
    capability parameter and converting all direct usage of eff_caps outside
    of the lsm modules to use the interface. It also updates the SELinux
    implementation of the security_netlink_send and security_netlink_recv
    hooks to take advantage of the sid in the netlink_skb_params struct.
    This also enables SELinux to perform auditing of netlink capability checks.
    Please apply, for 2.6.18 if possible.

    Signed-off-by: Darrel Goeddel
    Signed-off-by: Stephen Smalley
    Acked-by: James Morris
    Signed-off-by: David S. Miller

    Darrel Goeddel
     

18 Jun, 2006

1 commit

  • The linearisation operation doesn't need to be super-optimised. So we can
    replace __skb_linearize with __pskb_pull_tail which does the same thing but
    is more general.

    Also, most users of skb_linearize end up testing whether the skb is linear
    or not so it helps to make skb_linearize do just that.

    Some callers of skb_linearize also use it to copy cloned data, so it's
    useful to have a new function skb_linearize_cow to copy the data if it's
    either non-linear or cloned.

    Last but not least, I've removed the gfp argument since nobody uses it
    anymore. If it's ever needed we can easily add it back.

    Misc bugs fixed by this patch:

    * via-velocity error handling (also, no SG => no frags)

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

04 May, 2006

1 commit

  • This patch fixes hello messages sent when a node is a level 1
    router. Slightly contrary to the spec (maybe) VMS ignores hello
    messages that do not name level2 routers that it also knows about.

    So, here we simply name all the routers that the node knows about
    rather just other level1 routers. (I hope the patch is clearer than
    the description. sorry).

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

    Patrick Caulfield
     

30 Mar, 2006

1 commit

  • From: Patrick Caulfield

    This patch fixes a bug in the reference counting for the default
    DECnet device.

    If the device is changed, then the new device had its refcount
    decremented rather than the old one!

    Signed-off-by: David S. Miller

    Patrick Caulfield
     

29 Mar, 2006

1 commit

  • Every netfilter module uses `init' for its module_init() function and
    `fini' or `cleanup' for its module_exit() function.

    Problem is, this creates uninformative initcall_debug output and makes
    ctags rather useless.

    So go through and rename them all to $(filename)_init and
    $(filename)_fini.

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

28 Mar, 2006

1 commit

  • The kernel's implementation of notifier chains is unsafe. There is no
    protection against entries being added to or removed from a chain while the
    chain is in use. The issues were discussed in this thread:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2

    We noticed that notifier chains in the kernel fall into two basic usage
    classes:

    "Blocking" chains are always called from a process context
    and the callout routines are allowed to sleep;

    "Atomic" chains can be called from an atomic context and
    the callout routines are not allowed to sleep.

    We decided to codify this distinction and make it part of the API. Therefore
    this set of patches introduces three new, parallel APIs: one for blocking
    notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
    really just the old API under a new name). New kinds of data structures are
    used for the heads of the chains, and new routines are defined for
    registration, unregistration, and calling a chain. The three APIs are
    explained in include/linux/notifier.h and their implementation is in
    kernel/sys.c.

    With atomic and blocking chains, the implementation guarantees that the chain
    links will not be corrupted and that chain callers will not get messed up by
    entries being added or removed. For raw chains the implementation provides no
    guarantees at all; users of this API must provide their own protections. (The
    idea was that situations may come up where the assumptions of the atomic and
    blocking APIs are not appropriate, so it should be possible for users to
    handle these things in their own way.)

    There are some limitations, which should not be too hard to live with. For
    atomic/blocking chains, registration and unregistration must always be done in
    a process context since the chain is protected by a mutex/rwsem. Also, a
    callout routine for a non-raw chain must not try to register or unregister
    entries on its own chain. (This did happen in a couple of places and the code
    had to be changed to avoid it.)

    Since atomic chains may be called from within an NMI handler, they cannot use
    spinlocks for synchronization. Instead we use RCU. The overhead falls almost
    entirely in the unregister routine, which is okay since unregistration is much
    less frequent that calling a chain.

    Here is the list of chains that we adjusted and their classifications. None
    of them use the raw API, so for the moment it is only a placeholder.

    ATOMIC CHAINS
    -------------
    arch/i386/kernel/traps.c: i386die_chain
    arch/ia64/kernel/traps.c: ia64die_chain
    arch/powerpc/kernel/traps.c: powerpc_die_chain
    arch/sparc64/kernel/traps.c: sparc64die_chain
    arch/x86_64/kernel/traps.c: die_chain
    drivers/char/ipmi/ipmi_si_intf.c: xaction_notifier_list
    kernel/panic.c: panic_notifier_list
    kernel/profile.c: task_free_notifier
    net/bluetooth/hci_core.c: hci_notifier
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_chain
    net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_expect_chain
    net/ipv6/addrconf.c: inet6addr_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_chain
    net/netfilter/nf_conntrack_core.c: nf_conntrack_expect_chain
    net/netlink/af_netlink.c: netlink_chain

    BLOCKING CHAINS
    ---------------
    arch/powerpc/platforms/pseries/reconfig.c: pSeries_reconfig_chain
    arch/s390/kernel/process.c: idle_chain
    arch/x86_64/kernel/process.c idle_notifier
    drivers/base/memory.c: memory_chain
    drivers/cpufreq/cpufreq.c cpufreq_policy_notifier_list
    drivers/cpufreq/cpufreq.c cpufreq_transition_notifier_list
    drivers/macintosh/adb.c: adb_client_list
    drivers/macintosh/via-pmu.c sleep_notifier_list
    drivers/macintosh/via-pmu68k.c sleep_notifier_list
    drivers/macintosh/windfarm_core.c wf_client_list
    drivers/usb/core/notify.c usb_notifier_list
    drivers/video/fbmem.c fb_notifier_list
    kernel/cpu.c cpu_chain
    kernel/module.c module_notify_list
    kernel/profile.c munmap_notifier
    kernel/profile.c task_exit_notifier
    kernel/sys.c reboot_notifier_list
    net/core/dev.c netdev_chain
    net/decnet/dn_dev.c: dnaddr_chain
    net/ipv4/devinet.c: inetaddr_chain

    It's possible that some of these classifications are wrong. If they are,
    please let us know or submit a patch to fix them. Note that any chain that
    gets called very frequently should be atomic, because the rwsem read-locking
    used for blocking chains is very likely to incur cache misses on SMP systems.
    (However, if the chain's callout routines may sleep then the chain cannot be
    atomic.)

    The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
    material written by Keith Owens and suggestions from Paul McKenney and Andrew
    Morton.

    [jes@sgi.com: restructure the notifier chain initialization macros]
    Signed-off-by: Alan Stern
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Jes Sorensen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     

21 Mar, 2006

4 commits

  • The Coverity checker noted this inconsequent NULL checking in
    dnrt_drop().

    Since all callers ensure that NULL isn't passed, we can simply remove
    the check.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     
  • As per Robert Olsson's patch for ipv4, this is the DECnet
    version to keep the code "in step". It changes the list
    of rules to use RCU rather than an rwlock.

    Inspired-by: Robert Olsson
    Signed-off-by: Steven Whitehouse
    Signed-off-by: Patrick Caulfield
    Signed-off-by: David S. Miller

    Steven Whitehouse
     
  • This patch means that 64bit kernel/32bit userland platforms will now
    work correctly with DECnet.

    Signed-off-by: Patrick Caulfield
    Signed-off-by: Steven Whitehouse
    Signed-off-by: David S. Miller

    Patrick Caulfield
     
  • The typedef for dn_address has been removed in favour of using __le16
    or __u16 directly as appropriate. All the DECnet header files are
    updated accordingly.

    The byte ordering of dn_eth2dn() and dn_dn2eth() are both changed
    since just about all their callers wanted network order rather than
    host order, so the conversion is now done in the functions themselves.

    Several missed endianess conversions have been picked up during the
    conversion process. The nh_gw field in struct dn_fib_info has been
    changed from a 32 bit field to 16 bits as it ought to be.

    One or two cases of using htons rather than dn_htons in the routing
    code have been found and fixed.

    There are still a few warnings to fix, but this patch deals with the
    important cases.

    Signed-off-by: Steven Whitehouse
    Signed-off-by: Patrick Caulfield
    Signed-off-by: David S. Miller

    Steven Whitehouse
     

12 Jan, 2006

1 commit


11 Jan, 2006

1 commit


04 Jan, 2006

4 commits

  • The attached patch makes DECnet routing only use routers from the same
    area - rather than the highest rated router seen.

    In theory there should not be an out-of-area router on a local network
    but some networks are bridged rather than properly routed. VMS seems
    to behave similarly: if I bring up a VMS node with no router then it
    can't see anything else on the global network.

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

    Patrick Caulfield
     
  • Currently all network protocols need to call dev_ioctl as the default
    fallback in their ioctl implementations. This patch adds a fallback
    to dev_ioctl to sock_ioctl if the protocol returned -ENOIOCTLCMD.
    This way all the procotol ioctl handlers can be simplified and we don't
    need to export dev_ioctl.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     
  • Its common enough to to justify that, TCP still can't use it as it has the
    prequeueing stuff, still to be made generic in the not so distant future :-)

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     
  • I noticed that some of 'struct proto_ops' used in the kernel may share
    a cache line used by locks or other heavily modified data. (default
    linker alignement is 32 bytes, and L1_CACHE_LINE is 64 or 128 at
    least)

    This patch makes sure a 'struct proto_ops' can be declared as const,
    so that all cpus can share all parts of it without false sharing.

    This is not mandatory : a driver can still use a read/write structure
    if it needs to (and eventually a __read_mostly)

    I made a global stubstitute to change all existing occurences to make
    them const.

    This should reduce the possibility of false sharing on SMP, and
    speedup some socket system calls.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

06 Dec, 2005

1 commit


12 Nov, 2005

1 commit

  • Currently recvmsg generates SIGPIPE whereas sendmsg does not; for the
    other stacks it seems to be the other way round!

    It also fixes the bug where reading from a socket whose peer has shutdown
    returned -EINVAL rather than 0.

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

    Patrick Caulfield
     

09 Nov, 2005

1 commit

  • From: Jesper Juhl

    This is the net/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in net/.

    Signed-off-by: Jesper Juhl
    Cc: "David S. Miller"
    Cc: Arnaldo Carvalho de Melo
    Acked-by: Marcel Holtmann
    Acked-by: YOSHIFUJI Hideaki
    Signed-off-by: Andrew Morton

    Jesper Juhl