public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@mellanox.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	Ido Schimmel <idosch@mellanox.com>,
	Paul Blakey <paulb@mellanox.com>
Subject: Re: [PATCH net] net: cls_flower: Remove filter from mask before freeing it
Date: Tue, 5 Feb 2019 11:18:30 +0000	[thread overview]
Message-ID: <wihsgx2zdoo.fsf@dev-r-vrt-156.mtr.labs.mlnx> (raw)
In-Reply-To: <20190204.092124.2218605529866288555.davem@davemloft.net> (David Miller's message of "Mon, 4 Feb 2019 09:21:24 -0800")

David Miller <davem@davemloft.net> writes:

> 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.

Sorry about that and thanks.

      reply	other threads:[~2019-02-05 11:18 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
2019-02-05 11:18   ` Petr Machata [this message]

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=wihsgx2zdoo.fsf@dev-r-vrt-156.mtr.labs.mlnx \
    --to=petrm@mellanox.com \
    --cc=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=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