Hi, I am very confused about the lock funtion "spin_lock(&sem)" and "spin_lock_bh(&sem)".

If I have a critical section and I used a function named "critical" wrapping it.

(1)In one place i use:

spin_lock_bh(&sem)
critical();
spin_unlock_bh

(2) in another place i use

spin_lock(&sem)
critical();
spin_unlock(&sem)


My question is : is the above wrong? Doe it still probably cause Deadlock?

Thank you very much!