Whamcloud - gitweb
LU-5635 llog: prevent out-of-bound index
[fs/lustre-release.git] / lustre / obdclass / llog.c
index a4fbc25..2f3b9e4 100644 (file)
@@ -301,6 +301,11 @@ static int llog_process_thread(void *arg)
         else
                 last_index = LLOG_BITMAP_BYTES * 8 - 1;
 
+       if (index > last_index) {
+               /* Record is not in this buffer. */
+               GOTO(out, rc);
+       }
+
         while (rc == 0) {
                 struct llog_rec_hdr *rec;