Re: [PATCH for-next v2] RDMA/nldev: Add copy-on-fork attribute to get sys command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/04/2021 15:39, Leon Romanovsky wrote:
>> @@ -1710,7 +1721,8 @@ static int nldev_set_sys_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
>>
>>       err = nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1,
>>                         nldev_policy, extack);
>> -     if (err || !tb[RDMA_NLDEV_SYS_ATTR_NETNS_MODE])
>> +     if (err || !tb[RDMA_NLDEV_SYS_ATTR_NETNS_MODE] ||
>> +         tb[RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK])
> 
> Why do we fail if user supplies RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK?

It's a read-only attribute, if someone tries to set its value I assume it's best
to return an error.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux