From: David Miller <davem@davemloft.net>
To: mst@redhat.com
Cc: linux-kernel@vger.kernel.org, john.r.fastabend@intel.com,
kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2] macvlan: don't touch promisc without passthrough
Date: Thu, 13 Jun 2013 01:20:55 -0700 (PDT) [thread overview]
Message-ID: <20130613.012055.1850149112448977565.davem@davemloft.net> (raw)
In-Reply-To: <1371107001-10250-1-git-send-email-mst@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 13 Jun 2013 10:07:29 +0300
> commit df8ef8f3aaa6692970a436204c4429210addb23a
> "macvlan: add FDB bridge ops and macvlan flags"
> added a way to control NOPROMISC macvlan flag through netlink.
>
> However, with a non passthrough device we never set promisc on open,
> even if NOPROMISC is off. As a result:
>
> If userspace clears NOPROMISC on open, then does not clear it on a
> netlink command, promisc counter is not decremented on stop and there
> will be no way to clear it once macvlan is detached.
>
> If userspace does not clear NOPROMISC on open, then sets NOPROMISC on a
> netlink command, promisc counter will be decremented from 0 and overflow
> to fffffffff with no way to clear promisc.
>
> To fix, simply ignore NOPROMISC flag in a netlink command for
> non-passthrough devices, same as we do at open/close.
>
> Since we touch this code anyway - check dev_set_promiscuity return code
> and pass it to users (though an error here is unlikely).
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Reviewed-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Applied, thanks.
prev parent reply other threads:[~2013-06-13 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 7:07 Michael S. Tsirkin
2013-06-13 8:20 ` David Miller [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=20130613.012055.1850149112448977565.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=john.r.fastabend@intel.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®