Re: [PATCH -mm] markers: avoid call_rcu_sched if old is NULL



On Tue, 8 Jul 2008 23:02:01 -0400 Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:

* Masami Hiramatsu (mhiramat@xxxxxxxxxx) wrote:
Introduce marker_entry_free_old() and check old pointer is NULL before
setting call_rcu_sched(), because marker_entry_remove/add_probe() can
return NULL.


Hi Masami,

I doubt this is a bug per se, because kfree accepts NULL pointers (and
kfree is the only action done on the oldptr by free_old_closure).

This cleans up the code, so I think it's good to merge your patch, but I
would definitely not classify this as a bugfix.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>

I cannot get this to apply on the rather dated tree which I have on this
rather not-on-the-internet machine. Please merge this patch locally, test,
rewrite the changelog and resend it to someone ;)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH -mm] markers: avoid call_rcu_sched if old is NULL
    ... Masami Hiramatsu wrote: ... I doubt this is a bug per se, because kfree accepts NULL pointers (and ... I think this might be a bug. ... Software Solutions Division ...
    (Linux-Kernel)
  • [PATCH] Document kfree and vfree NULL usage
    ... This patch adds comments for kfree() and vfreestating that both accept ... NULL pointers. ... I audited vfree() callers and there seems to be lots of ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH -mm] markers: avoid call_rcu_sched if old is NULL
    ... I doubt this is a bug per se, because kfree accepts NULL pointers (and ... This cleans up the code, so I think it's good to merge your patch, but I ... removes a necessary quiescent state wait from the marker code. ...
    (Linux-Kernel)
  • Re: 9pfs double kfree
    ... The first issue is a bug, I'll send a patch in a few minutes. ... area) so the kfree on line 294 don't do ... uninitialized fcall. ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH] Document kfree and vfree NULL usage (resend)
    ... This patch adds comments for kfree() and vfreestating that both accept ... NULL pointers. ... Don't free memory not originally allocated by kmalloc() ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)