]> git.baikalelectronics.ru Git - kernel.git/commit
TOMOYO: Fix lockdep warning.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sun, 26 Jun 2011 14:20:55 +0000 (23:20 +0900)
committerJames Morris <jmorris@namei.org>
Tue, 28 Jun 2011 23:31:21 +0000 (09:31 +1000)
commit9edaa1e26928b5423639400837544a743ad7c5c4
treec6b783c245716cf87b337b2a855e742133afb7ac
parent406fed3818fd0691dc5de41dfce3b39c2e3b9865
TOMOYO: Fix lockdep warning.

Currently TOMOYO holds SRCU lock upon open() and releases it upon close()
because list elements stored in the "struct tomoyo_io_buffer" instances are
accessed until close() is called. However, such SRCU usage causes lockdep to
complain about leaving the kernel with SRCU lock held.

This patch solves the warning by holding/releasing SRCU upon each
read()/write(). This patch is doing something similar to calling kfree()
without calling synchronize_srcu(), by selectively deferring kfree() by keeping
track of the "struct tomoyo_io_buffer" instances.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
security/tomoyo/common.c
security/tomoyo/common.h
security/tomoyo/gc.c