Skip to contentSkip to conversation

crypto: api: Do not access module name directly from module structure

PATCH In review Guenter Roeck 2 participants 3 messages Apr 24, 2015 – Apr 25, 2015 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: api: Do not access module name directly from module structure

'struct module' is only fully declared if CONFIG_MODULES is configured. If not, the build fails with

crypto/algapi.c: In function 'crypto_check_module_sig':
crypto/algapi.c:49:12: error: dereferencing pointer to incomplete type

Fixes 59afdc7b3214 ("crypto: api - Move module sig ifdef into accessor

function")

Cc Herbert Xu <[email protected]>
Cc Rusty Russell <[email protected]>

---
Seen in next-20150424.

 crypto/algapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/algapi.c +1 -1
index c63836f4ff64..3103e6a1282e 100644
@@ -46,7 +46,7 @@ static inline void crypto_check_module_sig(struct module *mod)
 {
 	if (fips_enabled && mod && !module_sig_ok(mod))
 		panic("Module %s signature verification failed in FIPS mode\n",
-		      mod->name);
+		      module_name(mod));
 }
 
 static int crypto_check_alg(struct crypto_alg *alg)
Signature · 1 line
2.1.0
maintainer
#1 lore raw
Quoted 6 lines · Guenter Roeck

'struct module' is only fully declared if CONFIG_MODULES is configured. If not, the build fails with

crypto/algapi.c: In function 'crypto_check_module_sig':
crypto/algapi.c:49:12: error: dereferencing pointer to incomplete type

Quoted 7 lines
Fixes 59afdc7b3214 ("crypto: api - Move module sig ifdef into accessor

function")

Cc Herbert Xu <[email protected]>
Cc Rusty Russell <[email protected]>

---
Seen in next-20150424.

Thanks but a similar patch has already been queued.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 15 lines · Herbert Xu
Quoted 6 lines · Guenter Roeck

'struct module' is only fully declared if CONFIG_MODULES is configured. If not, the build fails with

crypto/algapi.c: In function 'crypto_check_module_sig':
crypto/algapi.c:49:12: error: dereferencing pointer to incomplete type

Quoted 7 lines
Fixes 59afdc7b3214 ("crypto: api - Move module sig ifdef into accessor

function")

Cc Herbert Xu <[email protected]>
Cc Rusty Russell <[email protected]>

---
Seen in next-20150424.

Quoted 1 line

Thanks but a similar patch has already been queued.

Excellent.

Thanks,
Guenter