linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] debugfs: Fix module state check condition
@ 2020-08-11 15:01 Vladis Dronov
  2020-09-04 11:42 ` Vladis Dronov
  0 siblings, 1 reply; 6+ messages in thread
From: Vladis Dronov @ 2020-08-11 15:01 UTC (permalink / raw)
  To: Taehee Yoo, gregkh, rafael, linux-fsdevel; +Cc: Vladis Dronov, linux-kernel

The '#ifdef MODULE' check in the original commit does not work as intended.
The code under the check is not built at all if CONFIG_DEBUG_FS=y. Fix this
by using a correct check.

Fixes: 275678e7a9be ("debugfs: Check module state before warning in {full/open}_proxy_open()")
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
---
 fs/debugfs/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index b167d2d02148..a768a09430c3 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -177,7 +177,7 @@ static int open_proxy_open(struct inode *inode, struct file *filp)
 		goto out;
 
 	if (!fops_get(real_fops)) {
-#ifdef MODULE
+#ifdef CONFIG_MODULES
 		if (real_fops->owner &&
 		    real_fops->owner->state == MODULE_STATE_GOING)
 			goto out;
@@ -312,7 +312,7 @@ static int full_proxy_open(struct inode *inode, struct file *filp)
 		goto out;
 
 	if (!fops_get(real_fops)) {
-#ifdef MODULE
+#ifdef CONFIG_MODULES
 		if (real_fops->owner &&
 		    real_fops->owner->state == MODULE_STATE_GOING)
 			goto out;
-- 
2.26.2


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

* Re: [PATCH] debugfs: Fix module state check condition
  2020-08-11 15:01 [PATCH] debugfs: Fix module state check condition Vladis Dronov
@ 2020-09-04 11:42 ` Vladis Dronov
  2020-09-04 11:50   ` Greg KH
  2020-09-04 16:12   ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Vladis Dronov @ 2020-09-04 11:42 UTC (permalink / raw)
  To: vdronov; +Cc: ap420073, gregkh, linux-fsdevel, linux-kernel, rafael

Hello,

Dear maintainers, could you please look at the above patch, that
previously was sent during a merge window?

A customer which has reported this issue replied with a test result:

> I ran the same test.
> Started ib_write_bw traffic and started watch command to read RoCE
> stats : watch -d -n 1 "cat /sys/kernel/debug/bnxt_re/bnxt_re0/info".
> While the command is running, unloaded roce driver and I did not
> observe the call trace that was seen earlier.

Regards,
Vladis


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

* Re: [PATCH] debugfs: Fix module state check condition
  2020-09-04 11:42 ` Vladis Dronov
@ 2020-09-04 11:50   ` Greg KH
  2020-09-04 11:58     ` Vladis Dronov
  2020-09-04 16:12   ` Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-09-04 11:50 UTC (permalink / raw)
  To: Vladis Dronov; +Cc: ap420073, linux-fsdevel, linux-kernel, rafael

On Fri, Sep 04, 2020 at 01:42:07PM +0200, Vladis Dronov wrote:
> Hello,
> 
> Dear maintainers, could you please look at the above patch, that
> previously was sent during a merge window?
> 
> A customer which has reported this issue replied with a test result:
> 
> > I ran the same test.
> > Started ib_write_bw traffic and started watch command to read RoCE
> > stats : watch -d -n 1 "cat /sys/kernel/debug/bnxt_re/bnxt_re0/info".
> > While the command is running, unloaded roce driver and I did not
> > observe the call trace that was seen earlier.

It's in my queue, but bugs you can only trigger while root are a bit
lower on the priority list :)

thanks,

greg k-h

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

* Re: [PATCH] debugfs: Fix module state check condition
  2020-09-04 11:50   ` Greg KH
@ 2020-09-04 11:58     ` Vladis Dronov
  0 siblings, 0 replies; 6+ messages in thread
From: Vladis Dronov @ 2020-09-04 11:58 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-fsdevel, linux-kernel

Hello, Greg, all,

----- Original Message -----
> From: "Greg KH" <gregkh@linuxfoundation.org>
> Subject: Re: [PATCH] debugfs: Fix module state check condition
> 
...skip...
> 
> It's in my queue, but bugs you can only trigger while root are a bit
> lower on the priority list :)

Oh, apologies. I really thought this has been somehow lost/slipped.
Thank you for the reply and a confirmation.

/me stops bothering people.

> thanks,
> 
> greg k-h
> 
> 

Regards,
Vladis


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

* Re: [PATCH] debugfs: Fix module state check condition
  2020-09-04 11:42 ` Vladis Dronov
  2020-09-04 11:50   ` Greg KH
@ 2020-09-04 16:12   ` Greg KH
  2020-09-07 11:47     ` Vladis Dronov
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-09-04 16:12 UTC (permalink / raw)
  To: Vladis Dronov; +Cc: ap420073, linux-fsdevel, linux-kernel, rafael

On Fri, Sep 04, 2020 at 01:42:07PM +0200, Vladis Dronov wrote:
> Hello,
> 
> Dear maintainers, could you please look at the above patch, that
> previously was sent during a merge window?
> 
> A customer which has reported this issue replied with a test result:
> 
> > I ran the same test.
> > Started ib_write_bw traffic and started watch command to read RoCE
> > stats : watch -d -n 1 "cat /sys/kernel/debug/bnxt_re/bnxt_re0/info".
> > While the command is running, unloaded roce driver and I did not
> > observe the call trace that was seen earlier.

Having this info, that this was affecting a user, would have been good
in the original changelog info, otherwise this just looked like a code
cleanup patch to me.

I'll go queue this up now, thanks.

greg k-h

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

* Re: [PATCH] debugfs: Fix module state check condition
  2020-09-04 16:12   ` Greg KH
@ 2020-09-07 11:47     ` Vladis Dronov
  0 siblings, 0 replies; 6+ messages in thread
From: Vladis Dronov @ 2020-09-07 11:47 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-fsdevel, linux-kernel

Hello, Greg,

----- Original Message -----
> From: "Greg KH" <gregkh@linuxfoundation.org>
> Subject: Re: [PATCH] debugfs: Fix module state check condition
> 
...skip...
> > A customer which has reported this issue replied with a test result:
> > 
> > > I ran the same test.
> > > Started ib_write_bw traffic and started watch command to read RoCE
> > > stats : watch -d -n 1 "cat /sys/kernel/debug/bnxt_re/bnxt_re0/info".
> > > While the command is running, unloaded roce driver and I did not
> > > observe the call trace that was seen earlier.
> 
> Having this info, that this was affecting a user, would have been good
> in the original changelog info, otherwise this just looked like a code
> cleanup patch to me.

Thank you, Greg. Makes sense indeed, I will pay attention to this next time(s).

<rant>oh so many little but important details to know and follow...</rant>

> I'll go queue this up now, thanks.
> 
> greg k-h

Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer


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

end of thread, other threads:[~2020-09-07 11:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 15:01 [PATCH] debugfs: Fix module state check condition Vladis Dronov
2020-09-04 11:42 ` Vladis Dronov
2020-09-04 11:50   ` Greg KH
2020-09-04 11:58     ` Vladis Dronov
2020-09-04 16:12   ` Greg KH
2020-09-07 11:47     ` Vladis Dronov

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