1. 28 11月, 2008 5 次提交
    • S
      powerpc/ppc32: static ftrace fixes for PPC32 · f1eecf0e
      Steven Rostedt 提交于
      Impact: fix for PowerPC 32 code
      
      There were some early init code that was not safe for static
      ftrace to boot on my PowerBook. This code must only use relative
      addressing, and static mcount performs a compare of the
      ftrace_trace_function pointer, and gets that with an absolute address.
      In the early init boot up code, this will cause a fault.
      
      This patch removes tracing from the files containing the offending
      functions.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f1eecf0e
    • S
      powerpc: ftrace, use create_branch · 0029ff87
      Steven Rostedt 提交于
      Impact: clean up
      
      Paul Mackerras pointed out that the code to determine if the branch
      can reach the destination is incorrect. Michael Ellerman suggested
      to pull out the code from create_branch and use that.
      
      Simply using create_branch is probably the best.
      Reported-by: NMichael Ellerman <michael@ellerman.id.au>
      Reported-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0029ff87
    • S
      powerpc: ftrace, added missing icache flush · ec682cef
      Steven Rostedt 提交于
      Impact: fix to PowerPC code modification
      
      After modifying code it is essential to flush the icache. This patch
      adds the missing flush.
      Reported-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec682cef
    • S
      powerpc: ftrace, fix cast aliasing and add code verification · d9af12b7
      Steven Rostedt 提交于
      Impact: clean up and robustness addition
      
      This patch addresses the comments made by Paul Mackerras.
      It removes the type casting between unsigned int and unsigned char
      pointers, and replaces them with a use of all unsigned int.
      
      Verification that the jump is indeed made to a trampoline has also
      been added.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d9af12b7
    • S
      powerpc: ftrace, do nothing in mcount call for dyn ftrace · c7b0d173
      Steven Rostedt 提交于
      Impact: quicken mcount calls that are not replaced by dyn ftrace
      
      Dynamic ftrace no longer does on the fly recording of mcount locations.
      The mcount locations are now found at compile time. The mcount
      function no longer needs to store registers and call a stub function.
      It can now just simply return.
      
      Since there are some functions that do not get converted to a nop
      (.init sections and other code that may disappear), this patch should
      help speed up that code.
      
      Also, the stub for mcount on PowerPC 32 can not be a simple branch
      link register like it is on PowerPC 64. According to the ABI specification:
      
      "The _mcount routine is required to restore the link register from
       the stack so that the profiling code can be inserted transparently,
       whether or not the profiled function saves the link register itself."
      
      This means that we must restore the link register that was used
      to make the call to mcount.  The minimal mcount function for PPC32
      ends up being:
      
       mcount:
              mflr    r0
              mtctr   r0
              lwz     r0, 4(r1)
              mtlr    r0
              bctr
      
      Where we move the link register used to call mcount into the
      ctr register, and then restore the link register from the stack.
      Then we use the ctr register to jump back to the mcount caller.
      The r0 register is free for us to use.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c7b0d173
  2. 23 11月, 2008 1 次提交
  3. 21 11月, 2008 30 次提交
  4. 20 11月, 2008 4 次提交
    • A
      net: fix tiny output corruption of /proc/net/snmp6 · 5ece6c2d
      Alexey Dobriyan 提交于
      Because "name" is static, it can be occasionally be filled with
      somewhat garbage if two processes read /proc/net/snmp6.
      
      Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
      output.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ece6c2d
    • A
      atl2: don't request irq on resume if netif running · a849854f
      Alan Jenkins 提交于
      If the device is suspended with the cable disconnected, then
      resumed with the cable connected, dev->open is called before
      resume. During resume, we request an IRQ, but the IRQ was
      already assigned during dev->open, resulting in the warning
      shown below.
      
      Don't request an IRQ if the device is running.
      
      Call Trace:
       [<c011b89a>] warn_on_slowpath+0x40/0x59
       [<c023df15>] raw_pci_read+0x4d/0x55
       [<c023dff3>] pci_read+0x1c/0x21
       [<c01bcd81>] __pci_find_next_cap_ttl+0x44/0x70
       [<c01bce86>] __pci_find_next_cap+0x1a/0x1f
       [<c01bcef9>] pci_find_capability+0x28/0x2c
       [<c01c4144>] pci_msi_check_device+0x53/0x62
       [<c01c49c2>] pci_enable_msi+0x3a/0x1cd
       [<e019f17b>] atl2_write_phy_reg+0x40/0x5f [atl2]
       [<c01061b1>] dma_generic_alloc_coherent+0x0/0xd7
       [<e019f107>] atl2_request_irq+0x15/0x49 [atl2]
       [<e01a1481>] atl2_open+0x20b/0x297 [atl2]
       [<c024a35c>] dev_open+0x62/0x91
       [<c0248b9a>] dev_change_flags+0x93/0x141
       [<c024f308>] do_setlink+0x238/0x2d5
       [<c02501b2>] rtnl_setlink+0xa9/0xbf
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c024ffa7>] rtnl_dump_ifinfo+0x0/0x69
       [<c0250109>] rtnl_setlink+0x0/0xbf
       [<c024fe42>] rtnetlink_rcv_msg+0x185/0x19f
       [<c0240fd1>] sock_rmalloc+0x23/0x57
       [<c024fcbd>] rtnetlink_rcv_msg+0x0/0x19f
       [<c0259457>] netlink_rcv_skb+0x2d/0x71
       [<c024fcb7>] rtnetlink_rcv+0x14/0x1a
       [<c025929e>] netlink_unicast+0x184/0x1e4
       [<c025992a>] netlink_sendmsg+0x233/0x240
       [<c023f405>] sock_sendmsg+0xb7/0xd0
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0147796>] mempool_alloc+0x2d/0x9e
       [<c020c923>] scsi_pool_alloc_command+0x35/0x4f
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c028e867>] unix_stream_recvmsg+0x357/0x3e2
       [<c01b81c9>] copy_from_user+0x23/0x4f
       [<c02452ea>] verify_iovec+0x3e/0x6c
       [<c023f5ab>] sys_sendmsg+0x18d/0x1f0
       [<c023ffa8>] sys_recvmsg+0x146/0x1c8
       [<c0240016>] sys_recvmsg+0x1b4/0x1c8
       [<c0118f48>] __wake_up+0xf/0x15
       [<c02586cd>] netlink_table_ungrab+0x17/0x19
       [<c01b83ba>] copy_to_user+0x25/0x3b
       [<c023fe4a>] move_addr_to_user+0x50/0x68
       [<c0240266>] sys_getsockname+0x6f/0x9a
       [<c0240280>] sys_getsockname+0x89/0x9a
       [<c015046a>] do_wp_page+0x3ae/0x41a
       [<c0151525>] handle_mm_fault+0x4c5/0x540
       [<c02405d0>] sys_socketcall+0x176/0x1b0
       [<c010376d>] sysenter_do_call+0x12/0x21
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJay Cliburn <jcliburn@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a849854f
    • B
      ipv6: use seq_release_private for ip6mr.c /proc entries · eedd726e
      Benjamin Thery 提交于
      In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
      are opened with seq_open_private(), thus seq_release_private() should be 
      used to release them.
      Should fix a small memory leak.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eedd726e
    • P
      pkt_sched: fix missing check for packet overrun in qdisc_dump_stab() · 3aa4614d
      Patrick McHardy 提交于
      nla_nest_start() might return NULL, causing a NULL pointer dereference.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aa4614d