Re: [PATCH 07/10] mm: warn about vfree from atomic context

2016-11-23 Thread Christoph Hellwig
On Tue, Nov 22, 2016 at 07:35:34PM +0300, Andrey Ryabinin wrote: > This one is wrong. We still can call vfree() from interrupt context. > So WARN_ON_ONCE(in_atomic() && !in_interrupt()) would be correct, > but also redundant. DEBUG_ATOMIC_SLEEP=y should catch illegal vfree() calls. > Let's just dro

Re: [PATCH 07/10] mm: warn about vfree from atomic context

2016-11-22 Thread Andrey Ryabinin
On 11/18/2016 04:03 PM, Christoph Hellwig wrote: > We can't handle vfree itself from atomic context, but callers > can explicitly use vfree_atomic instead, which defers the actual > vfree to a workqueue. Unfortunately in_atomic does not work > on non-preemptible kernels, so we can't just do the ri

[PATCH 07/10] mm: warn about vfree from atomic context

2016-11-18 Thread Christoph Hellwig
We can't handle vfree itself from atomic context, but callers can explicitly use vfree_atomic instead, which defers the actual vfree to a workqueue. Unfortunately in_atomic does not work on non-preemptible kernels, so we can't just do the right thing by default. Signed-off-by: Christoph Hellwig