All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
@ 2021-01-21 22:01 Alexey Dobriyan
  2021-01-21 22:07 ` [PATCH v2 " Alexey Dobriyan
  2021-01-21 22:31 ` [PATCH " Andrew Lunn
  0 siblings, 2 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2021-01-21 22:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, drt, ljp, sukadev

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(+)

--- 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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
  2021-01-21 22:01 [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault Alexey Dobriyan
@ 2021-01-21 22:07 ` Alexey Dobriyan
  2021-01-22  2:44   ` Jakub Kicinski
  2021-01-21 22:31 ` [PATCH " Andrew Lunn
  1 sibling, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2021-01-21 22:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, drt, ljp, sukadev

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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
  2021-01-21 22:01 [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault Alexey Dobriyan
  2021-01-21 22:07 ` [PATCH v2 " Alexey Dobriyan
@ 2021-01-21 22:31 ` Andrew Lunn
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2021-01-21 22:31 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: davem, netdev, drt, ljp, sukadev

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
  2021-01-21 22:07 ` [PATCH v2 " Alexey Dobriyan
@ 2021-01-22  2:44   ` Jakub Kicinski
  2021-01-22  7:25     ` Alexey Dobriyan
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2021-01-22  2:44 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: davem, netdev, drt, ljp, sukadev

On Fri, 22 Jan 2021 01:07:39 +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
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

That's a bug in QT Creator and whatever parsing it does/uses.

Sorry we can't take this patch, there is no indication that the kernel
code is actually wrong here.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault
  2021-01-22  2:44   ` Jakub Kicinski
@ 2021-01-22  7:25     ` Alexey Dobriyan
  0 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2021-01-22  7:25 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, drt, ljp, sukadev

On Thu, Jan 21, 2021 at 06:44:54PM -0800, Jakub Kicinski wrote:
> On Fri, 22 Jan 2021 01:07:39 +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
> > 
> > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> 
> That's a bug in QT Creator and whatever parsing it does/uses.
> 
> Sorry we can't take this patch, there is no indication that the kernel
> code is actually wrong here.

It is QtC bug. It will take ages for distros to pick up the fix
(which doesn't even exist probably).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-22  7:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 22:01 [PATCH net-next] ibmvnic: workaround QT Creator/libCPlusPlus segfault Alexey Dobriyan
2021-01-21 22:07 ` [PATCH v2 " Alexey Dobriyan
2021-01-22  2:44   ` Jakub Kicinski
2021-01-22  7:25     ` Alexey Dobriyan
2021-01-21 22:31 ` [PATCH " Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.