lkml.org 
[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/7] ftrace, PPC64: handle module trampolines for dyn ftrace

    On Mon, 17 Nov 2008, Paul Mackerras wrote:

    > Steven Rostedt writes:
    >
    > > + if (!rec->arch.mod) {
    > > + if (!mod) {
    > > + printk(KERN_ERR "No module loaded addr=%lx\n",
    > > + addr);
    > > + return -EFAULT;
    > > + }
    > > + rec->arch.mod = mod;
    > > + } else if (mod) {
    > > + printk(KERN_ERR
    > > + "Record mod %p not equal to passed in mod %p\n",
    > > + rec->arch.mod, mod);
    > > + return -EINVAL;
    >
    > That looks wrong; surely you need an if (mod != rec->arch.mod)
    > somewhere here?

    BTW, the reason this still worked was because only the first instance
    passes in mod (when rec->arch.mod does not exist). After that, mod is
    NULL, so we never enter this case. But still, I will need to fix this
    (even though I thought I did).

    -- Steve



    \
     
     \ /
      Last update: 2008-11-17 17:21    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean