On 2/22/21 2:56 PM, Alexei Starovoitov wrote:
On Wed, Feb 17, 2021 at 10:18:08AM -0800, Yonghong Song wrote:
+ ret = BPF_CAST_CALL(callback_fn)((u64)(long)map,
+ (u64)(long)key, (u64)(long)val,
+ (u64)(long)callback_ctx, 0);
+ if (ret) {
+ rcu_read_unlock();
+ ret = (ret == 1) ? 0 : -EINVAL;
+ goto out;
There is a tnum(0,1) check in patch 4.
I'm missing the purpose of this additional check.
I missed this one after I added tnum(0, 1) checking. Will fix in the
next revision.
+ }
+ }
+ rcu_read_unlock();
+ }
+out:
+ migrate_enable();
+ return ret ?: num_calls;
+}