On 1/29/2020 2:06 PM, Gal Pressman wrote: > On 26/01/2020 19:15, Leon Romanovsky wrote: >> From: Maor Gottlieb <maorg@xxxxxxxxxxxx> >> >> We don't need to set pkey as valid in case that user set only one >> of pkey index or port number, otherwise it will be resulted in NULL >> pointer dereference while accessing to uninitialized pkey list. > Why would the pkey list be uninitialized? Isn't it initialized as an empty list > on device registration? It will try to access to list of invalid port / pkey, e.g. to list of port 0. port_data is indexed by port number. dev->port_data[pp->port_num].pkey_list