HFI1: Range-check proc->fd_priv_table[]

sockioctl01.c in LTP calls ioctl(1025, ...) and causes kernel page-fault without
the range-check.

Change-Id: I4117783e20107f274c0857b09745f12a5cc5ce2f
This commit is contained in:
Masamichi Takagi
2018-06-11 14:20:25 +09:00
committed by Balazs Gerofi
parent ca9894108b
commit 6c0bb9e576
3 changed files with 10 additions and 6 deletions

View File

@@ -578,7 +578,8 @@ struct process {
int nr_processes; /* For partitioned execution */
int process_rank; /* Rank in partition */
void *fd_priv_table[256];
#define MAX_FD_PRIV 256
void *fd_priv_table[MAX_FD_PRIV];
/* HFI1 specific */
void *hfi1_kregbase;
void *hfi1_piobase;