{"push_id":671534731,"size":3,"distinct_size":3,"ref":"refs/heads/lollipop-test","head":"2ec718c3d221b8652d8b01f7f0453da7c73aaa7d","before":"38843fa5950f9b4ef70e89d3cc1f500171b6e717","commits":[{"sha":"4893e1df2d2722d747aa24a85800024beb91575e","author":{"email":"42eed19c0f56a8d487deac90c6d19d6364b7ba73@samsung.com","name":"Chanwoo Choi"},"message":"PM / devfreq: Fix devfreq_remove_device() to improve the sequence of resource free\n\nThis patch modify devfreq_remove_device() to improve the sequence of resource\nfree. If executing existing devfreq_remove_device(), this function always\nexecutes _remove_devfreq() twice. In result, second _remove_devfreq() always\nreturn error value. So, This patch resolves complicated function sequence\nas following:\n\n[Flow sequence before modification]\ndevfreq_remove_device()\n   _remove_devfreq(devfreq, false)\n      kfree(devfreq);  /* Free devfreq */\n      if (!skip ...) { /* skip is false */\n         device_unregister(&devfreq->dev)\n         put_device(&devfreq->dev);\n            ...\n            dev->release()\n               devfreq_dev_release()\n                  _remove_devfreq(devfreq, true) <- Recall to free devfreq\n                  /*\n\t\t   * Always return error without freeing resource because\n\t\t   * already _remove_devfreq() frees the memory of devfreq.\n\t\t   */\n   }\n\n[Flow sequence after modification]\ndevfreq_remove_device\n   device_unregister(&devfreq->dev)\n   put_device(&devfreq->dev);\n      ..\n      dev->release()\n         devfreq_dev_release()\n            _remove_devfreq()\n               kfree(devfreq); /* Free devfreq */\n\nSigned-off-by: Chanwoo Choi <cw00.choi@samsung.com>\n[Merge conflict resolved by MyungJoo]\nSigned-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>\nSigned-off-by: Junjie Wu <junjiew@codeaurora.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/neobuddy89/shamu/commits/4893e1df2d2722d747aa24a85800024beb91575e"},{"sha":"aa110f1df359039a6c3ff416beb8c6ed51114e23","author":{"email":"bb05168246ed1a6b66d0e7b1ffb0c5e3707764ca@codeaurora.org","name":"Junjie Wu"},"message":"PM / devfreq: governor_cpufreq: Rewrite locking to avoid deadlocks\n\nA devfreq governor store in parallel with a cpu freq update can cause\ndeadlock as shown below.\n\nAssume current devfreq governor is cpufreq, and user tries to change\nto some other governor.\n\nWrite to sysfs store_governor   | cpufreq driver updating cpu freq\n------------------------------- | -----------------------------------\necho bw_hwmon > governor        |\n                                | takes rcu_read_lock and calls all\n                                | cpufreq transition callbacks for\n                                | PRECHANGE or POSTCHANGE\n                                |\nGOV_STOP on governor_cpufreq.   |\nunregister_cpufreq() accquires  |\nstate_lock mutex.               |\n                                | try to accquire same state_lock in\n                                | cpufreq_trans_notifier(). Blocked.\nunregister from cpufreq         |\ntransition notifier and wait for|\nall rcu_readers to finish.      |\n                            Deadlock\n\nA similar deadlock can happen with governor change and policy notifier\ncallbacks.\n\nThe state_lock currently protects multiple unrelated critical\nsections: registering/unregistering of cpufreq notifiers, read/writing\nthe device list, and tracking the cpu states and updating device\nfrequencies. There is no need for register/unregister of the cpufreq\nnotifiers to be mutually excluded against the other critical sections\nusing the same lock.\n\nSplit state_lock into two locks to protect the register/unregister of\ncpufreq notifiers from the rest of the critical sections.\n\nSigned-off-by: Pan Fang <fangpan@codeaurora.org>\nSigned-off-by: Arun KS <arunks@codeaurora.org>\nSigned-off-by: Junjie Wu <junjiew@codeaurora.org>\nSuggested-by: Saravana Kannan <skannan@codeaurora.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/neobuddy89/shamu/commits/aa110f1df359039a6c3ff416beb8c6ed51114e23"},{"sha":"2ec718c3d221b8652d8b01f7f0453da7c73aaa7d","author":{"email":"bb05168246ed1a6b66d0e7b1ffb0c5e3707764ca@codeaurora.org","name":"Junjie Wu"},"message":"qcom-cpufreq: Use devm_kfree() to match devm_kzalloc()\n\nFrequency table is allocated with devm_kzalloc() and thus should be\nfreed using devm_kfree().\n\nSigned-off-by: Junjie Wu <junjiew@codeaurora.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/neobuddy89/shamu/commits/2ec718c3d221b8652d8b01f7f0453da7c73aaa7d"}]}