linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Bernard Metzler <BMT@zurich.ibm.com>
Cc: syzbot <syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com>,
	chuck.lever@oracle.com, dledford@redhat.com, leon@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, parav@mellanox.com,
	syzkaller-bugs@googlegroups.com, willy@infradead.org
Subject: Re: Re: Re: possible deadlock in cma_netdev_callback
Date: Fri, 28 Feb 2020 12:49:52 -0400	[thread overview]
Message-ID: <20200228164952.GV31668@ziepe.ca> (raw)
In-Reply-To: <OFE6F5FD43.5CAFDF8A-ON0025851C.005AC3E0-0025851C.005BBD83@notes.na.collabserv.com>

On Fri, Feb 28, 2020 at 04:42:02PM +0000, Bernard Metzler wrote:

> Well, right, marking a socket via setsockopt SO_BINDTODEVICE
> does not work - I get -EPERM. Maybe works only from user land
> since the ifname gets copied in from there.
> 
> What I tested as working is nailing the scope of wildcard
> listen via:
> s->sk->sk_bound_dev_if = netdev->ifindex;

That sounds potentially right
 
> I am not sure what is the right way of limiting the scope
> of a socket to one interface in kernel mode. Is above line
> the way to go, or do I miss an interface to do such things?
> Anybody could help?

I didn't find an alternative, but not a lot of places touching this
outside the implementators of a socket type.
 
Jason

      reply	other threads:[~2020-02-28 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  5:39 possible deadlock in cma_netdev_callback syzbot
2020-02-26 20:42 ` Jason Gunthorpe
2020-02-27 10:11 ` Bernard Metzler
2020-02-27 15:53   ` Jason Gunthorpe
2020-02-27 16:21   ` Bernard Metzler
2020-02-27 16:46     ` Jason Gunthorpe
2020-02-28 13:05     ` Bernard Metzler
2020-02-28 13:35       ` Jason Gunthorpe
2020-02-28 16:42       ` Bernard Metzler
2020-02-28 16:49         ` Jason Gunthorpe [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=20200228164952.GV31668@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=BMT@zurich.ibm.com \
    --cc=chuck.lever@oracle.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.com \
    --cc=syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).