aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/fdso.c
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-01-10 06:47:01 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-02-04 09:24:58 -0500
commit4bd4eacab5070ac3003925b50a3d03069ae15e4a (patch)
treee660449bdf0740d9dee39de7840f0c6aaf19d635 /litmus/fdso.c
parent44b2be2bd7b1985345bf855bc74dfc303c7c79cb (diff)
FDSO: fail to build if some ops are missing
Prevents out-of-bounds lookups.
Diffstat (limited to 'litmus/fdso.c')
-rw-r--r--litmus/fdso.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/litmus/fdso.c b/litmus/fdso.c
index 250377d184e7..c4b450be4509 100644
--- a/litmus/fdso.c
+++ b/litmus/fdso.c
@@ -31,6 +31,8 @@ static const struct fdso_ops* fdso_ops[] = {
31 31
32static int fdso_create(void** obj_ref, obj_type_t type, void* __user config) 32static int fdso_create(void** obj_ref, obj_type_t type, void* __user config)
33{ 33{
34 BUILD_BUG_ON(ARRAY_SIZE(fdso_ops) != MAX_OBJ_TYPE + 1);
35
34 if (fdso_ops[type]->create) 36 if (fdso_ops[type]->create)
35 return fdso_ops[type]->create(obj_ref, type, config); 37 return fdso_ops[type]->create(obj_ref, type, config);
36 else 38 else