netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, drt@linux.ibm.com, ljp@linux.ibm.com,
	sukadev@linux.ibm.com
Subject: [PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
Date: Fri, 22 Jan 2021 01:07:39 +0300	[thread overview]
Message-ID: <20210121220739.GA1486367@localhost.localdomain> (raw)
In-Reply-To: <20210121220150.GA1485603@localhost.localdomain>

My name is Alexey and I've tried to use IDE for kernel development.

QT Creator segfaults while parsing ibmvnic.c which is annoying as it
will start parsing after restart only to crash again.

The workaround is to either exclude ibmvnic.c from list of project files
or to apply dummy ifdef to hide the offending code.

https://bugzilla.redhat.com/show_bug.cgi?id=1886548

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

	fix modular case

 drivers/net/ethernet/ibm/ibmvnic.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5080,6 +5080,8 @@ static void ibmvnic_tasklet(struct tasklet_struct *t)
 	unsigned long flags;
 	bool done = false;
 
+	/* workaround QT Creator/libCPlusPlus.so segfault with dummy if */
+#if IS_ENABLED(CONFIG_IBMVNIC)
 	spin_lock_irqsave(&queue->lock, flags);
 	while (!done) {
 		/* Pull all the valid messages off the CRQ */
@@ -5100,6 +5102,7 @@ static void ibmvnic_tasklet(struct tasklet_struct *t)
 	if (atomic_read(&adapter->running_cap_crqs) != 0)
 		adapter->wait_capability = true;
 	spin_unlock_irqrestore(&queue->lock, flags);
+#endif
 }
 
 static int ibmvnic_reenable_crq_queue(struct ibmvnic_adapter *adapter)

  reply	other threads:[~2021-01-21 22:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 22:01 [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault Alexey Dobriyan
2021-01-21 22:07 ` Alexey Dobriyan [this message]
2021-01-22  2:44   ` [PATCH v2 " Jakub Kicinski
2021-01-22  7:25     ` Alexey Dobriyan
2021-01-21 22:31 ` [PATCH " Andrew Lunn

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=20210121220739.GA1486367@localhost.localdomain \
    --to=adobriyan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=drt@linux.ibm.com \
    --cc=ljp@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=sukadev@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).