]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/mlx4: Forbid using sysfs to change RoCE pkeys
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 30 Jul 2015 14:34:23 +0000 (17:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:17 +0000 (19:26 +0200)
commit6c634f2d7447b3056f69c4c6442e5eeef839a441
treebb85e4132ed438ad543d0ccb44346a529710b56a
parentfe5e52bf0b5b8a2ae1fefdb359fd8616ab7c9815
IB/mlx4: Forbid using sysfs to change RoCE pkeys

commit 2b135db3e81301d0452e6aa107349abe67b097d6 upstream.

The pkey mapping for RoCE must remain the default mapping:
VFs:
  virtual index 0 = mapped to real index 0 (0xFFFF)
  All others indices: mapped to a real pkey index containing an
                      invalid pkey.
PF:
  virtual index i = real index i.

Don't allow users to change these mappings using files found in
sysfs.

Fixes: c1e7e466120b ('IB/mlx4: Add iov directory in sysfs under the ib device')
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/sysfs.c