Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299124
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net] openvswitch: Fix template leak in error cases. |
| Date | 2015-12-29 21:30 +0100 |
| Message-ID | <qL946-5iB-17@gated-at.bofh.it> (permalink) |
| References | <qJ0oh-71t-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Joe Stringer <joe@ovn.org>
Date: Wed, 23 Dec 2015 14:39:27 -0800
> Commit 5b48bb8506c5 ("openvswitch: Fix helper reference leak") fixed a
> reference leak on helper objects, but inadvertently introduced a leak on
> the ct template.
>
> Previously, ct_info.ct->general.use was initialized to 0 by
> nf_ct_tmpl_alloc() and only incremented when ovs_ct_copy_action()
> returned successful. If an error occurred while adding the helper or
> adding the action to the actions buffer, the __ovs_ct_free_action()
> cleanup would use nf_ct_put() to free the entry; However, this relies on
> atomic_dec_and_test(ct_info.ct->general.use). This reference must be
> incremented first, or nf_ct_put() will never free it.
>
> Fix the issue by acquiring a reference to the template immediately after
> allocation.
>
> Fixes: cae3a2627520 ("openvswitch: Allow attaching helpers to ct action")
> Fixes: 5b48bb8506c5 ("openvswitch: Fix helper reference leak")
> Signed-off-by: Joe Stringer <joe@ovn.org>
Looks good, applied, thanks Joe.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net] openvswitch: Fix template leak in error cases. Joe Stringer <joe@ovn.org> - 2015-12-23 23:50 +0100 Re: [PATCH net] openvswitch: Fix template leak in error cases. David Miller <davem@davemloft.net> - 2015-12-29 21:30 +0100
csiph-web