projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Avoid use-after-free error in dp_device_event().
[openvswitch]
/
datapath
/
loop_counter.c
diff --git
a/datapath/loop_counter.c
b/datapath/loop_counter.c
index 491305d97e5f93090e2c50fb997e12a58d347321..3e1d890aafccb80b430a78e38f700b8f476c5467 100644
(file)
--- a/
datapath/loop_counter.c
+++ b/
datapath/loop_counter.c
@@
-1,6
+1,6
@@
/*
* Distributed under the terms of the GNU GPL version 2.
/*
* Distributed under the terms of the GNU GPL version 2.
- * Copyright (c) 2010 Nicira Networks.
+ * Copyright (c) 2010
, 2011
Nicira Networks.
*
* Significant portions of this file may be copied from parts of the Linux
* kernel, by Linus Torvalds and others.
*
* Significant portions of this file may be copied from parts of the Linux
* kernel, by Linus Torvalds and others.
@@
-15,12
+15,13
@@
#include "loop_counter.h"
#include "loop_counter.h"
-
void
loop_suppress(struct datapath *dp, struct sw_flow_actions *actions)
+
int
loop_suppress(struct datapath *dp, struct sw_flow_actions *actions)
{
if (net_ratelimit())
pr_warn("%s: flow looped %d times, dropping\n",
dp_name(dp), MAX_LOOPS);
actions->actions_len = 0;
{
if (net_ratelimit())
pr_warn("%s: flow looped %d times, dropping\n",
dp_name(dp), MAX_LOOPS);
actions->actions_len = 0;
+ return -ELOOP;
}
#ifndef CONFIG_PREEMPT_RT
}
#ifndef CONFIG_PREEMPT_RT