1. 22 11月, 2010 2 次提交
  2. 20 11月, 2010 11 次提交
  3. 19 11月, 2010 23 次提交
  4. 18 11月, 2010 4 次提交
    • N
      gianfar: fix signedness issue · 28cb6ccd
      Nicolas Kaiser 提交于
      irq_of_parse_and_map() has an unsigned return type.
      Testing for a negative error value doesn't work here.
      Signed-off-by: NNicolas Kaiser <nikai@nikai.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28cb6ccd
    • V
      net: ipv4: tcp_probe: cleanup snprintf() use · dda0b386
      Vasiliy Kulikov 提交于
      snprintf() returns number of bytes that were copied if there is no overflow.
      This code uses return value as number of copied bytes.  Theoretically format
      string '%lu.%09lu %pI4:%u %pI4:%u %d %#x %#x %u %u %u %u\n' may be expanded
      up to 163 bytes.  In reality tv.tv_sec is just few bytes instead of 20, 2 ports
      are just 5 bytes each instead of 10, length is 5 bytes instead of 10.  The rest
      is an unstrusted input.  Theoretically if tv_sec is big then copy_to_user() would
      overflow tbuf.
      
      tbuf was increased to fit in 163 bytes.  snprintf() is used to follow return
      value semantic.
      Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dda0b386
    • J
      net: zero kobject in rx_queue_release · 9ea19481
      John Fastabend 提交于
      netif_set_real_num_rx_queues() can decrement and increment
      the number of rx queues. For example ixgbe does this as
      features and offloads are toggled. Presumably this could
      also happen across down/up on most devices if the available
      resources changed (cpu offlined).
      
      The kobject needs to be zero'd in this case so that the
      state is not preserved across kobject_put()/kobject_init_and_add().
      
      This resolves the following error report.
      
      ixgbe 0000:03:00.0: eth2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
      kobject (ffff880324b83210): tried to init an initialized object, something is seriously wrong.
      Pid: 1972, comm: lldpad Not tainted 2.6.37-rc18021qaz+ #169
      Call Trace:
       [<ffffffff8121c940>] kobject_init+0x3a/0x83
       [<ffffffff8121cf77>] kobject_init_and_add+0x23/0x57
       [<ffffffff8107b800>] ? mark_lock+0x21/0x267
       [<ffffffff813c6d11>] net_rx_queue_update_kobjects+0x63/0xc6
       [<ffffffff813b5e0e>] netif_set_real_num_rx_queues+0x5f/0x78
       [<ffffffffa0261d49>] ixgbe_set_num_queues+0x1c6/0x1ca [ixgbe]
       [<ffffffffa0262509>] ixgbe_init_interrupt_scheme+0x1e/0x79c [ixgbe]
       [<ffffffffa0274596>] ixgbe_dcbnl_set_state+0x167/0x189 [ixgbe]
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ea19481
    • C
      net: use the macros defined for the members of flowi · 5811662b
      Changli Gao 提交于
      Use the macros defined for the members of flowi to clean the code up.
      Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5811662b