Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
a9e68a39
Commit
a9e68a39
authored
Jan 24, 2019
by
Vikram Narayanan
Browse files
priv_mempool: Fix off-by-one error
parent
1b9eb83f
Changes
1
Hide whitespace changes
Inline
Side-by-side
mm/priv_mempool.c
View file @
a9e68a39
...
@@ -60,6 +60,9 @@ void construct_global_pool(priv_pool_t *p)
...
@@ -60,6 +60,9 @@ void construct_global_pool(priv_pool_t *p)
//printk("bundle ===> %d\n", b);
//printk("bundle ===> %d\n", b);
for
(
i
=
0
;
i
<
CACHE_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
CACHE_SIZE
;
i
++
)
{
objs
=
(
struct
object
*
)((
char
*
)
bpool
+
(
i
*
obj_size
));
objs
=
(
struct
object
*
)((
char
*
)
bpool
+
(
i
*
obj_size
));
/* the last object's next is just null */
if
(
i
==
CACHE_SIZE
-
1
)
break
;
objs
->
next
=
(
struct
object
*
)((
char
*
)
bpool
+
(
i
+
1
)
*
obj_size
);
objs
->
next
=
(
struct
object
*
)((
char
*
)
bpool
+
(
i
+
1
)
*
obj_size
);
// printk("\tobj %p | obj->next %p\n", objs, objs->next);
// printk("\tobj %p | obj->next %p\n", objs, objs->next);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment