projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: RCU dereference correct pointer in table.
[openvswitch]
/
datapath
/
table.c
diff --git
a/datapath/table.c
b/datapath/table.c
index 86236e924c3c256678529d79295e61cbec687899..c6614e13e5c23a3872f7f531115736e5b62c27e3 100644
(file)
--- a/
datapath/table.c
+++ b/
datapath/table.c
@@
-174,7
+174,7
@@
static int search_bucket(const struct tbl_bucket *bucket, void *target, u32 hash
int i;
for (i = 0; i < bucket->n_objs; i++) {
int i;
for (i = 0; i < bucket->n_objs; i++) {
- struct tbl_node *obj =
rcu_dereference(bucket->objs[i])
;
+ struct tbl_node *obj =
bucket->objs[i]
;
if (obj->hash == hash && likely(cmp(obj, target)))
return i;
}
if (obj->hash == hash && likely(cmp(obj, target)))
return i;
}
@@
-319,7
+319,7
@@
static void free_bucket_rcu(struct rcu_head *rcu)
int tbl_insert(struct tbl *table, struct tbl_node *target, u32 hash)
{
struct tbl_bucket **oldp = find_bucket(table, hash);
int tbl_insert(struct tbl *table, struct tbl_node *target, u32 hash)
{
struct tbl_bucket **oldp = find_bucket(table, hash);
- struct tbl_bucket *old =
*rcu_dereference(
oldp);
+ struct tbl_bucket *old =
rcu_dereference(*
oldp);
unsigned int n = old ? old->n_objs : 0;
struct tbl_bucket *new = bucket_alloc(n + 1);
unsigned int n = old ? old->n_objs : 0;
struct tbl_bucket *new = bucket_alloc(n + 1);
@@
-357,7
+357,7
@@
int tbl_insert(struct tbl *table, struct tbl_node *target, u32 hash)
int tbl_remove(struct tbl *table, struct tbl_node *target)
{
struct tbl_bucket **oldp = find_bucket(table, target->hash);
int tbl_remove(struct tbl *table, struct tbl_node *target)
{
struct tbl_bucket **oldp = find_bucket(table, target->hash);
- struct tbl_bucket *old =
*rcu_dereference(
oldp);
+ struct tbl_bucket *old =
rcu_dereference(*
oldp);
unsigned int n = old->n_objs;
struct tbl_bucket *new;
unsigned int n = old->n_objs;
struct tbl_bucket *new;