* [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails
@ 2026-09-22 18:11 Thorsten Blum
2026-09-22 18:11 ` [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails Thorsten Blum
2026-10-02 7:21 ` [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Herbert Xu
0 siblings, 2 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-09-22 18:11 UTC (permalink / raw)
To: Olivia Mackall, Herbert Xu, Kees Cook, Michael Buesch,
Andrew Morton, Jan Beulich, Greg Kroah-Hartman, Chris Wright
Cc: Thorsten Blum, linux-crypto, linux-kernel
intel_init_hw_struct() incorrectly returns -EBUSY when ioremap() fails.
Return -ENOMEM instead.
Fixes: 641dd002d207 ("[PATCH] fix Intel RNG detection")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/char/hw_random/intel-rng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index d24e747203c1..a4dd21a9de98 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -318,8 +318,8 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n";
}
intel_rng_hw->mem = ioremap(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN);
- if (intel_rng_hw->mem == NULL)
- return -EBUSY;
+ if (!intel_rng_hw->mem)
+ return -ENOMEM;
return 0;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails
2026-09-22 18:11 [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Thorsten Blum
@ 2026-09-22 18:11 ` Thorsten Blum
2026-10-02 8:25 ` Herbert Xu
2026-10-02 7:21 ` [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Herbert Xu
1 sibling, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2026-09-22 18:11 UTC (permalink / raw)
To: Olivia Mackall, Herbert Xu, Kees Cook, Andrew Morton, Prarit Bhargava
Cc: Thorsten Blum, linux-crypto, linux-kernel
intel_rng_mod_init() incorrectly returns -ENODEV when kmalloc_obj()
fails. Return -ENOMEM instead.
Fixes: ee527cd3a20c ("Use stop_machine_run in the Intel RNG driver")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/char/hw_random/intel-rng.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index a4dd21a9de98..f7f734881c68 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -349,6 +349,7 @@ static int __init intel_rng_mod_init(void)
intel_rng_hw = kmalloc_obj(*intel_rng_hw);
if (!intel_rng_hw) {
pci_dev_put(dev);
+ err = -ENOMEM;
goto out;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails
2026-09-22 18:11 [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Thorsten Blum
2026-09-22 18:11 ` [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails Thorsten Blum
@ 2026-10-02 7:21 ` Herbert Xu
2026-10-02 8:31 ` Thorsten Blum
1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2026-10-02 7:21 UTC (permalink / raw)
To: Thorsten Blum
Cc: Olivia Mackall, Kees Cook, Michael Buesch, Andrew Morton,
Jan Beulich, Greg Kroah-Hartman, Chris Wright, linux-crypto,
linux-kernel
On Tue, Sep 22, 2026 at 08:11:01PM +0200, Thorsten Blum wrote:
> intel_init_hw_struct() incorrectly returns -EBUSY when ioremap() fails.
> Return -ENOMEM instead.
>
> Fixes: 641dd002d207 ("[PATCH] fix Intel RNG detection")
This commit ID appears to be incorrect (but the subject is correct).
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails
2026-09-22 18:11 ` [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails Thorsten Blum
@ 2026-10-02 8:25 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2026-10-02 8:25 UTC (permalink / raw)
To: Thorsten Blum
Cc: Olivia Mackall, Kees Cook, Andrew Morton, Prarit Bhargava,
linux-crypto, linux-kernel
On Tue, Sep 22, 2026 at 08:11:02PM +0200, Thorsten Blum wrote:
> intel_rng_mod_init() incorrectly returns -ENODEV when kmalloc_obj()
> fails. Return -ENOMEM instead.
>
> Fixes: ee527cd3a20c ("Use stop_machine_run in the Intel RNG driver")
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
> drivers/char/hw_random/intel-rng.c | 1 +
> 1 file changed, 1 insertion(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails
2026-10-02 7:21 ` [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Herbert Xu
@ 2026-10-02 8:31 ` Thorsten Blum
0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-10-02 8:31 UTC (permalink / raw)
To: Herbert Xu
Cc: Olivia Mackall, Kees Cook, Michael Buesch, Andrew Morton,
Jan Beulich, Greg Kroah-Hartman, Chris Wright, linux-crypto,
linux-kernel
On Fri, Oct 02, 2026 at 05:21:50PM +1000, Herbert Xu wrote:
> On Tue, Sep 22, 2026 at 08:11:01PM +0200, Thorsten Blum wrote:
> > intel_init_hw_struct() incorrectly returns -EBUSY when ioremap() fails.
> > Return -ENOMEM instead.
> >
> > Fixes: 641dd002d207 ("[PATCH] fix Intel RNG detection")
>
> This commit ID appears to be incorrect (but the subject is correct).
The commit ID is from stable, in mainline it is:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c24c95a085c6b52c11c2f5afecc38b0ca143cdae
The correct tag is therefore:
Fixes: c24c95a085c6 ("[PATCH] fix Intel RNG detection")
Should I submit a v2 or can you apply it like this?
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-02 8:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 18:11 [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Thorsten Blum
2026-09-22 18:11 ` [PATCH 2/2] hwrng: intel - return -ENOMEM when kmalloc_obj() fails Thorsten Blum
2026-10-02 8:25 ` Herbert Xu
2026-10-02 7:21 ` [PATCH 1/2] hwrng: intel - return -ENOMEM when ioremap() fails Herbert Xu
2026-10-02 8:31 ` Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®