)]}'
{
  "commit": "04aef32d39cc4ef80087c0ce8ed113c6d64f1a6b",
  "tree": "fb6e1231d7ac8fb38cf514c0c6107291234228d9",
  "parents": [
    "4b0a84043e0c14088958fddb62f416d050368011"
  ],
  "author": {
    "name": "Xiao Guangrong",
    "email": "xiaoguangrong@cn.fujitsu.com",
    "time": "Wed Jul 15 12:29:06 2009 +0800"
  },
  "committer": {
    "name": "Frederic Weisbecker",
    "email": "fweisbec@gmail.com",
    "time": "Thu Jul 16 23:34:32 2009 -0400"
  },
  "message": "tracing/function: Fix the return value of ftrace_trace_onoff_callback()\n\nftrace_trace_onoff_callback() will return an error even if we do the\nright operation, for example:\n\n # echo _spin_*:traceon:10 \u003e set_ftrace_filter\n -bash: echo: write error: Invalid argument\n # cat set_ftrace_filter\n #### all functions enabled ####\n _spin_trylock_bh:traceon:count\u003d10\n _spin_unlock_irq:traceon:count\u003d10\n _spin_unlock_bh:traceon:count\u003d10\n _spin_lock_irq:traceon:count\u003d10\n _spin_unlock:traceon:count\u003d10\n _spin_trylock:traceon:count\u003d10\n _spin_unlock_irqrestore:traceon:count\u003d10\n _spin_lock_irqsave:traceon:count\u003d10\n _spin_lock_bh:traceon:count\u003d10\n _spin_lock:traceon:count\u003d10\n\nWe want to set _spin_*:traceon:10 to set_ftrace_filter, it complains\nwith \"Invalid argument\", but the operation is successful.\n\nThis is because ftrace_process_regex() returns the number of functions that\nmatched the pattern. If the number is not 0, this value is returned\nby ftrace_regex_write() whereas we want to return the number of bytes\nvirtually written.\nAlso the file offset pointer is not updated in this case.\n\nIf the number of matched functions is lower than the number of bytes written\nby the user, this results to a reprocessing of the string given by the user with\na lower size, leading to a malformed ftrace regex and then a -EINVAL returned.\n\nSo, this patch fixes it by returning 0 if no error occured.\nThe fix also applies on 2.6.30\n\nSigned-off-by: Xiao Guangrong \u003cxiaoguangrong@cn.fujitsu.com\u003e\nReviewed-by: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: stable@kernel.org\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7402144bff218ddcb51a9bd7cad8c6948a481651",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_functions.c",
      "new_id": "75ef000613c35db5c7cb8ae71b2f4169f0bfd6d8",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_functions.c"
    }
  ]
}
