target: fix PR state file path truncation
authorDavid Disseldorp <ddiss@suse.de>
Wed, 18 Oct 2017 23:39:19 +0000 (01:39 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 4 Nov 2017 22:00:17 +0000 (15:00 -0700)
commitbdc79f0ed12ff55a9b56a91da04d0c8d8a786b9c
tree6742beee0ec5e5dbc078c4362392491294f76af0
parent1ae01724ae92004be36a6c11c4d5a9f94e915204
target: fix PR state file path truncation

If an LIO backstore is configured with a sufficiently long Unit Serial
string, alongside a similarly long dbroot path, then a truncated
Persistent Reservation APTPL state file path will be used. This
truncation can unintentionally lead to two LUs with differing serial
numbers sharing PR state file.

Fixes: fdddf932269a ("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_pr.c