linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Bart Van Assche" <bvanassche@acm.org>
Cc: linux-rdma@vger.kernel.org
Subject: Re: siw trigger BUG: sleeping function called from invalid context at mm/slab.h:50
Date: Mon, 26 Aug 2019 08:00:42 +0000	[thread overview]
Message-ID: <OFF0E427F2.51415251-ON00258462.002C0261-00258462.002C0268@notes.na.collabserv.com> (raw)
In-Reply-To: <6ed77231-800b-f629-5d15-14409f0777c7@acm.org>

-----"Bart Van Assche" <bvanassche@acm.org> wrote: -----

>To: "Bernard Metzler" <bmt@zurich.ibm.com>,
>linux-rdma@vger.kernel.org
>From: "Bart Van Assche" <bvanassche@acm.org>
>Date: 08/24/2019 01:02AM
>Subject: [EXTERNAL] siw trigger BUG: sleeping function called from
>invalid context at mm/slab.h:50
>
>Hi Bernard,
>
>If I try to associate the ib_srpt driver with the siw driver the
>complaint shown below appears on the console. In iw_cm_listen() I
>found the following:
>
>         [ ... ]
>	spin_lock_irqsave(&cm_id_priv->lock, flags);
>	switch (cm_id_priv->state) {
>	case IW_CM_STATE_IDLE:
>		cm_id_priv->state = IW_CM_STATE_LISTEN;
>		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
>		ret = iw_cm_map(cm_id, false);
>		if (!ret)
>			ret = cm_id->device->ops.iw_create_listen(cm_id,
>								  backlog);
>		if (ret)
>			cm_id_priv->state = IW_CM_STATE_IDLE;
>		spin_lock_irqsave(&cm_id_priv->lock, flags);
>		break;
>	default:
>		ret = -EINVAL;
>	}
>	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
>         [ ... ]
>
>So it surprises me that siw_listen_address() calls a function that
>can sleep. Do you think this is a correct analysis of the call trace
>shown below?
>

Hi Bart,

Yes, this is a BUG. Thanks very much for spotting it!
Obviously, there is not similar thing for ipv6 like
'in_dev_for_each_ifa_rtnl()'. Let me think about a
good fix to that and come back asap.

Many thanks!
Bernard.



      parent reply	other threads:[~2019-08-26  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 23:02 siw trigger BUG: sleeping function called from invalid context at mm/slab.h:50 Bart Van Assche
2019-08-23 23:41 ` Bart Van Assche
2019-08-26  8:00 ` Bernard Metzler [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=OFF0E427F2.51415251-ON00258462.002C0261-00258462.002C0268@notes.na.collabserv.com \
    --to=bmt@zurich.ibm.com \
    --cc=bvanassche@acm.org \
    --cc=linux-rdma@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;
as well as URLs for NNTP newsgroup(s).