diff mbox series

[net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault

Message ID 20210121220150.GA1485603@localhost.localdomain (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 5 maintainers not CCed: benh@kernel.crashing.org mpe@ellerman.id.au paulus@samba.org linuxppc-dev@lists.ozlabs.org kuba@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Alexey Dobriyan Jan. 21, 2021, 10:01 p.m. UTC
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>
---

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

Comments

Andrew Lunn Jan. 21, 2021, 10:31 p.m. UTC | #1
On Fri, Jan 22, 2021 at 01:01:50AM +0300, Alexey Dobriyan wrote:
> 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

Sorry, but this is not going to be accepted.

Can you narrow it down further. In bugzilla, you say the includes are
wrong. How exactly?

       Andrew
diff mbox series

Patch

--- 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 ifdef */
+#ifdef 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)