Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 551fd612 authored by Roland Dreier's avatar Roland Dreier
Browse files

IPoIB: Only allow root to change between datagram and connected mode



Change the permissions of the "mode" sysfs attribute to be S_IWUSR
instead of S_IWUGO.

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 11282b32
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1138,7 +1138,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
	return -EINVAL;
}

static DEVICE_ATTR(mode, S_IWUGO | S_IRUGO, show_mode, set_mode);
static DEVICE_ATTR(mode, S_IWUSR | S_IRUGO, show_mode, set_mode);

int ipoib_cm_add_mode_attr(struct net_device *dev)
{