mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 00:41:30 +01:00
Call the chained module handler before unregistering the syscall so that
errors can be detected. Submitted by: "A.Yu.Isupov" <isupov@moonhe.jinr.ru> PR: kern/12239
This commit is contained in:
parent
b52ab6b545
commit
c049aba8c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48269
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: kern_syscalls.c,v 1.2 1999/01/09 14:59:50 dfr Exp $
|
||||
* $Id: kern_syscalls.c,v 1.3 1999/01/17 18:58:04 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -95,13 +95,20 @@ syscall_module_handler(struct module *mod, int what, void *arg)
|
||||
return error;
|
||||
ms.intval = *data->offset;
|
||||
module_setspecific(mod, &ms);
|
||||
break;
|
||||
if (data->chainevh)
|
||||
error = data->chainevh(mod, what, data->chainarg);
|
||||
return error;
|
||||
|
||||
case MOD_UNLOAD :
|
||||
if (data->chainevh) {
|
||||
error = data->chainevh(mod, what, data->chainarg);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
error = syscall_deregister(data->offset, &data->old_sysent);
|
||||
if (error)
|
||||
return error;
|
||||
break;
|
||||
return error;
|
||||
}
|
||||
|
||||
if (data->chainevh)
|
||||
return data->chainevh(mod, what, data->chainarg);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user