[ovs-dev] [PATCH] datapath: Do not free in use mask list, fixes a kernel crash bug
Andy Zhou
azhou at nicira.com
Wed Jan 29 16:53:02 UTC 2014
Forgot to mention this patch applies to branch-2.0
On Wed, Jan 29, 2014 at 8:51 AM, Andy Zhou <azhou at nicira.com> wrote:
> Last commit 738a2445c0 introduced a bug where the mask list of
> a flow table was freed even when the table's flows and mask list is
> reused by another table.
>
> Bug #32932
>
> Reported-by: Len Gao <leng at vmware.com>
> Signed-off-by: Andy Zhou <azhou at nicira.com>
> ---
> datapath/flow.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/datapath/flow.c b/datapath/flow.c
> index b9ad608..2e46866 100644
> --- a/datapath/flow.c
> +++ b/datapath/flow.c
> @@ -502,8 +502,10 @@ static struct flow_table *__flow_tbl_alloc(int
> new_size)
>
> static void __flow_tbl_destroy(struct flow_table *table)
> {
> - BUG_ON(!list_empty(table->mask_list));
> - kfree(table->mask_list);
> + if (!table->keep_flows) {
> + BUG_ON(!list_empty(table->mask_list));
> + kfree(table->mask_list);
> + }
>
> free_buckets(table->buckets);
> kfree(table);
> --
> 1.7.9.5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140129/afd2f5db/attachment-0003.html>
More information about the dev
mailing list