1. 27 9月, 2009 4 次提交
  2. 26 9月, 2009 1 次提交
  3. 25 9月, 2009 8 次提交
  4. 24 9月, 2009 4 次提交
    • A
      sysctl: remove "struct file *" argument of ->proc_handler · 8d65af78
      Alexey Dobriyan 提交于
      It's unused.
      
      It isn't needed -- read or write flag is already passed and sysctl
      shouldn't care about the rest.
      
      It _was_ used in two places at arch/frv for some reason.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d65af78
    • A
      headers: utsname.h redux · 2bcd57ab
      Alexey Dobriyan 提交于
      * remove asm/atomic.h inclusion from linux/utsname.h --
         not needed after kref conversion
       * remove linux/utsname.h inclusion from files which do not need it
      
      NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
      due to some personality stuff it _is_ needed -- cowardly leave ELF-related
      headers and files alone.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2bcd57ab
    • R
      sunrpc/rpc_pipe: fix kernel-doc notation · 4111d4fd
      Randy Dunlap 提交于
      Fix kernel-doc notation (& warnings) in sunrpc/rpc_pipe.c.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4111d4fd
    • N
      NFS/RPC: fix problems with reestablish_timeout and related code. · 61d0a8e6
      Neil Brown 提交于
      
      [[resending with correct cc:  - "vfs.kernel.org" just isn't right!]]
      
      xprt->reestablish_timeout is used to cause TCP connection attempts to
      back off if the connection fails so as not to hammer the network,
      but to still allow immediate connections when there is no reason to
      believe there is a problem.
      
      It is not used for the first connection (when transport->sock is NULL)
      but only on reconnects.
      
      It is currently set:
      
       a/ to 0 when xs_tcp_state_change finds a state of TCP_FIN_WAIT1
          on the assumption that the client has closed the connection
          so the reconnect should be immediate when needed.
       b/ to at least XS_TCP_INIT_REEST_TO when xs_tcp_state_change
          detects TCP_CLOSING or TCP_CLOSE_WAIT on the assumption that the
          server closed the connection so a small delay at least is
          required.
       c/ as above when xs_tcp_state_change detects TCP_SYN_SENT, so that
          it is never 0 while a connection has been attempted, else
          the doubling will produce 0 and there will be no backoff.
       d/ to double is value (up to a limit) when delaying a connection,
          thus providing exponential backoff and
       e/ to XS_TCP_INIT_REEST_TO in xs_setup_tcp as simple initialisation.
      
      So you can see it is highly dependant on xs_tcp_state_change being
      called as expected.  However experimental evidence shows that
      xs_tcp_state_change does not see all state changes.
      ("rpcdebug -m rpc trans" can help show what actually happens).
      
      Results show:
       TCP_ESTABLISHED is reported when a connection is made.  TCP_SYN_SENT
       is never reported, so rule 'c' above is never effective.
      
       When the server closes the connection, TCP_CLOSE_WAIT and
       TCP_LAST_ACK *might* be reported, and TCP_CLOSE is always
       reported.  This rule 'b' above will sometimes be effective, but
       not reliably.
      
       When the client closes the connection, it used to result in
       TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_CLOSE.  However since commit
       f75e6745 (SUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on
       reconnect) we don't see *any* events on client-close.  I think this
       is because xs_restore_old_callbacks is called to disconnect
       xs_tcp_state_change before the socket is closed.
       In any case, rule 'a' no longer applies.
      
      So all that is left are rule d, which successfully doubles the
      timeout which is never rest, and rule e which initialises the timeout.
      
      Even if the rules worked as expected, there would be a problem because
      a successful connection does not reset the timeout, so a sequence
      of events where the server closes the connection (e.g. during failover
      testing) will cause longer and longer timeouts with no good reason.
      
      This patch:
      
       - sets reestablish_timeout to 0 in xs_close thus effecting rule 'a'
       - sets it to 0 in xs_tcp_data_ready to ensure that a successful
         connection resets the timeout
       - sets it to at least XS_TCP_INIT_REEST_TO after it is doubled,
         thus effecting rule c
      
      I have not reimplemented rule b and the new version of rule c
      seems sufficient.
      
      I suspect other code in xs_tcp_data_ready needs to be revised as well.
      For example I don't think connect_cookie is being incremented as often
      as it should be.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      61d0a8e6
  5. 23 9月, 2009 12 次提交
  6. 22 9月, 2009 2 次提交
  7. 21 9月, 2009 2 次提交
  8. 19 9月, 2009 1 次提交
  9. 18 9月, 2009 3 次提交
  10. 17 9月, 2009 3 次提交
    • J
      HID: consolidate connect and disconnect into core code · c4c259bc
      Jiri Kosina 提交于
      HID core registers input, hidraw and hiddev devices, but leaves
      unregistering it up to the individual driver, which is not really nice.
      Let's move all the logic to the core.
      Reported-by: NMarcel Holtmann <marcel@holtmann.org>
      Reported-by: NBrian Rogers <brian@xyzw.org>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c4c259bc
    • H
      af_iucv: fix race when queueing skbs on the backlog queue · bf95d20f
      Hendrik Brueckner 提交于
      iucv_sock_recvmsg() and iucv_process_message()/iucv_fragment_skb race
      for dequeuing an skb from the backlog queue.
      
      If iucv_sock_recvmsg() dequeues first, iucv_process_message() calls
      sock_queue_rcv_skb() with an skb that is NULL.
      
      This results in the following kernel panic:
      
      <1>Unable to handle kernel pointer dereference at virtual kernel address (null)
      <4>Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      <4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
      <4>CPU: 0 Not tainted 2.6.30 #4
      <4>Process client-iucv (pid: 4787, task: 0000000034e75940, ksp: 00000000353e3710)
      <4>Krnl PSW : 0704000180000000 000000000043ebca (sock_queue_rcv_skb+0x7a/0x138)
      <4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
      <4>Krnl GPRS: 0052900000000000 000003e0016e0fe8 0000000000000000 0000000000000000
      <4>           000000000043eba8 0000000000000002 0000000000000001 00000000341aa7f0
      <4>           0000000000000000 0000000000007800 0000000000000000 0000000000000000
      <4>           00000000341aa7f0 0000000000594650 000000000043eba8 000000003fc2fb28
      <4>Krnl Code: 000000000043ebbe: a7840006            brc     8,43ebca
      <4>           000000000043ebc2: 5930c23c            c       %r3,572(%r12)
      <4>           000000000043ebc6: a724004c            brc     2,43ec5e
      <4>          >000000000043ebca: e3c0b0100024        stg     %r12,16(%r11)
      <4>           000000000043ebd0: a7190000            lghi    %r1,0
      <4>           000000000043ebd4: e310b0200024        stg     %r1,32(%r11)
      <4>           000000000043ebda: c010ffffdce9        larl    %r1,43a5ac
      <4>           000000000043ebe0: e310b0800024        stg     %r1,128(%r11)
      <4>Call Trace:
      <4>([<000000000043eba8>] sock_queue_rcv_skb+0x58/0x138)
      <4> [<000003e0016bcf2a>] iucv_process_message+0x112/0x3cc [af_iucv]
      <4> [<000003e0016bd3d4>] iucv_callback_rx+0x1f0/0x274 [af_iucv]
      <4> [<000000000053a21a>] iucv_message_pending+0xa2/0x120
      <4> [<000000000053b5a6>] iucv_tasklet_fn+0x176/0x1b8
      <4> [<000000000014fa82>] tasklet_action+0xfe/0x1f4
      <4> [<0000000000150a56>] __do_softirq+0x116/0x284
      <4> [<0000000000111058>] do_softirq+0xe4/0xe8
      <4> [<00000000001504ba>] irq_exit+0xba/0xd8
      <4> [<000000000010e0b2>] do_extint+0x146/0x190
      <4> [<00000000001184b6>] ext_no_vtime+0x1e/0x22
      <4> [<00000000001fbf4e>] kfree+0x202/0x28c
      <4>([<00000000001fbf44>] kfree+0x1f8/0x28c)
      <4> [<000000000044205a>] __kfree_skb+0x32/0x124
      <4> [<000003e0016bd8b2>] iucv_sock_recvmsg+0x236/0x41c [af_iucv]
      <4> [<0000000000437042>] sock_aio_read+0x136/0x160
      <4> [<0000000000205e50>] do_sync_read+0xe4/0x13c
      <4> [<0000000000206dce>] vfs_read+0x152/0x15c
      <4> [<0000000000206ed0>] SyS_read+0x54/0xac
      <4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
      <4> [<00000042ff8def3c>] 0x42ff8def3c
      Signed-off-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ursula.braun@de.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf95d20f
    • H
      af_iucv: do not call iucv_sock_kill() twice · 7514bab0
      Hendrik Brueckner 提交于
      For non-accepted sockets on the accept queue, iucv_sock_kill()
      is called twice (in iucv_sock_close() and iucv_sock_cleanup_listen()).
      This typically results in a kernel oops as shown below.
      
      Remove the duplicate call to iucv_sock_kill() and set the SOCK_ZAPPED
      flag in iucv_sock_close() only.
      
      The iucv_sock_kill() function frees a socket only if the socket is zapped
      and orphaned (sk->sk_socket == NULL):
        - Non-accepted sockets are always orphaned and, thus, iucv_sock_kill()
          frees the socket twice.
        - For accepted sockets or sockets created with iucv_sock_create(),
          sk->sk_socket is initialized. This caused the first call to
          iucv_sock_kill() to return immediately. To free these sockets,
          iucv_sock_release() uses sock_orphan() before calling iucv_sock_kill().
      
      <1>Unable to handle kernel pointer dereference at virtual kernel address 000000003edd3000
      <4>Oops: 0011 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      <4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod qeth vmur ccwgroup
      <4>CPU: 0 Not tainted 2.6.30 #4
      <4>Process iucv_sock_close (pid: 2486, task: 000000003aea4340, ksp: 000000003b75bc68)
      <4>Krnl PSW : 0704200180000000 000003e00168e23a (iucv_sock_kill+0x2e/0xcc [af_iucv])
      <4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
      <4>Krnl GPRS: 0000000000000000 000000003b75c000 000000003edd37f0 0000000000000001
      <4>           000003e00168ec62 000000003988d960 0000000000000000 000003e0016b0608
      <4>           000000003fe81b20 000000003839bb58 00000000399977f0 000000003edd37f0
      <4>           000003e00168b000 000003e00168f138 000000003b75bcd0 000000003b75bc98
      <4>Krnl Code: 000003e00168e22a: c0c0ffffe6eb	larl	%r12,3e00168b000
      <4>           000003e00168e230: b90400b2		lgr	%r11,%r2
      <4>           000003e00168e234: e3e0f0980024	stg	%r14,152(%r15)
      <4>          >000003e00168e23a: e310225e0090	llgc	%r1,606(%r2)
      <4>           000003e00168e240: a7110001		tmll	%r1,1
      <4>           000003e00168e244: a7840007		brc	8,3e00168e252
      <4>           000003e00168e248: d507d00023c8	clc	0(8,%r13),968(%r2)
      <4>           000003e00168e24e: a7840009		brc	8,3e00168e260
      <4>Call Trace:
      <4>([<000003e0016b0608>] afiucv_dbf+0x0/0xfffffffffffdea20 [af_iucv])
      <4> [<000003e00168ec6c>] iucv_sock_close+0x130/0x368 [af_iucv]
      <4> [<000003e00168ef02>] iucv_sock_release+0x5e/0xe4 [af_iucv]
      <4> [<0000000000438e6c>] sock_release+0x44/0x104
      <4> [<0000000000438f5e>] sock_close+0x32/0x50
      <4> [<0000000000207898>] __fput+0xf4/0x250
      <4> [<00000000002038aa>] filp_close+0x7a/0xa8
      <4> [<00000000002039ba>] SyS_close+0xe2/0x148
      <4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
      <4> [<00000042ff8deeac>] 0x42ff8deeac
      Signed-off-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ursula.braun@de.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7514bab0