All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] dm era: fix metadata_open NULL deref and error propagation
@ 2026-06-17  6:00 ghuicao
  2026-06-17  6:00 ` [PATCH 1/2] dm era: fix NULL pointer dereference in metadata_open() ghuicao
  2026-06-17  6:00 ` [PATCH 2/2] dm era: fix error code propagation in era_ctr() ghuicao
  0 siblings, 2 replies; 5+ messages in thread
From: ghuicao @ 2026-06-17  6:00 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Alasdair Kergon, Mikulas Patocka, Benjamin Marzinski, dm-devel,
	linux-kernel, Cao Guanghui

From: Cao Guanghui <caoguanghui@kylinos.cn>

This series fixes two issues in dm-era:

1. metadata_open() returns NULL on kzalloc failure, but era_ctr() only
   checks IS_ERR(), causing a NULL pointer dereference.

2. era_ctr() replaces actual error codes from dm_get_device() and
   dm_set_target_max_io_len() with hardcoded -EINVAL, making diagnosis
   harder for users.

Both are straightforward fixes with no functional change for the
success path.

Cao Guanghui (2):
  dm era: fix NULL pointer dereference in metadata_open()
  dm era: fix error code propagation in era_ctr()

 drivers/md/dm-era-target.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2026-06-18 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17  6:00 [PATCH 0/2] dm era: fix metadata_open NULL deref and error propagation ghuicao
2026-06-17  6:00 ` [PATCH 1/2] dm era: fix NULL pointer dereference in metadata_open() ghuicao
2026-06-18 11:55   ` Su Yue
2026-06-17  6:00 ` [PATCH 2/2] dm era: fix error code propagation in era_ctr() ghuicao
2026-06-18 11:58   ` Su Yue

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.