From: David Miller <davem@davemloft.net>
To: petrm@mellanox.com
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, idosch@mellanox.com,
paulb@mellanox.com
Subject: Re: [PATCH net] net: cls_flower: Remove filter from mask before freeing it
Date: Mon, 04 Feb 2019 09:21:24 -0800 (PST) [thread overview]
Message-ID: <20190204.092124.2218605529866288555.davem@davemloft.net> (raw)
In-Reply-To: <6f8e5a3f3ad2d6bc2f5a81ce1be1167b8aa456df.1549291065.git.petrm@mellanox.com>
From: Petr Machata <petrm@mellanox.com>
Date: Mon, 4 Feb 2019 14:50:38 +0000
> In fl_change(), when adding a new rule (i.e. fold == NULL), a driver may
> reject the new rule, for example due to resource exhaustion. By that
> point, the new rule was already assigned a mask, and it was added to
> that mask's hash table. The clean-up path that's invoked as a result of
> the rejection however neglects to undo the hash table addition, and
> proceeds to free the new rule, thus leaving a dangling pointer in the
> hash table.
>
> Fix by removing fnew from the mask's hash table before it is freed.
>
> Fixes: 35cc3cefc4de ("net/sched: cls_flower: Reject duplicated rules
> also under skip_sw")
Please do not break up lone Fixes: tag lines in the future, I fixed it
up for you this time.
> Signed-off-by: Petr Machata <petrm@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Applied and queued up for -stable.
next prev parent reply other threads:[~2019-02-04 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 14:50 [PATCH net] net: cls_flower: Remove filter from mask before freeing it Petr Machata
2019-02-04 17:21 ` David Miller [this message]
2019-02-05 11:18 ` Petr Machata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190204.092124.2218605529866288555.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=paulb@mellanox.com \
--cc=petrm@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox