~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings, Bastian Blank, Ben Hutchings, Uwe Kleine-König
  • Date: 2012-03-04 15:32:20 UTC
  • mfrom: (1.3.14)
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20120304153220-zbhqnmufx18yk6q4
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.8
  - [i386] i387: move TS_USEDFPU flag from thread_info to task_struct
  - [x86] additional refactoring of FPU/SSE state save and restore
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.9
  - vfs: fix d_inode_lookup() dentry ref leak
  - target: Allow control CDBs with data > 1 page
  - epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
  - epoll: ep_unregister_pollwait() can use the freed pwq->whead
  - epoll: limit paths (CVE-2011-1083)
  - cdrom: use copy_to_user() without the underscores

[ Bastian Blank ]
* [mips,mipsel] Also remove ext4 modules from installer.

[ Ben Hutchings ]
* Update debconf template translations:
  - Update Dutch (Willem Kuyn) (Closes: #658736)
  - Add Polish (Michał Kułach) (Closes: #658912)
* Bump ABI to 2
* fs: Introduce and enable security restrictions on links:
  - Do not follow symlinks in /tmp that are owned by other users
    (sysctl: fs.protected_symlinks)
  - Do not allow unprivileged users to create hard links to sensitive files
    (sysctl: fs.protected_hardlinks) (Closes: #609455)
    + This breaks the 'at' package in stable, which will be fixed shortly
      (see #597130)
  The precise restrictions are specified in Documentation/sysctl/fs.txt in
  the linux-doc-3.2 and linux-source-3.2 packages.
* iwlwifi: fix key removal (Closes: #651199)
* cgroups: Set CGROUP_PERF
* hid: Enable HID_HOLTEK, HID_PRIMAX, HID_SPEEDLINK, HID_WIIMOTE as modules,
  HID_ACRUX_FF
* media/rc: Enable RC_ATI_REMOTE as module
* gspca: Enable USB_GSPCA_TOPRO as module
* dvb-usb: Enable DVB_USB_PCTV452E, DVB_USB_MXL111SF as modules

[ Uwe Kleine-König ]
* [x86] Update rt featureset to 3.2.9-rt15

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
  *  See Documentation/rt-mutex-design.txt for details.
104
104
  */
105
105
 #include <linux/spinlock.h>
106
 
@@ -95,6 +101,12 @@ static inline void mark_rt_mutex_waiters
 
106
@@ -96,6 +102,12 @@ static inline void mark_rt_mutex_waiters
107
107
 }
108
108
 #endif
109
109
 
116
116
 /*
117
117
  * Calculate task priority from the waiter list priority
118
118
  *
119
 
@@ -141,6 +153,14 @@ static void rt_mutex_adjust_prio(struct 
 
119
@@ -142,6 +154,14 @@ static void rt_mutex_adjust_prio(struct 
120
120
        raw_spin_unlock_irqrestore(&task->pi_lock, flags);
121
121
 }
122
122
 
131
131
 /*
132
132
  * Max number of times we'll walk the boosting chain:
133
133
  */
134
 
@@ -252,13 +272,15 @@ static int rt_mutex_adjust_prio_chain(st
 
134
@@ -253,13 +273,15 @@ static int rt_mutex_adjust_prio_chain(st
135
135
        /* Release the task */
136
136
        raw_spin_unlock_irqrestore(&task->pi_lock, flags);
137
137
        if (!rt_mutex_owner(lock)) {
150
150
                raw_spin_unlock(&lock->wait_lock);
151
151
                goto out_put_task;
152
152
        }
153
 
@@ -303,6 +325,25 @@ static int rt_mutex_adjust_prio_chain(st
 
153
@@ -304,6 +326,25 @@ static int rt_mutex_adjust_prio_chain(st
154
154
        return ret;
155
155
 }
156
156
 
176
176
 /*
177
177
  * Try to take an rt-mutex
178
178
  *
179
 
@@ -312,8 +353,9 @@ static int rt_mutex_adjust_prio_chain(st
 
179
@@ -313,8 +354,9 @@ static int rt_mutex_adjust_prio_chain(st
180
180
  * @task:   the task which wants to acquire the lock
181
181
  * @waiter: the waiter that is queued to the lock's wait list. (could be NULL)
182
182
  */
188
188
 {
189
189
        /*
190
190
         * We have to be careful here if the atomic speedups are
191
 
@@ -346,12 +388,14 @@ static int try_to_take_rt_mutex(struct r
 
191
@@ -347,12 +389,14 @@ static int try_to_take_rt_mutex(struct r
192
192
         * 3) it is top waiter
193
193
         */
194
194
        if (rt_mutex_has_waiters(lock)) {
207
207
        if (waiter || rt_mutex_has_waiters(lock)) {
208
208
                unsigned long flags;
209
209
                struct rt_mutex_waiter *top;
210
 
@@ -376,7 +420,6 @@ static int try_to_take_rt_mutex(struct r
 
210
@@ -377,7 +421,6 @@ static int try_to_take_rt_mutex(struct r
211
211
                raw_spin_unlock_irqrestore(&task->pi_lock, flags);
212
212
        }
213
213
 
215
215
        debug_rt_mutex_lock(lock);
216
216
 
217
217
        rt_mutex_set_owner(lock, task);
218
 
@@ -386,6 +429,13 @@ static int try_to_take_rt_mutex(struct r
 
218
@@ -387,6 +430,13 @@ static int try_to_take_rt_mutex(struct r
219
219
        return 1;
220
220
 }
221
221
 
229
229
 /*
230
230
  * Task blocks on lock.
231
231
  *
232
 
@@ -500,7 +550,7 @@ static void wakeup_next_waiter(struct rt
 
232
@@ -501,7 +551,7 @@ static void wakeup_next_waiter(struct rt
233
233
 
234
234
        raw_spin_unlock_irqrestore(&current->pi_lock, flags);
235
235
 
238
238
 }
239
239
 
240
240
 /*
241
 
@@ -579,18 +629,315 @@ void rt_mutex_adjust_pi(struct task_stru
 
241
@@ -580,18 +630,315 @@ void rt_mutex_adjust_pi(struct task_stru
242
242
                return;
243
243
        }
244
244
 
557
557
  * @timeout:            the pre-initialized and started timer, or NULL for none
558
558
  * @waiter:             the pre-initialized rt_mutex_waiter
559
559
  *
560
 
@@ -654,9 +1001,10 @@ rt_mutex_slowlock(struct rt_mutex *lock,
 
560
@@ -655,9 +1002,10 @@ rt_mutex_slowlock(struct rt_mutex *lock,
561
561
        struct rt_mutex_waiter waiter;
562
562
        int ret = 0;
563
563
 
569
569
 
570
570
        /* Try to acquire the lock again: */
571
571
        if (try_to_take_rt_mutex(lock, current, NULL)) {
572
 
@@ -709,6 +1057,7 @@ rt_mutex_slowtrylock(struct rt_mutex *lo
 
572
@@ -710,6 +1058,7 @@ rt_mutex_slowtrylock(struct rt_mutex *lo
573
573
        int ret = 0;
574
574
 
575
575
        raw_spin_lock(&lock->wait_lock);
577
577
 
578
578
        if (likely(rt_mutex_owner(lock) != current)) {
579
579
 
580
 
@@ -941,7 +1290,6 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy);
 
580
@@ -942,7 +1291,6 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy);
581
581
 void __rt_mutex_init(struct rt_mutex *lock, const char *name)
582
582
 {
583
583
        lock->owner = NULL;
585
585
        plist_head_init(&lock->wait_list);
586
586
 
587
587
        debug_rt_mutex_init(lock, name);
588
 
@@ -961,7 +1309,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init);
 
588
@@ -962,7 +1310,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init);
589
589
 void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
590
590
                                struct task_struct *proxy_owner)
591
591
 {
606
606
 #ifdef CONFIG_DEBUG_RT_MUTEXES
607
607
        unsigned long           ip;
608
608
        struct pid              *deadlock_task_pid;
609
 
@@ -125,4 +126,12 @@ extern int rt_mutex_finish_proxy_lock(st
 
609
@@ -126,4 +127,12 @@ extern int rt_mutex_finish_proxy_lock(st
610
610
 # include "rtmutex.h"
611
611
 #endif
612
612