Whamcloud - gitweb
LU-15119 tgt: BUG at tgt_brw_read+0x16bf/0x1d80 73/45273/3
authorAndriy Skulysh <c17819@cray.com>
Wed, 6 Oct 2021 10:25:12 +0000 (13:25 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Nov 2021 03:49:25 +0000 (03:49 +0000)
struct tgt_thread_big_cache {
  local = {{
      lnb_file_offset = 0,
      lnb_page_offset = 0,
      lnb_len = 0,
      lnb_rc = 0,
      lnb_page = 0xffffddee74fae100,
so npages_read becomes 0

Change-Id: Ie2201c9fc6f0350b1c6dcb480cff52f44d5413db
HPE-bug-id: LUS-10510
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-on: https://review.whamcloud.com/45273
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/target/tgt_handler.c

index 3f3a3b5..5e97949 100644 (file)
@@ -1948,6 +1948,9 @@ static int check_read_checksum(struct niobuf_local *local_nb, int npages,
        enum cksum_types cksum_type;
        loff_t start, end;
 
+       if (unlikely(npages <= 0))
+               return 0;
+
        /* unlikely to happen and only if resend does not occur due to cksum
         * control failure on Client */
        if (unlikely(server_cksum == client_cksum)) {