TOMOYO: Return error if fails to delete a domain
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 17 Mar 2012 11:33:38 +0000 (20:33 +0900)
committerJames Morris <james.l.morris@oracle.com>
Tue, 20 Mar 2012 01:06:50 +0000 (12:06 +1100)
commit7d7473dbdb9121dd1b5939566660d51130ecda3a
tree057bf591dd896c01a2b35b31dc41996d3d9e51b8
parentb01d3fb921df9baef1ecd13704f4b1e269b58b6b
TOMOYO: Return error if fails to delete a domain

Call sequence:
tomoyo_write_domain() --> tomoyo_delete_domain()

In 'tomoyo_delete_domain', return -EINTR if locking attempt is
interrupted by signal.

At present it returns success to its caller 'tomoyo_write_domain()'
even though domain is not deleted. 'tomoyo_write_domain()' assumes
domain is deleted and returns success to its caller. This is wrong behaviour.

'tomoyo_write_domain' should return error from tomoyo_delete_domain() to its
caller.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/tomoyo/common.c