Re: [PATCH bpf-next v4 05/21] bpf: implement bpf_seq_read() for bpf iterator

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

 





On 5/9/20 5:30 PM, Alexei Starovoitov wrote:
On Sat, May 09, 2020 at 10:59:04AM -0700, Yonghong Song wrote:
+
+		err = seq->op->show(seq, p);
+		if (err > 0) {
+			seq->count = offs;

as far as I can see this condition can never happen.
I understand that seq_read() has this logic, but four iterators
implemented don't exercise this path.
I guess it's ok to keep it, but may be add warn_once so we notice
when things change?

Yes, it won't happen with our current bpf return values.
I keep it to be compatible with seq_read() and for potential
future use in case we want to enable this.
we will add a warn_once here.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux