From: Greg Kroah-Hartman Date: Thu, 5 Aug 2010 23:02:24 +0000 (-0700) Subject: .35 patches X-Git-Tag: v2.6.27.50~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e78dd4d03c259f1521564a6583f9aa26d705dfdd;p=thirdparty%2Fkernel%2Fstable-queue.git .35 patches --- diff --git a/queue-2.6.35/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch b/queue-2.6.35/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch new file mode 100644 index 00000000000..3809bdeaca0 --- /dev/null +++ b/queue-2.6.35/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch @@ -0,0 +1,35 @@ +From a91c1be21704113b023919826c6d531da46656ef Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Fri, 12 Mar 2010 16:14:42 -0600 +Subject: SCSI: enclosure: fix error path - actually return ERR_PTR() on error + +From: James Bottomley + +commit a91c1be21704113b023919826c6d531da46656ef upstream. + +we also need to clean up and free the cdev. + +Reported-by: Jani Nikula +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/enclosure.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/misc/enclosure.c ++++ b/drivers/misc/enclosure.c +@@ -285,8 +285,11 @@ enclosure_component_register(struct encl + cdev->groups = enclosure_groups; + + err = device_register(cdev); +- if (err) +- ERR_PTR(err); ++ if (err) { ++ ecomp->number = -1; ++ put_device(cdev); ++ return ERR_PTR(err); ++ } + + return ecomp; + } diff --git a/queue-2.6.35/series b/queue-2.6.35/series index 7fc9357da59..3414e0f4029 100644 --- a/queue-2.6.35/series +++ b/queue-2.6.35/series @@ -28,3 +28,5 @@ cfg80211-ignore-spurious-deauth.patch cfg80211-don-t-get-expired-bsses.patch mac80211-avoid-scheduling-while-atomic-in-mesh_rx_plink_frame.patch cred-fix-rcu-warning-due-to-previous-patch-fixing-__task_cred-s-checks.patch +scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch +xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch diff --git a/queue-2.6.35/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch b/queue-2.6.35/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch new file mode 100644 index 00000000000..358bd90f4c9 --- /dev/null +++ b/queue-2.6.35/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch @@ -0,0 +1,86 @@ +From 8a22b9996b001c88f2bfb54c6de6a05fc39e177a Mon Sep 17 00:00:00 2001 +From: Jeremy Fitzhardinge +Date: Mon, 12 Jul 2010 11:49:59 -0700 +Subject: xen: drop xen_sched_clock in favour of using plain wallclock time + +From: Jeremy Fitzhardinge + +commit 8a22b9996b001c88f2bfb54c6de6a05fc39e177a upstream. + +xen_sched_clock only counts unstolen time. In principle this should +be useful to the Linux scheduler so that it knows how much time a process +actually consumed. But in practice this doesn't work very well as the +scheduler expects the sched_clock time to be synchronized between +cpus. It also uses sched_clock to measure the time a task spends +sleeping, in which case "unstolen time" isn't meaningful. + +So just use plain xen_clocksource_read to return wallclock nanoseconds +for sched_clock. + +Signed-off-by: Jeremy Fitzhardinge +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/enlighten.c | 2 +- + arch/x86/xen/time.c | 39 --------------------------------------- + 2 files changed, 1 insertion(+), 40 deletions(-) + +--- a/arch/x86/xen/enlighten.c ++++ b/arch/x86/xen/enlighten.c +@@ -927,7 +927,7 @@ static const struct pv_init_ops xen_init + }; + + static const struct pv_time_ops xen_time_ops __initdata = { +- .sched_clock = xen_sched_clock, ++ .sched_clock = xen_clocksource_read, + }; + + static const struct pv_cpu_ops xen_cpu_ops __initdata = { +--- a/arch/x86/xen/time.c ++++ b/arch/x86/xen/time.c +@@ -155,45 +155,6 @@ static void do_stolen_accounting(void) + account_idle_ticks(ticks); + } + +-/* +- * Xen sched_clock implementation. Returns the number of unstolen +- * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED +- * states. +- */ +-unsigned long long xen_sched_clock(void) +-{ +- struct vcpu_runstate_info state; +- cycle_t now; +- u64 ret; +- s64 offset; +- +- /* +- * Ideally sched_clock should be called on a per-cpu basis +- * anyway, so preempt should already be disabled, but that's +- * not current practice at the moment. +- */ +- preempt_disable(); +- +- now = xen_clocksource_read(); +- +- get_runstate_snapshot(&state); +- +- WARN_ON(state.state != RUNSTATE_running); +- +- offset = now - state.state_entry_time; +- if (offset < 0) +- offset = 0; +- +- ret = state.time[RUNSTATE_blocked] + +- state.time[RUNSTATE_running] + +- offset; +- +- preempt_enable(); +- +- return ret; +-} +- +- + /* Get the TSC speed from Xen */ + unsigned long xen_tsc_khz(void) + {