mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 4.12 nf_conntrack_expect crash
@ 2017-07-17 14:49 Jiri Slaby
  2017-07-17 14:54 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2017-07-17 14:49 UTC (permalink / raw)
  To: Pablo Neira Ayuso, fgao
  Cc: kadlec, Florian Westphal, netfilter-devel, coreteam,
	Linux kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

Hi,

on my system, I see a crash in del_timer invoked in nf_conntrack_expect.
See the attached picture.

I somehow suspect this commit:

commit ec0e3f01114ad327112432a4da8840eb22fed577
Author: Gao Feng <fgao@ikuai8.com>
Date:   Mon Mar 27 10:31:26 2017 +0800

    netfilter: nf_ct_expect: Add nf_ct_remove_expect()


I am going to play with it (debug, try to revert, etc.) if you have no
better idea...

thanks,
-- 
js
suse labs

[-- Attachment #2: nf_ct.jpg --]
[-- Type: image/jpeg, Size: 234072 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 4.12 nf_conntrack_expect crash
  2017-07-17 14:49 4.12 nf_conntrack_expect crash Jiri Slaby
@ 2017-07-17 14:54 ` Jiri Slaby
  2017-07-18  0:23   ` 高峰
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2017-07-17 14:54 UTC (permalink / raw)
  To: Pablo Neira Ayuso, fgao
  Cc: kadlec, Florian Westphal, netfilter-devel, coreteam,
	Linux kernel mailing list

On 07/17/2017, 04:49 PM, Jiri Slaby wrote:
> Hi,
> 
> on my system, I see a crash in del_timer invoked in nf_conntrack_expect.
> See the attached picture.
> 
> I somehow suspect this commit:
> 
> commit ec0e3f01114ad327112432a4da8840eb22fed577
> Author: Gao Feng <fgao@ikuai8.com>
> Date:   Mon Mar 27 10:31:26 2017 +0800
> 
>     netfilter: nf_ct_expect: Add nf_ct_remove_expect()
> 
> 
> I am going to play with it (debug, try to revert, etc.) if you have no
> better idea...

This?

--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -422,7 +422,7 @@ static inline int __nf_ct_expect_check(struct
nf_conntrack_expect *expect)
        h = nf_ct_expect_dst_hash(net, &expect->tuple);
        hlist_for_each_entry_safe(i, next, &nf_ct_expect_hash[h], hnode) {
                if (expect_matches(i, expect)) {
-                       if (nf_ct_remove_expect(expect))
+                       if (nf_ct_remove_expect(i))
                                break;
                } else if (expect_clash(i, expect)) {
                        ret = -EBUSY;



> 
> thanks,
> 


-- 
js
suse labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: 4.12 nf_conntrack_expect crash
  2017-07-17 14:54 ` Jiri Slaby
@ 2017-07-18  0:23   ` 高峰
  0 siblings, 0 replies; 3+ messages in thread
From: 高峰 @ 2017-07-18  0:23 UTC (permalink / raw)
  To: 'Jiri Slaby', 'Pablo Neira Ayuso'
  Cc: kadlec, 'Florian Westphal',
	netfilter-devel, coreteam, 'Linux kernel mailing list'

Hi Jiri,

> From: Jiri Slaby [mailto:jslaby@suse.cz]
> Subject: Re: 4.12 nf_conntrack_expect crash
> 
> On 07/17/2017, 04:49 PM, Jiri Slaby wrote:
> > Hi,
> >
> > on my system, I see a crash in del_timer invoked in nf_conntrack_expect.
> > See the attached picture.
> >
> > I somehow suspect this commit:
> >
> > commit ec0e3f01114ad327112432a4da8840eb22fed577
> > Author: Gao Feng <fgao@ikuai8.com>
> > Date:   Mon Mar 27 10:31:26 2017 +0800
> >
> >     netfilter: nf_ct_expect: Add nf_ct_remove_expect()
> >
> >
> > I am going to play with it (debug, try to revert, etc.) if you have no
> > better idea...
> 
> This?
> 
> --- a/net/netfilter/nf_conntrack_expect.c
> +++ b/net/netfilter/nf_conntrack_expect.c
> @@ -422,7 +422,7 @@ static inline int __nf_ct_expect_check(struct
> nf_conntrack_expect *expect)
>         h = nf_ct_expect_dst_hash(net, &expect->tuple);
>         hlist_for_each_entry_safe(i, next, &nf_ct_expect_hash[h], hnode) {
>                 if (expect_matches(i, expect)) {
> -                       if (nf_ct_remove_expect(expect))
> +                       if (nf_ct_remove_expect(i))
>                                 break;
>                 } else if (expect_clash(i, expect)) {
>                         ret = -EBUSY;
> 
> 
> 
> >
> > thanks,
> >
> 
> 
> --
> js
> suse labs

It is a bug caused by typo indeed. I am sorry about that.
And Florian has fixed it recently, but thanks your catch again.

Regards
Feng

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-18  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 14:49 4.12 nf_conntrack_expect crash Jiri Slaby
2017-07-17 14:54 ` Jiri Slaby
2017-07-18  0:23   ` 高峰

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome