]> git.baikalelectronics.ru Git - kernel.git/commit
target: fix ALUA state file path truncation
authorDavid Disseldorp <ddiss@suse.de>
Wed, 18 Oct 2017 23:39:20 +0000 (01:39 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 4 Nov 2017 22:00:30 +0000 (15:00 -0700)
commitd7f375d7158caf6a3e634dbb2cc85e5366c44a61
tree06e5ff31fadadac145ed76e2b69584d510dcd217
parentc162b9f6c8b493bb935bbed14b808beda0e7c788
target: fix ALUA state file path truncation

A sufficiently long Unit Serial string, dbroot path, and/or ALUA target
portal group name may result in truncation of the ALUA state file path
prior to usage. Fix this by using kasprintf() instead.

Fixes: f6a647d7c563 ("target: use new "dbroot" target attribute")
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_alua.c
drivers/target/target_core_alua.h