05 Nov, 2011

1 commit

  • * 'nfs-for-3.2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (25 commits)
    nfs: set vs_hidden on nfs4_callback_version4 (try #2)
    pnfs-obj: Support for RAID5 read-4-write interface.
    pnfs-obj: move to ore 03: Remove old raid engine
    pnfs-obj: move to ore 02: move to ORE
    pnfs-obj: move to ore 01: ore_layout & ore_components
    pnfs-obj: Rename objlayout_io_state => objlayout_io_res
    pnfs-obj: Get rid of objlayout_{alloc,free}_io_state
    pnfs-obj: Return PNFS_NOT_ATTEMPTED in case of read/write_pagelist
    pnfs-obj: Remove redundant EOF from objlayout_io_state
    nfs: Remove unused variable from write.c
    nfs: Fix unused variable warning from file.c
    NFS: Remove no-op less-than-zero checks on unsigned variables.
    NFS: Clean up nfs4_xdr_dec_secinfo()
    NFS: Fix documenting comment for nfs_create_request()
    NFS4: fix cb_recallany decode error
    nfs4: serialize layoutcommit
    SUNRPC: remove rpcbind clients destruction on module cleanup
    SUNRPC: remove rpcbind clients creation during service registering
    NFSd: call svc rpcbind cleanup explicitly
    SUNRPC: cleanup service destruction
    ...

    Linus Torvalds
     

04 Nov, 2011

4 commits

  • This popped some compiler errors due to mismatched prototypes. Just
    remove most manual inlines, the compiler should be able to figure out
    what makes sense to inline and not.

    net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
    net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
    net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
    net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
    net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
    net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
    net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
    net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here

    Signed-off-by: Olof Johansson
    Cc: Chetan Loke
    Signed-off-by: David S. Miller

    Olof Johansson
     
  • Commit 87fb4b7b533073eeeaed0b6bf7c2328995f6c075 (net: more
    accurate skb truesize) changed the alignment of size. This
    can cause problems at least on some machines with NFS root:

    Unhandled fault: alignment exception (0x801) at 0xc183a43a
    Internal error: : 801 [#1] PREEMPT
    Modules linked in:
    CPU: 0 Not tainted (3.1.0-08784-g5eeee4a #733)
    pc : [] lr : [] psr: 60000013
    sp : c180fef8 ip : 00000000 fp : c181f580
    r10: 00000000 r9 : c044b28c r8 : 00000001
    r7 : c183a3a0 r6 : c1835be0 r5 : c183a412 r4 : 000001f2
    r3 : 00000000 r2 : 00000000 r1 : ffffffe6 r0 : c183a43a
    Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 0005317f Table: 10004000 DAC: 00000017
    Process swapper (pid: 1, stack limit = 0xc180e270)
    Stack: (0xc180fef8 to 0xc1810000)
    fee0: 00000024 00000000
    ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
    ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
    ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
    ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
    ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
    ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
    ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
    ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)

    Here PC is at __alloc_skb and &shinfo->dataref is unaligned because
    skb->end can be unaligned without this patch.

    As explained by Eric Dumazet , this happens
    only with SLOB, and not with SLAB or SLUB:

    * Eric Dumazet [111102 15:56]:
    >
    > Your patch is absolutely needed, I completely forgot about SLOB :(
    >
    > since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
    > power of two.
    >
    > [ 60.305763] malloc(size=385)->ffff880112c11e38 ksize=386 -> nsize=2
    > [ 60.305921] malloc(size=385)->ffff88007c92ce28 ksize=386 -> nsize=2
    > [ 60.306898] malloc(size=656)->ffff88007c44ad28 ksize=656 -> nsize=272
    > [ 60.325385] malloc(size=656)->ffff88007c575868 ksize=656 -> nsize=272
    > [ 60.325531] malloc(size=656)->ffff88011c777230 ksize=656 -> nsize=272
    > [ 60.325701] malloc(size=656)->ffff880114011008 ksize=656 -> nsize=272
    > [ 60.346716] malloc(size=385)->ffff880114142008 ksize=386 -> nsize=2
    > [ 60.346900] malloc(size=385)->ffff88011c777690 ksize=386 -> nsize=2

    Signed-off-by: Tony Lindgren
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tony Lindgren
     
  • Simon Kirby reported lockdep warnings and following messages :

    [104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    [104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    Problem comes from commit 0e734419
    (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)

    If inet_csk_route_child_sock() returns NULL, we should release socket
    lock before freeing it.

    Another lock imbalance exists if __inet_inherit_port() returns an error
    since commit 093d282321da ( tproxy: fix hash locking issue when using
    port redirection in __inet_inherit_port()) a backport is also needed for
    >= 2.6.37 kernels.

    Reported-by: Simon Kirby
    Signed-off-by: Eric Dumazet
    Tested-by: Eric Dumazet
    CC: Balazs Scheidler
    CC: KOVACS Krisztian
    Reviewed-by: Thomas Gleixner
    Tested-by: Simon Kirby
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Misha Labjuk reported panics occurring in l2tp_recv_dequeue()

    If we release reorder_q.lock, we must not keep a dangling pointer (tmp),
    since another thread could manipulate reorder_q.

    Instead we must restart the scan at beginning of list.

    Reported-by: Misha Labjuk
    Tested-by: Misha Labjuk
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

03 Nov, 2011

1 commit


02 Nov, 2011

5 commits

  • udp_queue_rcv_skb() has a possible race in encap_rcv handling, since
    this pointer can be changed anytime.

    We should use ACCESS_ONCE() to close the race.

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

    Eric Dumazet
     
  • commit cb101ed2 in 3.0 introduced a bug in x25_recvmsg()
    When passed bogus junk from userspace, x25->neighbour can be NULL,
    as shown in this oops..

    BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
    IP: [] x25_recvmsg+0x4d/0x280 [x25]
    PGD 1015f3067 PUD 105072067 PMD 0
    Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    CPU 0
    Pid: 27928, comm: iknowthis Not tainted 3.1.0+ #2 Gigabyte Technology Co., Ltd. GA-MA78GM-S2H/GA-MA78GM-S2H
    RIP: 0010:[] [] x25_recvmsg+0x4d/0x280 [x25]
    RSP: 0018:ffff88010c0b7cc8 EFLAGS: 00010282
    RAX: 0000000000000000 RBX: ffff88010c0b7d78 RCX: 0000000000000c02
    RDX: ffff88010c0b7d78 RSI: ffff88011c93dc00 RDI: ffff880103f667b0
    RBP: ffff88010c0b7d18 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: ffff880103f667b0
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 00007f479ce7f700(0000) GS:ffff88012a600000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 000000000000001c CR3: 000000010529e000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process iknowthis (pid: 27928, threadinfo ffff88010c0b6000, task ffff880103faa4f0)
    Stack:
    0000000000000c02 0000000000000c02 ffff88010c0b7d18 ffffff958153cb37
    ffffffff8153cb60 0000000000000c02 ffff88011c93dc00 0000000000000000
    0000000000000c02 ffff88010c0b7e10 ffff88010c0b7de8 ffffffff815372c2
    Call Trace:
    [] ? sock_update_classid+0xb0/0x180
    [] sock_aio_read.part.10+0x142/0x150
    [] ? inode_has_perm+0x62/0xa0
    [] sock_aio_read+0x2d/0x40
    [] do_sync_read+0xd2/0x110
    [] ? security_file_permission+0x96/0xb0
    [] ? rw_verify_area+0x61/0x100
    [] vfs_read+0x16d/0x180
    [] sys_read+0x4d/0x90
    [] system_call_fastpath+0x16/0x1b
    Code: 8b 66 20 4c 8b 32 48 89 d3 48 89 4d b8 45 89 c7 c7 45 cc 95 ff ff ff 4d 85 e4 0f 84 ed 01 00 00 49 8b 84 24 18 05 00 00 4c 89 e7
    78 1c 01 45 19 ed 31 f6 e8 d5 37 ff e0 41 0f b6 44 24 0e 41

    Signed-off-by: Dave Jones
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Dave Jones
     
  • the tcp and udp code creates a set of struct file_operations at runtime
    while it can also be done at compile time, with the added benefit of then
    having these file operations be const.

    the trickiest part was to get the "THIS_MODULE" reference right; the naive
    method of declaring a struct in the place of registration would not work
    for this reason.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: David S. Miller

    Arjan van de Ven
     
  • When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC
    flags are cleared or set on the underlying interface. So, if these flags
    are changed on a vlan interface that is not up, the flags underlying
    interface might be set or cleared twice.

    Only propagating flag changes when a device is up makes sure this does
    not happen. It also makes sure that an underlying device is not set to
    promiscuous or allmulti mode for a vlan device that is down.

    Signed-off-by: Matthijs Kooijman
    Signed-off-by: David S. Miller

    Matthijs Kooijman
     
  • Whatever situations make this state legitimate when SMP
    also would be legitimate when !SMP and f.e. preemption is
    enabled.

    This is dubious enough that we should just delete it entirely. If we
    want to add debugging for neigh timer races, better more thorough
    mechanisms are needed.

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Nov, 2011

10 commits

  • commit f15850861860636c905b33a9a5be3dcbc2b0d56a
    (netfilter: nfnetlink_queue: return error number to caller)
    erronously assigns the return value of nf_queue() to the "ret" value.

    This can cause bogus return values if we encounter QUEUE verdict
    when bypassing is enabled, the listener does not exist and the
    next hook returns NF_STOLEN.

    In this case nf_hook_slow returned -ESRCH instead of 0.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • Several callers (h323 conntrack, xt_addrtype) assume that the
    returned **dst only needs to be released if the function returns 0.

    This is true for the ipv4 implementation, but not for the ipv6 one.

    Instead of changing the users, change the ipv6 implementation
    to behave like the ipv4 version by only providing the dst_entry result
    in the success case.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • This is to address the following warning during compilation time:

    net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_leave’:
    net/netfilter/ipvs/ip_vs_core.c:532: warning: unused variable ‘cs’

    This variable is indeed no longer in use.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman

    Krzysztof Wilczynski
     
  • Site specific OOM messages are duplications of a generic MM
    out of memory message and aren't really useful, so just
    delete them.

    Signed-off-by: Joe Perches
    Signed-off-by: Patrick McHardy
    Signed-off-by: Pablo Neira Ayuso

    Joe Perches
     
  • ipvs is not used in ip_vs_genl_set_cmd() or ip_vs_genl_get_cmd()

    Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • This is to expose "ports" parameter via sysfs so it can be read
    at any time in order to determine what port or ports were passed
    to the module at the point when it was loaded.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Krzysztof Wilczynski
     
  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
    vlan: allow nested vlan_do_receive()
    ipv6: fix route lookup in addrconf_prefix_rcv()
    bonding: eliminate bond_close race conditions
    qlcnic: fix beacon and LED test.
    qlcnic: Updated License file
    qlcnic: updated reset sequence
    qlcnic: reset loopback mode if promiscous mode setting fails.
    qlcnic: skip IDC ack check in fw reset path.
    i825xx: Fix incorrect dependency for BVME6000_NET
    ipv6: fix route error binding peer in func icmp6_dst_alloc
    ipv6: fix error propagation in ip6_ufo_append_data()
    stmmac: update normal descriptor structure (v2)
    stmmac: fix NULL pointer dereference in capabilities fixup (v2)
    stmmac: fix a bug while checking the HW cap reg (v2)
    be2net: Changing MAC Address of a VF was broken.
    be2net: Refactored be_cmds.c file.
    bnx2x: update driver version to 1.70.30-0
    bnx2x: use FW 7.0.29.0
    bnx2x: Enable changing speed when port type is PORT_DA
    bnx2x: Fix 54618se LED behavior
    ...

    Linus Torvalds
     

30 Oct, 2011

3 commits


29 Oct, 2011

2 commits

  • * 'for-linus' of git://ceph.newdream.net/git/ceph-client:
    libceph: fix double-free of page vector
    ceph: fix 32-bit ino numbers
    libceph: force resend of osd requests if we skip an osdmap
    ceph: use kernel DNS resolver
    ceph: fix ceph_monc_init memory leak
    ceph: let the set_layout ioctl set single traits
    Revert "ceph: don't truncate dirty pages in invalidate work thread"
    ceph: replace leading spaces with tabs
    libceph: warn on msg allocation failures
    libceph: don't complain on msgpool alloc failures
    libceph: always preallocate mon connection
    libceph: create messenger with client
    ceph: document ioctls
    ceph: implement (optional) max read size
    ceph: rename rsize -> rasize
    ceph: make readpages fully async

    Linus Torvalds
     
  • in func icmp6_dst_alloc,dst_metric_set call ipv6_cow_metrics to set metric.
    ipv6_cow_metrics may will call rt6_bind_peer to set rt6_info->rt6i_peer.
    So,we should move ipv6_addr_copy before dst_metric_set to make sure rt6_bind_peer success.

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

    Gao feng
     

28 Oct, 2011

1 commit


27 Oct, 2011

1 commit

  • commit 66b13d99d96a (ipv4: tcp: fix TOS value in ACK messages sent from
    TIME_WAIT) fixed IPv4 only.

    This part is for the IPv6 side, adding a tclass param to ip6_xmit()

    We alias tw_tclass and tw_tos, if socket family is INET6.

    [ if sockets is ipv4-mapped, only IP_TOS socket option is used to fill
    TOS field, TCLASS is not taken into account ]

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

    Eric Dumazet
     

26 Oct, 2011

12 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    caif: Fix BUG() with network namespaces
    net: make bonding slaves honour master's skb->priority
    net: Unlock sock before calling sk_free()

    Linus Torvalds
     
  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
    TTY: serial_core: Fix crash if DCD drop during suspend
    tty/serial: atmel_serial: bootconsole removed from auto-enumerates
    Revert "TTY: call tty_driver_lookup_tty unconditionally"
    tty/serial: atmel_serial: add device tree support
    tty/serial: atmel_serial: auto-enumerate ports
    tty/serial: atmel_serial: whitespace and braces modifications
    tty/serial: atmel_serial: change platform_data variable name
    tty/serial: RS485 bindings for device tree
    TTY: call tty_driver_lookup_tty unconditionally
    TTY: pty, release tty in all ptmx_open fail paths
    TTY: make tty_add_file non-failing
    TTY: drop driver reference in tty_open fail path
    8250_pci: Fix kernel panic when pch_uart is disabled
    h8300: drivers/serial/Kconfig was moved
    parport_pc: release IO region properly if unsupported ITE887x card is found
    tty: Support compat_ioctl get/set termios_locked
    hvc_console: display printk messages on console.
    TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
    tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
    tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
    ...

    Fix up Conflicts in:
    - drivers/tty/serial/8250_pci.c
    Trivial conflict with removed duplicate device ID
    - drivers/tty/serial/atmel_serial.c
    Annoying silly conflict between "specify the port num via
    platform_data" and other changes to atmel_console_init

    Linus Torvalds
     
  • * 'for-linus' of git://github.com/ericvh/linux:
    9p: fix 9p.txt to advertise msize instead of maxdata
    net/9p: Convert net/9p protocol dumps to tracepoints
    fs/9p: change an int to unsigned int
    fs/9p: Cleanup option parsing in 9p
    9p: move dereference after NULL check
    fs/9p: inode file operation is properly initialized init_special_inode
    fs/9p: Update zero-copy implementation in 9p

    Linus Torvalds
     
  • The caif code will register its own pernet_operations, and then register
    a netdevice_notifier. Each time the netdevice_notifier is triggered,
    it'll do some stuff... including a lookup of its own pernet stuff with
    net_generic().

    If the net_generic() call ever returns NULL, the caif code will BUG().
    That doesn't seem *so* unreasonable, I suppose — it does seem like it
    should never happen.

    However, it *does* happen. When we clone a network namespace,
    setup_net() runs through all the pernet_operations one at a time. It
    gets to loopback before it gets to caif. And loopback_net_init()
    registers a netdevice... while caif hasn't been initialised. So the caif
    netdevice notifier triggers, and immediately goes BUG().

    We could imagine a complex and overengineered solution to this generic
    class of problems, but this patch takes the simple approach. It just
    makes caif_device_notify() *not* go looking for its pernet data
    structures if the device it's being notified about isn't a caif device
    in the first place.

    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    David Woodhouse
     
  • Signed-off-by: Thomas Gleixner
    Signed-off-by: David S. Miller

    Thomas Gleixner
     
  • If we skip over one or more map epochs, we need to resend all osd requests
    because it is possible they remapped to other servers and then back.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • Change ceph_parse_ips to take either names given as
    IP addresses or standard hostnames (e.g. localhost).
    The DNS lookup is done using the dns_resolver facility
    similar to its use in AFS, NFS, and CIFS.

    This patch defines CONFIG_CEPH_LIB_USE_DNS_RESOLVER
    that controls if this feature is on or off.

    Signed-off-by: Noah Watkins
    Signed-off-by: Sage Weil

    Noah Watkins
     
  • failure clean up does not consider ceph_auth_init.

    Signed-off-by: Noah Watkins
    Signed-off-by: Sage Weil

    Noah Watkins
     
  • Any non-masked msg allocation failure should generate a warning and stack
    trace to the console. All of these need to eventually be replaced by
    safe preallocation or msgpools.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • The pool allocation failures are masked by the pool; there is no need to
    spam the console about them. (That's the whole point of having the pool
    in the first place.)

    Mark msg allocations whose failure is safely handled as such.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • Allocate the mon connection on init. We already reuse it across
    reconnects. Remove now unnecessary (and incomplete) NULL checks.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • This simplifies the init/shutdown paths, and makes client->msgr available
    during the rest of the setup process.

    Signed-off-by: Sage Weil

    Sage Weil