On Mon, 6 Oct 2025 11:06:31 -0700 Linus Torvalds <[email protected]> wrote:
> On Mon, 6 Oct 2025 at 02:47, Masami Hiramatsu (Google) > <[email protected]> wrote: > > > > tw->bp_event = register_wide_hw_breakpoint(&attr, > > wprobe_perf_handler, tw); > > - if (IS_ERR((void * __force)tw->bp_event)) { > > + if (IS_ERR_PCPU((void * __force)tw->bp_event)) { > > int ret = PTR_ERR((void * __force)tw->bp_event); > > No, this is still entirely wrong. > > That casts are *WRONG*. They should not exist. And they will cause > compiler errors, because you are casting fundamentally different > pointer types. Ah, got it! > > They don't just point to different types, they aren't even in the same > address space! > > Stop adding random casts. They are a sign of type errors, and as long > as they are there, the code is buggy. OK. > > And no, it's not just that IS_ERR() that was wrong. That PTR_ERR() > won't work on a percpu pointer either. > > No more of this randomness, please. OK, let me fix that. Thank you! > > Linus -- Masami Hiramatsu (Google) <[email protected]>
