Re: [PATCH v2] crypto/ansi prng: alloc cipher just in in init()

2009-06-30 Thread Neil Horman
On Tue, Jun 30, 2009 at 09:55:18PM +0200, Sebastian Andrzej Siewior wrote: > As reported by Eric Sesterhenn the re-allocation of the cipher in reset leads > to: > |BUG: sleeping function called from invalid context at kernel/rwsem.c:21 > |in_atomic(): 1, irqs_disabled(): 0, pid: 4926, name: modprob

[PATCH v2] crypto/ansi prng: alloc cipher just in in init()

2009-06-30 Thread Sebastian Andrzej Siewior
As reported by Eric Sesterhenn the re-allocation of the cipher in reset leads to: |BUG: sleeping function called from invalid context at kernel/rwsem.c:21 |in_atomic(): 1, irqs_disabled(): 0, pid: 4926, name: modprobe |INFO: lockdep is turned off. |Pid: 4926, comm: modprobe Tainted: G M 2.6.31-rc

Re: [PATCH 2/2] crypto/ansi prng: alloc cipher just in in init()

2009-06-30 Thread Neil Horman
On Mon, Jun 29, 2009 at 11:45:08PM +0200, Sebastian Andrzej Siewior wrote: > From: Sebastian Andrzej Siewior > > As reported by Eric Sesterhenn the re-allocation of the cipher in reset leads > to: > |BUG: sleeping function called from invalid context at kernel/rwsem.c:21 > |in_atomic(): 1, irqs_d

Re: [PATCH 1/2] crypto/ansi prng: use just a BH lock

2009-06-30 Thread Neil Horman
On Mon, Jun 29, 2009 at 11:44:30PM +0200, Sebastian Andrzej Siewior wrote: > From: Sebastian Andrzej Siewior > > the current code uses a mix of sping_lock() & spin_lock_irqsave(). This can > lead to deadlock with the correct timming & cprng_get_random() + cprng_reset() > sequence. > I've converte