[PATCH 0/2] dm era: fix metadata_open NULL deref and error propagation

[email protected]
Newsgroups dev.linux.lists.dm-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Cao Guanghui <[email protected]>

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.