lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87in9zd4gy.fsf@notabene.neil.brown.name>
Date:   Wed, 14 Mar 2018 08:56:45 +1100
From:   NeilBrown <neilb@...e.com>
To:     Arnd Bergmann <arnd@...db.de>, Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Aliaksei Karaliou <akaraliou.dev@...il.com>,
        lustre-devel@...ts.lustre.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: lustre: use module_name() macro for debug printf

On Tue, Mar 13 2018, Arnd Bergmann wrote:

> We now allow lustre to be built when CONFIG_MODULES is disabled,
> but that causes a build failure:
>
> In file included from drivers/staging/lustre/include/linux/libcfs/libcfs.h:42,
>                  from drivers/staging/lustre/lustre/obdclass/lu_object.c:44:
> drivers/staging/lustre/lustre/obdclass/lu_object.c: In function 'lu_context_key_degister':
> drivers/staging/lustre/lustre/obdclass/lu_object.c:1410:51: error: dereferencing pointer to incomplete type 'struct module'
>
> This particular case can be avoided by using the module_name()
> macro that was designed exactly to handle printing the name of
> a module in all configurations.

Learn something new every day :-)

Reviewed-by: NeilBrown <neilb@...e.com>

Thanks,
NeilBrown

>
> Cc: NeilBrown <neilb@...e.com>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> index 8ddf23b82a2c..3ae16e8501c2 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> @@ -1407,7 +1407,7 @@ void lu_context_key_degister(struct lu_context_key *key)
>  	while (atomic_read(&key->lct_used) > 1) {
>  		spin_unlock(&lu_keys_guard);
>  		CDEBUG(D_INFO, "%s: \"%s\" %p, %d\n",
> -		       __func__, key->lct_owner ? key->lct_owner->name : "",
> +		       __func__, module_name(key->lct_owner),
>  		       key, atomic_read(&key->lct_used));
>  		schedule();
>  		spin_lock(&lu_keys_guard);
> @@ -1547,7 +1547,7 @@ void lu_context_key_quiesce(struct lu_context_key *key)
>  			spin_unlock(&lu_keys_guard);
>  			CDEBUG(D_INFO, "%s: \"%s\" %p, %d (%d)\n",
>  			       __func__,
> -			       key->lct_owner ? key->lct_owner->name : "",
> +			       module_name(key->lct_owner),
>  			       key, atomic_read(&key->lct_used),
>  			atomic_read(&lu_key_initing_cnt));
>  			schedule();
> -- 
> 2.9.0

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ