Re: [PATCH] proc: fix inconsistent lock state

2012-12-19 Thread Al Viro
On Wed, Dec 19, 2012 at 04:13:30AM -0800, Eric W. Biederman wrote: > Something doesn't feel right. I don't think there should be a path where we > get to proc_free_inum from bh context. > > Rcu callbacks should be running in process context (if a special one). No, they are not. They run from

Re: [PATCH] proc: fix inconsistent lock state

2012-12-19 Thread Eric W. Biederman
Xiaotian Feng wrote: >Lockdep found an inconsistent lock state when rcu is processing >delayed work in softirq. Currently, kernel is using >spin_lock/spin_unlock >to protect proc_inum_ida, but proc_free_inum is called by rcu in >softirq >context. Emarassing. Thank you for finding this. Somethi

[PATCH] proc: fix inconsistent lock state

2012-12-19 Thread Xiaotian Feng
Lockdep found an inconsistent lock state when rcu is processing delayed work in softirq. Currently, kernel is using spin_lock/spin_unlock to protect proc_inum_ida, but proc_free_inum is called by rcu in softirq context. Use spin_lock_bh/spin_unlock_bh fix following lockdep warning. [ 49.709127]