mbox series

[net-next,0/2] devlink: Use nla_policy to validate range

Message ID 20200921164130.83720-1-parav@nvidia.com
Headers show
Series devlink: Use nla_policy to validate range | expand

Message

Parav Pandit Sept. 21, 2020, 4:41 p.m. UTC
This two small patches uses nla_policy to validate user specified
fields are in valid range or not.

Patch summary:
Patch-1 checks the range of eswitch mode field
Patch-2 checks for the port type field. It eliminates a check in
code by using nla policy infrastructure.

Parav Pandit (2):
  devlink: Enhance policy to validate eswitch mode value
  devlink: Enhance policy to validate port type input value

 net/core/devlink.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jakub Kicinski Sept. 21, 2020, 10:47 p.m. UTC | #1
On Mon, 21 Sep 2020 19:41:28 +0300 Parav Pandit wrote:
> This two small patches uses nla_policy to validate user specified
> fields are in valid range or not.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
David Miller Sept. 23, 2020, 12:39 a.m. UTC | #2
From: Parav Pandit <parav@nvidia.com>
Date: Mon, 21 Sep 2020 19:41:28 +0300

> This two small patches uses nla_policy to validate user specified
> fields are in valid range or not.
> 
> Patch summary:
> Patch-1 checks the range of eswitch mode field
> Patch-2 checks for the port type field. It eliminates a check in
> code by using nla policy infrastructure.

Series applied, thanks.