1. 21 9月, 2013 1 次提交
  2. 19 9月, 2013 1 次提交
  3. 16 9月, 2013 1 次提交
  4. 18 3月, 2013 1 次提交
    • L
      iio: events: Make iio_push_event() IRQ context save · 1b9dc91e
      Lars-Peter Clausen 提交于
      Currently it is not save to call iio_push_event() from hard IRQ context since
      the IIO event code uses spin_lock()/spin_unlock() and it is not save to mix
      calls to spin_lock()/spin_unlock() from different contexts on the same lock.
      E.g. if the lock is being held in iio_event_chrdev_read() and an interrupts
      kicks in and the interrupt handler calls iio_push_event() we end uo with a
      deadlock.
      
      This patch updates iio_push_event() to use spin_lock_irqsave()/
      spin_unlock_irqstrestore(), since it can be called from both IRQ and non-IRQ
      context. All other other users of the lock, which are always run in non-IRQ
      context, are updated to spin_lock_irq()/spin_unlock_irq().
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      1b9dc91e
  5. 17 11月, 2012 1 次提交
    • J
      drivers/iio/industrialio-event.c: eliminate possible double free · e3db9ef6
      Julia Lawall 提交于
      The function __iio_add_event_config_attrs is only called once, by the
      function iio_device_register_eventset.  If the call fails,
      iio_device_register_eventset calls __iio_remove_event_config_attrs.  There
      is thus no need for __iio_add_event_config_attrs to also call
      __iio_remove_event_config_attrs on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier f,free,a;
      parameter list[n] ps;
      type T;
      expression e;
      @@
      
      f(ps,T a,...) {
        ... when any
            when != a = e
        if(...) { ... free(a); ... return ...; }
        ... when any
      }
      
      @@
      identifier r.f,r.free;
      expression x,a;
      expression list[r.n] xs;
      @@
      
      * x = f(xs,a,...);
        if (...) { ... free(a); ... return ...; }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e3db9ef6
  6. 20 10月, 2012 1 次提交
  7. 09 7月, 2012 1 次提交
  8. 15 5月, 2012 1 次提交
  9. 26 4月, 2012 2 次提交
  10. 14 2月, 2012 1 次提交
  11. 10 2月, 2012 5 次提交