14 Dec, 2010

1 commit


30 Jan, 2009

1 commit


09 Apr, 2008

1 commit

  • Up to now, key manipulation is supposed to run under RTNL to
    avoid concurrent manipulations and also allow the set_key()
    hardware callback to sleep. This is not feasible because STA
    structs are rcu-protected and thus a lot of operations there
    cannot take the RTNL. Also, key references are rcu-protected
    so we cannot do things atomically.

    This patch changes key locking completely:
    * key operations are now atomic
    * hardware crypto offload is enabled and disabled from
    a workqueue, due to that key freeing is also delayed
    * debugfs code is also run from a workqueue
    * keys reference STAs (and vice versa!) so during STA
    unlink the STAs key reference is removed but not the
    keys STA reference, to avoid races key todo work is
    run before STA destruction.
    * fewer STA operations now need the RTNL which was
    required due to key operations

    This fixes the locking problems lockdep pointed out and also
    makes things more light-weight because the rtnl isn't required
    as much.

    Note that the key todo lock/key mutex are global locks, this
    is not required, of course, they could be per-hardware instead.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

06 May, 2007

1 commit