]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.23-updates.patch
- added description of djurban's branch
[packages/kernel.git] / linux-2.4.23-updates.patch
1 ChangeSet@1.1136.1.75  2003-12-07 21:20:48-02:00  willy at debian.org
2 [PATCH] Remove broken file lock accounting
3
4 On Mon, Jul 01, 2002 at 11:13:55PM +0100, Matthew Wilcox wrote:
5 > The file lock accounting code is horribly broken (and I wrote it, I
6 > should know).  I think the best solution to 2.4 is simply to delete it,
7 > at least for BSD-style flocks.
8 >
9 > Patch to follow.  Note that 2.5 has the same issue, but I'll fix it
10 > differently there.
11
12 Here's the patch for 2.4:
13
14 - --- linux-2.4.23/fs/locks.c.orig      Tue Dec  9 00:11:23 2003
15 +++ linux-2.4.23/fs/locks.c     Tue Dec  9 00:13:00 2003
16 @@ -135,15 +135,9 @@
17  static kmem_cache_t *filelock_cache;
18  
19  /* Allocate an empty lock structure. */
20 - -static struct file_lock *locks_alloc_lock(int account)
21 +static struct file_lock *locks_alloc_lock(void)
22  {
23 - -     struct file_lock *fl;
24 - -     if (account && current->locks >= current->rlim[RLIMIT_LOCKS].rlim_cur)
25 - -             return NULL;
26 - -     fl = kmem_cache_alloc(filelock_cache, SLAB_KERNEL);
27 - -     if (fl)
28 - -             current->locks++;
29 - -     return fl;
30 +       return kmem_cache_alloc(filelock_cache, SLAB_KERNEL);
31  }
32  
33  /* Free a lock which is not in use. */
34 @@ -153,7 +147,6 @@
35                 BUG();
36                 return;
37         }
38 - -     current->locks--;
39         if (waitqueue_active(&fl->fl_wait))
40                 panic("Attempting to free lock with active wait queue");
41  
42 @@ -220,7 +213,7 @@
43  /* Fill in a file_lock structure with an appropriate FLOCK lock. */
44  static struct file_lock *flock_make_lock(struct file *filp, unsigned int type)
45  {
46 - -     struct file_lock *fl = locks_alloc_lock(1);
47 +       struct file_lock *fl = locks_alloc_lock();
48         if (fl == NULL)
49                 return NULL;
50  
51 @@ -358,7 +351,7 @@
52  /* Allocate a file_lock initialised to this type of lease */
53  static int lease_alloc(struct file *filp, int type, struct file_lock **flp)
54  {
55 - -     struct file_lock *fl = locks_alloc_lock(1);
56 +       struct file_lock *fl = locks_alloc_lock();
57         if (fl == NULL)
58                 return -ENOMEM;
59  
60 @@ -721,7 +714,7 @@
61                          size_t count)
62  {
63         struct file_lock *fl;
64 - -     struct file_lock *new_fl = locks_alloc_lock(0);
65 +       struct file_lock *new_fl = locks_alloc_lock();
66         int error;
67  
68         if (new_fl == NULL)
69 @@ -881,8 +874,8 @@
70          * We may need two file_lock structures for this operation,
71          * so we get them in advance to avoid races.
72          */
73 - -     new_fl = locks_alloc_lock(0);
74 - -     new_fl2 = locks_alloc_lock(0);
75 +       new_fl = locks_alloc_lock();
76 +       new_fl2 = locks_alloc_lock();
77         error = -ENOLCK; /* "no luck" */
78         if (!(new_fl && new_fl2))
79                 goto out_nolock;
80 @@ -1488,7 +1481,7 @@
81  int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
82  {
83         struct file *filp;
84 - -     struct file_lock *file_lock = locks_alloc_lock(0);
85 +       struct file_lock *file_lock = locks_alloc_lock();
86         struct flock flock;
87         struct inode *inode;
88         int error;
89 @@ -1644,7 +1637,7 @@
90  int fcntl_setlk64(unsigned int fd, unsigned int cmd, struct flock64 *l)
91  {
92         struct file *filp;
93 - -     struct file_lock *file_lock = locks_alloc_lock(0);
94 +       struct file_lock *file_lock = locks_alloc_lock();
95         struct flock64 flock;
96         struct inode *inode;
97         int error;
98 ChangeSet@1.1136.1.68  2003-12-06 16:25:16-02:00  wli at holomorphy.com
99 [PATCH] Fixup smb_boot_cpus(): Fix HT detection bug
100
101 On Wed, Dec 03, 2003 at 06:41:36PM -0500, Ethan Weinstein wrote:
102 > Ok, setting CONFIG_NR_CPUS=8 does indeed solve the HT issue, looks like
103 > it was the numbering scheme:
104
105 Something like this might do the trick. NR_CPUS is already checked
106 indirectly via max_cpus.
107
108
109 - -- wli
110
111
112
113 - --- linux-2.4.23/arch/i386/kernel/smpboot.c.orig      Tue Dec  9 00:27:10 2003
114 +++ linux-2.4.23/arch/i386/kernel/smpboot.c     Tue Dec  9 00:27:23 2003
115 @@ -1106,7 +1106,7 @@
116          */
117         Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
118  
119 - -     for (bit = 0; bit < NR_CPUS; bit++) {
120 +       for (bit = 0; bit < BITS_PER_LONG; bit++) {
121                 apicid = cpu_present_to_apicid(bit);
122                 
123                 /* don't try to boot BAD_APICID */
124 Patch originally in 2.6 from Rusty but updated in bk by marcello for 
125 ChangeSet@1.1136.71.52  2003-12-04 10:32:56-08:00  laforge@netfilter.org
126
127 Marcelo> Please try the updated 2.4 BK tree (you can use -bk5, 
128 Marcelo> http://www.kernel.org/pub/linux/kernel/v2.4/snapshots/patch-2.4.23-bk5.bz2).
129
130 Marcelo> It contains a fix for a known bug in the netfilter which
131 Marcelo> might what you're hitting.
132
133 - --- linux-2.4.23/net/ipv4/netfilter/ip_fw_compat_masq.c.orig  Tue Dec  9 00:01:18 2003
134 +++ linux-2.4.23/net/ipv4/netfilter/ip_fw_compat_masq.c Tue Dec  9 00:01:27 2003
135 @@ -91,9 +91,6 @@
136                         WRITE_UNLOCK(&ip_nat_lock);
137                         return ret;
138                 }
139 - -
140 - -             place_in_hashes(ct, info);
141 - -             info->initialized = 1;
142         } else
143                 DEBUGP("Masquerading already done on this conn.\n");
144         WRITE_UNLOCK(&ip_nat_lock);
145 ChangeSet@1.1136.1.73  2003-12-07 15:10:38-02:00  mikulas at cuni.cz
146 [PATCH] from -aa tree: Fix potential fsync() race condition
147
148 > 00_ll_rw_block-sync-race-1 first appeared in 2.4.21pre4aa3 - 470 bytes
149 >
150 >  Add lock_page in ll_rw_block to fix a fs race
151 >  condition. Fix suggested by Mikulas Patocka.
152
153 Yes. You have two inodes placed in the same buffer.
154
155 Process 1 modifies inode 1 and calls fsync on it. fsync initiates write of
156 the block. ll_rw_block returns, write is in progress.
157
158 Process 2 modifies inode 2 and calls fsync on it. Filesystem calls
159 ll_rw_block write on the same buffer. ll_rw_block immediatelly returns,
160 because it sees there is already IO on the buffer (there used to be
161 something like if (buffer_locked(bh)) return;). Process 2 waits on buffer.
162
163 The write finished. Both processes are waken up. Both processes return out
164 of fsync function. Process 2 returns from fsync while it did not write its
165 inode modification to disk --- it waited on process 1's write.
166
167
168 - --- linux-2.4.23/drivers/block/ll_rw_blk.c~   Tue Dec  9 00:17:12 2003
169 +++ linux-2.4.23/drivers/block/ll_rw_blk.c      Tue Dec  9 00:17:12 2003
170 @@ -1377,9 +1377,7 @@
171         for (i = 0; i < nr; i++) {
172                 struct buffer_head *bh = bhs[i];
173  
174 - -             /* Only one thread can actually submit the I/O. */
175 - -             if (test_and_set_bit(BH_Lock, &bh->b_state))
176 - -                     continue;
177 +               lock_buffer(bh);
178  
179                 /* We have the buffer lock */
180                 atomic_inc(&bh->b_count);
181 ChangeSet@1.1136.73.4  2003-12-02 12:02:00-02:00  neilb at unsw.edu.au
182 [PATCH] Drop module count if lockd reclaimer thread failed to start.
183
184 - --- linux-2.4.23/fs/lockd/clntlock.c~ Tue Dec  9 00:35:29 2003
185 +++ linux-2.4.23/fs/lockd/clntlock.c    Tue Dec  9 00:35:29 2003
186 @@ -188,7 +188,8 @@
187                 nlmclnt_prepare_reclaim(host, newstate);
188                 nlm_get_host(host);
189                 MOD_INC_USE_COUNT;
190 - -             kernel_thread(reclaimer, host, CLONE_SIGNAL);
191 +               if(kernel_thread(reclaimer, host, CLONE_SIGNAL) < 0)
192 +                       MOD_DEC_USE_COUNT;
193         }
194  }
195  
196 ChangeSet@1.1136.1.65  2003-12-05 15:53:34-02:00  mikpe at se
197 [PATCH] fix reboot/no_idt bug
198
199 When compiling 2.4.23 with gcc-3.3.2, gcc generates the
200 following warning for arch/i386/kernel/process.c:
201
202 process.c: In function `machine_restart':
203 process.c:427: warning: use of memory input without lvalue in asm operand 0
204 is deprecated
205
206 The warning identifies a real bug. no_idt is passed to
207 lidt with an "m" constraint, which requires an l-value.
208 Since no_idt is faked as an array, gcc creates an anonymous
209 variable pointing to no_idt and passes that to lidt(*),
210 so at runtime lidt sees the wrong address. Not good.
211 (The bug, while real, is unlikely to trigger since it
212 sits in an infrequently used path in the reboot code.)
213
214 The fix is to make no_idt a struct (and thus an l-lvalue)
215 like the other gdt/idt descriptors.
216
217 This patch is a backport of the fix Linus made for the
218 same bug in 2.6.0-test4.
219
220 [Andi: x86-64 appears to have the same bug]
221
222 (*) Verified by inspection of the assembly code.
223
224 /Mikael
225
226
227 - --- linux-2.4.23/arch/i386/kernel/process.c.orig      Tue Dec  9 00:29:52 2003
228 +++ linux-2.4.23/arch/i386/kernel/process.c     Tue Dec  9 00:30:46 2003
229 @@ -153,7 +153,6 @@
230  
231  __setup("idle=", idle_setup);
232  
233 - -static long no_idt[2];
234  static int reboot_mode;
235  int reboot_thru_bios;
236  
237 @@ -224,7 +223,8 @@
238         unsigned long long * base __attribute__ ((packed));
239  }
240  real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
241 - -real_mode_idt = { 0x3ff, 0 };
242 +real_mode_idt = { 0x3ff, 0 },
243 +no_idt = { 0, 0 };
244  
245  /* This is 16-bit protected mode code to disable paging and the cache,
246     switch to real mode and jump to the BIOS reset code.
247 ChangeSet@1.1136.78.2  2003-12-07 12:43:34-02:00  wli at holomorphy.com
248 [PATCH] out_of_memory() locking
249
250 On Sun, Nov 30, 2003 at 08:18:02AM -0800, William Lee Irwin III wrote:
251 > (1) the timestamps/etc. weren't locked, and when cpus raced, it caused
252 >  false OOM kills
253 > (2) the mm could go away while scanning the tasklist, causing the thing
254 >  to try to kill kernel threads
255 > Here's a preliminary backport (please do _NOT_ apply until I or someone
256 > tests it) for you to comment on. Basically, do you want (1) and (2)
257 > split out, is the basic thing okay, etc.?
258
259 out_of_memory()'s operational variables are not locked, and can be
260 reset by multiple cpus simultaneously, causing false OOM kills.
261
262 This patch adds an oom_lock to out_of_memory() to protect its operational
263 variables.
264
265
266 - -- wli
267
268
269
270 - --- linux-2.4.23/mm/oom_kill.c.orig   Tue Dec  9 00:20:47 2003
271 +++ linux-2.4.23/mm/oom_kill.c  Tue Dec  9 00:24:20 2003
272 @@ -202,6 +202,11 @@
273   */
274  void out_of_memory(void)
275  {
276 +       /*
277 +       * oom_lock protects out_of_memory()'s static variables.
278 +       * It's a global lock; this is not performance-critical.
279 +       */
280 +       static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
281         static unsigned long first, last, count, lastkill;
282         unsigned long now, since;
283  
284 @@ -211,6 +216,7 @@
285         if (nr_swap_pages > 0)
286                 return;
287  
288 +       spin_lock(&oom_lock);
289         now = jiffies;
290         since = now - last;
291         last = now;
292 @@ -229,14 +235,14 @@
293          */
294         since = now - first;
295         if (since < HZ)
296 - -             return;
297 +               goto out_unlock;
298  
299         /*
300          * If we have gotten only a few failures,
301          * we're not really oom. 
302          */
303         if (++count < 10)
304 - -             return;
305 +               goto out_unlock;
306  
307         /*
308          * If we just killed a process, wait a while
309 @@ -245,17 +251,25 @@
310          */
311         since = now - lastkill;
312         if (since < HZ*5)
313 - -             return;
314 +               goto out_unlock;
315  
316         /*
317          * Ok, really out of memory. Kill something.
318          */
319         lastkill = now;
320 +       
321 +       /* oom_kill() can sleep */
322 +       spin_unlock(&oom_lock);
323         oom_kill();
324 +       spin_lock(&oom_lock);
325  
326  reset:
327 - -     first = now;
328 +       if (first < now)
329 +               first = now;
330         count = 0;
331 +
332 +out_unlock:
333 +       spin_unlock(&oom_lock);
334  }
335  
336  #endif /* Unused file */
337 ChangeSet@1.1136.1.61  2003-12-01 12:43:59-07:00  davidm at com[helgaas]
338
339 ia64: Fix a bug in sigtramp() which corrupted ar.rnat when unwinding
340         across a signal trampoline (in user space).  Reported by
341         Laurent Morichetti.
342
343 arch/ia64/kernel/gate.S@1.11  2003-12-01 05:43:29-07:00  davidm at com[helgaas]
344
345 (__kernel_sigtramp): Replace usage of p8 with p1.  We must use a preserved
346         predicate for the .spillsp.p directive, otherwise, the predicate
347         may have been clobbered by the time the unwinder looks at it.
348         Fortunately, we can just use p1 because the entire pr register
349         is already saved/restored by the kernel.
350
351
352 - --- linux-2.4.23/arch/ia64/kernel/gate.S~     Tue Dec  9 00:46:11 2003
353 +++ linux-2.4.23/arch/ia64/kernel/gate.S        Tue Dec  9 00:46:11 2003
354 @@ -88,10 +88,10 @@
355         ld8 r15=[base1]                                 // get address of new RBS base (or NULL)
356         cover                           // push args in interrupted frame onto backing store
357         ;;
358 - -     cmp.ne p8,p0=r15,r0             // do we need to switch the rbs?
359 +       cmp.ne p1,p0=r15,r0             // do we need to switch rbs? (note: pr is saved by kernel)
360         mov.m r9=ar.bsp                 // fetch ar.bsp
361 - -     .spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
362 - -(p8) br.cond.spnt setup_rbs          // yup -> (clobbers r14, r15, and r16)
363 +       .spillsp.p p1, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
364 +(p1)   br.cond.spnt setup_rbs          // yup -> (clobbers p8, r14, r15, and r16)
365  back_from_setup_rbs:
366         alloc r8=ar.pfs,0,0,3,0
367         ld8 out0=[base0],16             // load arg0 (signum)
368 @@ -130,8 +130,8 @@
369         ld8 r15=[base0],(CFM_OFF-BSP_OFF)       // fetch sc_ar_bsp and advance to CFM_OFF
370         mov r14=ar.bsp
371         ;;
372 - -     cmp.ne p8,p0=r14,r15                    // do we need to restore the rbs?
373 - -(p8) br.cond.spnt restore_rbs                // yup -> (clobbers r14-r18, f6 & f7)
374 +       cmp.ne p1,p0=r14,r15                    // do we need to restore the rbs?
375 +(p1)   br.cond.spnt restore_rbs                // yup -> (clobbers p8, r14-r18, f6 & f7)
376         ;;
377  back_from_restore_rbs:
378         adds base0=(FR6_OFF+SIGCONTEXT_OFF),sp
379 ChangeSet@1.1136.73.2  2003-12-02 11:58:06-02:00  neilb at unsw.edu.au
380 [PATCH] Make root a special case for per-user process limits.
381
382 This is needed because when a setuid-root program calls
383 setuid(0) to become really-root, p->user becomes root_user,
384 but ->rlim stays as the original user's limit, and now
385 the process cannot fork - becuase root has more processes than
386 the original user had.
387
388 The real problem is that NPROC is not really a per-process limit,
389 but its a per-user limit, and including it with the rlim structure
390 was not a good idea :-(
391
392 This fix is already in 2.6
393
394
395 - --- linux-2.4.23/kernel/fork.c.orig   Tue Dec  9 00:38:16 2003
396 +++ linux-2.4.23/kernel/fork.c  Tue Dec  9 00:38:59 2003
397 @@ -669,6 +669,7 @@
398          * than the amount of processes root is running. -- Rik
399          */
400         if (atomic_read(&p->user->processes) >= p->rlim[RLIMIT_NPROC].rlim_cur
401 +                     && p->user != &root_user
402                       && !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE))
403                 goto bad_fork_free;
404  
405 As per http://lkml.org/lkml/2003/12/1/150
406
407 diff -urN --exclude=CVS --exclude=.cvsignore linux-2.4.23/include/linux/mc146818rtc.h linux-cvs-2.4.23/include/linux/mc146818rtc.h
408 - --- linux-2.4.23/include/linux/mc146818rtc.h  2001-11-22 20:46:58.000000000 +0100
409 +++ linux-cvs-2.4.23/include/linux/mc146818rtc.h        2003-11-28 15:09:41.000000000 +0100
410 @@ -98,4 +98,12 @@
411  #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
412  #endif
413  
414 +#ifndef RTC_IO_EXTENT
415 +#define RTC_IO_EXTENT  0x10    /* Only really two ports, but...        */
416 +#endif
417 +
418 +#ifndef RTC_IOMAPPED
419 +#define RTC_IOMAPPED   1       /* Default to I/O mapping. */
420 +#endif
421 +
422  #endif /* _MC146818RTC_H */
423 - From linux-kernel@vger.kernel.org Thu Dec 18 21:50:26 2003
424 Date: Tue, 16 Dec 2003 15:59:16 +0000
425 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
426 To: bk-commits-24@vger.kernel.org
427 Subject: [PATCH] duplicate PID fix
428
429 ChangeSet 1.1302, 2003/12/16 13:59:16-02:00, t-kochi@bq.jp.nec.com
430
431         [PATCH] duplicate PID fix
432         
433         Hello Marcelo,
434         
435         This fix was sent to lkml in April, and was merged to -ac tree,
436         but is not merged in the main tree yet.
437         Please consider taking this in.
438         
439         Without this, duplicate pids can be allocated, which will make
440         one of them unkillable (signals are deliverd to only one of them),
441         and this can be exploitable (I don't know for sure, but maybe,
442         like brk() ;)
443         
444         This situation happens only when all pid space is full.
445         Usually, users cannot fork processes more than 32768 (PID_MAX),
446         but default user limit of max processes can be more
447         than PID_MAX on large memory machines such as 64bit
448         platforms (although it's adjustable by threads-max sysctl).
449         
450         This patch modifies common code and affects all architectures,
451         but modifies code only executed when no pid is available,
452         so it doesn't hurt any normal path anyway.
453         
454         (BTW, once I sent this patch to Rusty's Trivial patch monkey,
455         but his reply was non-trivial, and he also said this is
456         scary ;)
457         
458         The details are described below:
459         
460         In get_pid(), an available pid is searched through all task_structs
461         even when there is no available pid.  If a new pid is not available,
462         the kernel exits the loop with static variable 'next_safe' untouched,
463         which usually is no problem.
464         
465         
466                 spin_lock(&lastpid_lock);
467                 beginpid = last_pid;
468                 if((++last_pid) & 0xffff8000) {
469                         last_pid = 300;         /* Skip daemons etc. */
470                         goto inside;
471                 }
472                 if(last_pid >= next_safe) {
473         inside:
474                         next_safe = PID_MAX;
475                         read_lock(&tasklist_lock);
476         repeat:
477                 for_each_task(p) {
478                         if(p->pid == last_pid   ||
479                            p->pgrp == last_pid  ||
480                            p->tgid == last_pid  ||
481                            p->session == last_pid) {                    <= (A)
482                                 if(++last_pid >= next_safe) {           <= (B)
483                                         if(last_pid & 0xffff8000)
484                                                 last_pid = 300;
485                                         next_safe = PID_MAX;
486                                 }
487                                 if(unlikely(last_pid == beginpid))      <= (C)
488                                         goto nomorepids;
489                                 goto repeat;
490                         }
491                         if(p->pid > last_pid && next_safe > p->pid)
492                                 next_safe = p->pid;
493                         if(p->pgrp > last_pid && next_safe > p->pgrp)
494                                 next_safe = p->pgrp;
495                         if(p->tgid > last_pid && next_safe > p->tgid)
496                                 next_safe = p->tgid;
497                         if(p->session > last_pid && next_safe > p->session)
498                                 next_safe = p->session;
499                 }
500         
501         
502         In a rare case, both (B) and (C) can be true and then, next_safe
503         will remain PID_MAX (32768).  If that happens, following get_pid() will
504         always succeed until last_pid reaches 32768 and there may be many
505         duplicate pids.
506         
507         For example, this happens when
508         
509          * PID space are full (300-32767 are all occupied)
510          * the last pid allocated is 10000
511          * task list chain is like:
512            ...(pids < 9999), 9999, ...(pids 300~9998, 10001~32767)... , 10000
513         
514         The loop starts searching an available pid with beginpid=10000 and
515         last_pid=10001.  last_pid is incremented until it gets PID_MAX
516         and then wraps around to 300, then is incremented again.
517         
518         At the point that p->pid=9999 is found in tasklist (condition (A)),
519         
520           last_pid = 9999
521           next_safe <= 9998
522         
523         therefore condition (B) is true, and then
524         
525           last_pid = 10000
526           next_safe = PID_MAX
527         
528         and then, condition (C) is also true, and exits the loop.
529         
530         To protect this case is simple; when the condition (C) is true,
531         set next_safe to 0 or any safe value to guarantee that a free pid
532         will be searched through next time.
533         
534         Thanks,
535
536
537 # This patch includes the following deltas:
538 #                  ChangeSet    1.1301  -> 1.1302 
539 #              kernel/fork.c    1.31    -> 1.32   
540 #
541
542  fork.c |    4 +++-
543  1 files changed, 3 insertions(+), 1 deletion(-)
544
545
546 diff -Nru a/kernel/fork.c b/kernel/fork.c
547 - --- a/kernel/fork.c   Tue Dec 16 09:02:43 2003
548 +++ b/kernel/fork.c     Tue Dec 16 09:02:43 2003
549 @@ -114,8 +114,10 @@
550                                                 last_pid = 300;
551                                         next_safe = PID_MAX;
552                                 }
553 - -                             if(unlikely(last_pid == beginpid))
554 +                               if(unlikely(last_pid == beginpid)) {
555 +                                       next_safe = 0;
556                                         goto nomorepids;
557 +                               }
558                                 goto repeat;
559                         }
560                         if(p->pid > last_pid && next_safe > p->pid)
561 - -
562 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
563 the body of a message to majordomo@vger.kernel.org
564 More majordomo info at  http://vger.kernel.org/majordomo-info.html
565 - From linux-kernel@vger.kernel.org Thu Dec 18 21:30:47 2003
566 Date: Sat, 13 Dec 2003 13:20:08 +0000
567 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
568 To: bk-commits-24@vger.kernel.org
569 Subject: [PATCH] IrDA kernel log buster
570
571 ChangeSet 1.1277, 2003/12/13 11:20:08-02:00, jt@bougret.hpl.hp.com
572
573         [PATCH] IrDA kernel log buster
574         
575                 Hi Marcelo,
576         
577                 I just ran 2.4.23, and after a few min the disk reached 100%
578         capacity. A quick check lead to to oversized kernel log, and to the
579         following changeset :
580         
581         http://linux.bkbits.net:8080/linux-2.4/cset@1.1136.23.2?nav=index.html|ChangeSet@-12w
582         
583                 Patch to fix this problem is attached below, I've just
584         backported the proper fixes from 2.5.X into 2.4.X.
585                 Probably this person did too much Python, but in C you need
586         braces around multiple statements part of the same branch, so the
587         second printf was always executed even when logging was disabled. I
588         also don't understand why this person didn't decided to backport the
589         2.5.X fix.
590                 I'm also bit surprised that this kind of patch went into the
591         kernel behind my back, because I though that freeze meant not
592         accepting untested patch from random hacker.
593         
594                 Have fun...
595         
596                 Jean
597
598
599 # This patch includes the following deltas:
600 #                  ChangeSet    1.1276  -> 1.1277 
601 #       net/irda/irnet/irnet.h  1.11    -> 1.12   
602 #
603
604  irnet.h |   20 ++++++++++----------
605  1 files changed, 10 insertions(+), 10 deletions(-)
606
607
608 diff -Nru a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
609 - --- a/net/irda/irnet/irnet.h  Sat Dec 13 06:02:55 2003
610 +++ b/net/irda/irnet/irnet.h    Sat Dec 13 06:02:55 2003
611 @@ -322,29 +322,29 @@
612   * compiler will optimise away the if() in all cases.
613   */
614  /* All error messages (will show up in the normal logs) */
615 - -#define DERROR(dbg, args...) \
616 +#define DERROR(dbg, format, args...) \
617         {if(DEBUG_##dbg) \
618 - -             printk(KERN_INFO "irnet: %s(): ", __FUNCTION__); printk(args);}
619 +               printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);}
620  
621  /* Normal debug message (will show up in /var/log/debug) */
622 - -#define DEBUG(dbg, args...) \
623 +#define DEBUG(dbg, format, args...) \
624         {if(DEBUG_##dbg) \
625 - -             printk(KERN_DEBUG "irnet: %s(): ", __FUNCTION__); printk(args);}
626 +               printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);}
627  
628  /* Entering a function (trace) */
629 - -#define DENTER(dbg, args...) \
630 +#define DENTER(dbg, format, args...) \
631         {if(DEBUG_##dbg) \
632 - -     printk(KERN_DEBUG "irnet: ->%s", __FUNCTION__); printk(args);}
633 +               printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);}
634  
635  /* Entering and exiting a function in one go (trace) */
636 - -#define DPASS(dbg, args...) \
637 +#define DPASS(dbg, format, args...) \
638         {if(DEBUG_##dbg) \
639 - -             printk(KERN_DEBUG "irnet: <>%s", __FUNCTION__); printk(args);}
640 +               printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);}
641  
642  /* Exiting a function (trace) */
643 - -#define DEXIT(dbg, args...) \
644 +#define DEXIT(dbg, format, args...) \
645         {if(DEBUG_##dbg) \
646 - -             printk(KERN_DEBUG "irnet: <-%s()", __FUNCTION__); printk(args);}
647 +               printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);}
648  
649  /* Exit a function with debug */
650  #define DRETURN(ret, dbg, args...) \
651 - -
652 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
653 the body of a message to majordomo@vger.kernel.org
654 More majordomo info at  http://vger.kernel.org/majordomo-info.html
655 - From linux-kernel@vger.kernel.org Thu Dec 18 21:43:15 2003
656 Date: Mon, 15 Dec 2003 04:44:43 +0000
657 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
658 To: bk-commits-24@vger.kernel.org
659 Subject: [PPC64] Fix save_flags/restore_flags on iSeries.
660
661 ChangeSet 1.1270.3.9, 2003/12/15 15:44:43+11:00, engebret@us.ibm.com
662
663         [PPC64] Fix save_flags/restore_flags on iSeries.
664
665
666 # This patch includes the following deltas:
667 #                  ChangeSet    1.1270.3.8 -> 1.1270.3.9
668 #       arch/ppc64/kernel/misc.S        1.8     -> 1.9    
669 #
670
671  misc.S |   14 +++++++-------
672  1 files changed, 7 insertions(+), 7 deletions(-)
673
674
675 diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
676 - --- a/arch/ppc64/kernel/misc.S        Mon Dec 15 07:03:59 2003
677 +++ b/arch/ppc64/kernel/misc.S  Mon Dec 15 07:03:59 2003
678 @@ -69,16 +69,14 @@
679  _GLOBAL(__no_use_save_flags)
680         mfspr   r4,SPRG3
681         lbz     r3,PACAPROCENABLED(r4)
682 +       /* shift into position of MSR.EE */
683 +       sldi    r3,r3,15
684         blr
685  
686 - -/* void __no_use_restore_flags(unsigned long flags) */       
687 +/* void __no_use_restore_flags(unsigned long flags) */
688  _GLOBAL(__no_use_restore_flags)
689 - -/*
690 - - * Just set/clear the MSR_EE bit through restore/flags but do not
691 - - * change anything else.  This is needed by the RT system and makes
692 - - * sense anyway.
693 - - *    -- Cort
694 - - */
695 +       /* shift from position of MSR.EE */
696 +       srdi    r3,r3,15
697         mfspr   r6,SPRG3
698         lbz     r5,PACAPROCENABLED(r6)
699          /* Check if things are setup the way we want _already_. */
700 @@ -104,6 +102,8 @@
701         lbz     r3,PACAPROCENABLED(r5)
702         li      r4,0
703         stb     r4,PACAPROCENABLED(r5)
704 +       /* shift into position of MSR.EE */
705 +       sldi    r3,r3,15
706         blr                     /* Done */
707  
708  _GLOBAL(__no_use_sti)
709 - -
710 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
711 the body of a message to majordomo@vger.kernel.org
712 More majordomo info at  http://vger.kernel.org/majordomo-info.html
713 - From linux-kernel@vger.kernel.org Thu Dec 18 21:41:34 2003
714 Date: Fri, 12 Dec 2003 20:18:04 +0000
715 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
716 To: bk-commits-24@vger.kernel.org
717 Subject: [PATCH] USB: MCT-U232 Patch for cts
718
719 ChangeSet 1.1289, 2003/12/12 12:18:04-08:00, marr@flex.com
720
721         [PATCH] USB: MCT-U232 Patch for cts
722         
723         Brief Patch Description:
724         
725         Fix a problem in the 'mct_u232' driver whereby output data gets held up in the
726         USB/RS-232 adapter for RS-232 devices which don't assert the 'CTS' signal.
727         
728         Background:
729         
730         The Belkin F5U109 is a 9-pin USB/RS-232 adapter that is supported by the
731         existing 'mct_u232' kernel module. Â Recently, I've been testing it under the
732         2.4.22 (Slackware 9.1) kernel and the 2.6.0-test9 kernel.
733         
734         I've connected a Garmin 'GPS35 TracPak' GPS receiver (RS-232 interface) and an
735         ordinary RS-232 external modem to my PC's USB port via the Belkin F5U109
736         adapter.
737         
738         Problem:
739         
740         Although _reads_ from either of the RS-232 devices mentioned above work fine
741         via the Belkin adapter, _writes_ to the GPS receiver are not being seen by
742         the GPS. Â Writes to the modem, however, work perfectly.
743         
744         Aside: The 'Linux USB Users' archives show that at least one other person
745         (circa May 2002) had the exact same problem I'm having, but it sounds like no
746         solution was ever determined because the person in question just bought a
747         different USB/RS-232 adapter.
748         
749         Investigation:
750         
751         Using the 'seyon' terminal emulator in Linux and a crude hardware RS-232
752         "breakout box" that I hacked together, I've determined that the problem is
753         related to the RTS/CTS RS-232 hardware handshaking.
754         
755         After further investigation, I've concluded that RS-232 devices which do not
756         assert the 'Clear To Send' ('CTS') signal prevent the Belkin F5U109 adapter
757         from transmitting data to the RS-232 device when the current (version 1.1)
758         'mct_u232' module is used. The data gets "queued up" (up to a point -- 16
759         bytes, I think) in the adapter but never transmitted.
760         
761         Since this GPS receiver works perfectly (reads and writes) when connected to a
762         PC running W98se using the same Belkin adapter and the Belkin-supplied
763         Windows driver, the Linux driver became suspect.
764         
765         After some testing with SniffUSB, I found that the Windows driver sends a
766         couple of unique undocumented USB 'device requests' that the Linux driver
767         does not. As it turns out, the second of those 2 requests is critical in
768         making the adapter transmit data to a device which doesn't assert 'CTS'.
769         
770         For completeness, the Windows driver in use was determined from the 'Device
771         Manager', 'Driver File Details' page:
772         
773         Â  Â U2SPORT.VXD
774         Â  Â Provider: Magic Control Technology
775         Â  Â File version: 1.21P.0104 for Win98/Me
776         
777         Solution:
778         
779         My patch adds the 2 missing USB 'device request' commands right after a
780         baud-change command. This mimics the operation of the W98 driver.
781         
782         Unfortunately, after much testing, I found no other operation (besides a
783         baud-change request) under Windows that triggers either of these 2 'device
784         request' commands. This makes it impossible to fully document the behavior of
785         these requests, but I've made entries for them alongside the others in the
786         'mct_u232.h' file.
787         
788         Purely for clarity, the patch also modifies various comments in 'mct_u232.h',
789         mostly to reflect proper sizes of the various 'USB Device Request' fields per
790         the USB 1.1 specification.
791         
792         The patch also updates the version number of the driver, corrects a minor
793         typographical error, and documents a difference in the length of the data in
794         a 'baud rate change' command for certain adapters which use a coded baud-rate
795         rather than the conventional RS-232 baud rate divisor.
796
797
798 # This patch includes the following deltas:
799 #                  ChangeSet    1.1288  -> 1.1289 
800 #       drivers/usb/serial/mct_u232.c   1.18    -> 1.19   
801 #       drivers/usb/serial/mct_u232.h   1.3     -> 1.4    
802 #
803
804  mct_u232.c |   37 +++++++++++++++++++++-
805  mct_u232.h |  101 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
806  2 files changed, 116 insertions(+), 22 deletions(-)
807
808
809 diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
810 - --- a/drivers/usb/serial/mct_u232.c   Mon Dec 15 07:03:29 2003
811 +++ b/drivers/usb/serial/mct_u232.c     Mon Dec 15 07:03:29 2003
812 @@ -24,6 +24,11 @@
813   *   Basic tests have been performed with minicom/zmodem transfers and
814   *   modem dialing under Linux 2.4.0-test10 (for me it works fine).
815   *
816 + * 04-Nov-2003 Bill Marr <marr at flex dot com>
817 + *   - Mimic Windows driver by sending 2 USB 'device request' messages
818 + *     following normal 'baud rate change' message.  This allows data to be
819 + *     transmitted to RS-232 devices which don't assert the 'CTS' signal.
820 + *
821   * 10-Nov-2001 Wolfgang Grandegger
822   *   - Fixed an endianess problem with the baudrate selection for PowerPC.
823   *
824 @@ -85,7 +90,7 @@
825  /*
826   * Version Information
827   */
828 - -#define DRIVER_VERSION "v1.1"
829 +#define DRIVER_VERSION "v1.2"
830  #define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
831  #define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
832  
833 @@ -201,6 +206,7 @@
834  {
835         unsigned int divisor;
836          int rc;
837 +        unsigned char zero_byte = 0;
838         divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
839          rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
840                               MCT_U232_SET_BAUD_RATE_REQUEST,
841 @@ -210,6 +216,35 @@
842         if (rc < 0)
843                 err("Set BAUD RATE %d failed (error = %d)", value, rc);
844         dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor);
845 +
846 +       /* Mimic the MCT-supplied Windows driver (version 1.21P.0104), which
847 +          always sends two extra USB 'device request' messages after the
848 +          'baud rate change' message.  The actual functionality of the
849 +          request codes in these messages is not fully understood but these
850 +          particular codes are never seen in any operation besides a baud
851 +          rate change.  Both of these messages send a single byte of data
852 +          whose value is always zero.  The second of these two extra messages
853 +          is required in order for data to be properly written to an RS-232
854 +          device which does not assert the 'CTS' signal. */
855 +
856 +       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
857 +                            MCT_U232_SET_UNKNOWN1_REQUEST, 
858 +                            MCT_U232_SET_REQUEST_TYPE,
859 +                            0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE, 
860 +                            WDR_TIMEOUT);
861 +       if (rc < 0)
862 +               err("Sending USB device request code %d failed (error = %d)", 
863 +                   MCT_U232_SET_UNKNOWN1_REQUEST, rc);
864 +
865 +       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
866 +                            MCT_U232_SET_UNKNOWN2_REQUEST, 
867 +                            MCT_U232_SET_REQUEST_TYPE,
868 +                            0, 0, &zero_byte, MCT_U232_SET_UNKNOWN2_SIZE, 
869 +                            WDR_TIMEOUT);
870 +       if (rc < 0)
871 +               err("Sending USB device request code %d failed (error = %d)", 
872 +                   MCT_U232_SET_UNKNOWN2_REQUEST, rc);
873 +
874          return rc;
875  } /* mct_u232_set_baud_rate */
876  
877 diff -Nru a/drivers/usb/serial/mct_u232.h b/drivers/usb/serial/mct_u232.h
878 - --- a/drivers/usb/serial/mct_u232.h   Mon Dec 15 07:03:29 2003
879 +++ b/drivers/usb/serial/mct_u232.h     Mon Dec 15 07:03:29 2003
880 @@ -57,6 +57,21 @@
881  #define MCT_U232_SET_MODEM_CTRL_REQUEST        10 /* Set Modem Control Register (MCR) */
882  #define MCT_U232_SET_MODEM_CTRL_SIZE    1
883  
884 +/* This USB device request code is not well understood.  It is transmitted by
885 +   the MCT-supplied Windows driver whenever the baud rate changes. 
886 +*/
887 +#define MCT_U232_SET_UNKNOWN1_REQUEST   11  /* Unknown functionality */
888 +#define MCT_U232_SET_UNKNOWN1_SIZE       1
889 +
890 +/* This USB device request code is not well understood.  It is transmitted by
891 +   the MCT-supplied Windows driver whenever the baud rate changes. 
892 +   
893 +   Without this USB device request, the USB/RS-232 adapter will not write to
894 +   RS-232 devices which do not assert the 'CTS' signal.
895 +*/
896 +#define MCT_U232_SET_UNKNOWN2_REQUEST   12  /* Unknown functionality */
897 +#define MCT_U232_SET_UNKNOWN2_SIZE       1
898 +
899  /*
900   * Baud rate (divisor)
901   */
902 @@ -137,22 +152,31 @@
903   * Baud rate (divisor)
904   * -------------------
905   *
906 - - *   BmRequestType:  0x4 (0100 0000B)
907 - - *   bRequest:       0x5
908 - - *   wValue:         0x0
909 - - *   wIndex:         0x0
910 - - *   wLength:        0x4
911 + *   BmRequestType:  0x40 (0100 0000B)
912 + *   bRequest:       0x05
913 + *   wValue:         0x0000
914 + *   wIndex:         0x0000
915 + *   wLength:        0x0004
916   *   Data:           divisor = 115200 / baud_rate
917   *
918 + *   SniffUSB observations (Nov 2003): Contrary to the 'wLength' value of 4
919 + *   shown above, observations with a Belkin F5U109 adapter, using the
920 + *   MCT-supplied Windows98 driver (U2SPORT.VXD, "File version: 1.21P.0104 for
921 + *   Win98/Me"), show this request has a length of 1 byte, presumably because
922 + *   of the fact that the Belkin adapter and the 'Sitecom U232-P25' adapter
923 + *   use a baud-rate code instead of a conventional RS-232 baud rate divisor.
924 + *   The current source code for this driver does not reflect this fact, but
925 + *   the driver works fine with this adapter/driver combination nonetheless.
926 + *
927   *
928   * Line Control Register (LCR)
929   * ---------------------------
930   *
931 - - *  BmRequestType:  0x4 (0100 0000B)    0xc (1100 0000B)
932 - - *  bRequest:       0x7                 0x6
933 - - *  wValue:         0x0
934 - - *  wIndex:         0x0
935 - - *  wLength:        0x1
936 + *  BmRequestType:  0x40 (0100 0000B)    0xc0 (1100 0000B)
937 + *  bRequest:       0x07                 0x06
938 + *  wValue:         0x0000
939 + *  wIndex:         0x0000
940 + *  wLength:        0x0001
941   *  Data:           LCR (see below)
942   *
943   *  Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
944 @@ -186,18 +210,18 @@
945   *
946   *  SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
947   *  in the Win98 driver: the break does not work (bit 6 is not asserted) and the
948 - - *  sticky parity bit is not cleared when set once. The LCR can also be read
949 + *  stick parity bit is not cleared when set once. The LCR can also be read
950   *  back with USB request 6 but this has never been observed with SniffUSB.
951   *
952   *
953   * Modem Control Register (MCR)
954   * ----------------------------
955   *
956 - - *  BmRequestType:  0x4  (0100 0000B)
957 - - *  bRequest:       0xa
958 - - *  wValue:         0x0
959 - - *  wIndex:         0x0
960 - - *  wLength:        0x1
961 + *  BmRequestType:  0x40  (0100 0000B)
962 + *  bRequest:       0x0a
963 + *  wValue:         0x0000
964 + *  wIndex:         0x0000
965 + *  wLength:        0x0001
966   *  Data:           MCR (Bit 4..7, see below)
967   *
968   *  Bit 7: Reserved, always 0.
969 @@ -226,11 +250,11 @@
970   * Modem Status Register (MSR)
971   * ---------------------------
972   *
973 - - *  BmRequestType:  0xc  (1100 0000B)
974 - - *  bRequest:       0x2
975 - - *  wValue:         0x0
976 - - *  wIndex:         0x0
977 - - *  wLength:        0x1
978 + *  BmRequestType:  0xc0  (1100 0000B)
979 + *  bRequest:       0x02
980 + *  wValue:         0x0000
981 + *  wIndex:         0x0000
982 + *  wLength:        0x0001
983   *  Data:           MSR (see below)
984   *
985   *  Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
986 @@ -285,6 +309,41 @@
987   *  SniffUSB observations: the LSR is returned as second byte on the interrupt-in
988   *  endpoint 0x83 to signal error conditions. Such errors have been seen with
989   *  minicom/zmodem transfers (CRC errors).
990 + *
991 + *
992 + * Unknown #1
993 + * -------------------
994 + *
995 + *   BmRequestType:  0x40 (0100 0000B)
996 + *   bRequest:       0x0b
997 + *   wValue:         0x0000
998 + *   wIndex:         0x0000
999 + *   wLength:        0x0001
1000 + *   Data:           0x00
1001 + *
1002 + *   SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
1003 + *   (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
1004 + *   occurs immediately after a "Baud rate (divisor)" message.  It was not
1005 + *   observed at any other time.  It is unclear what purpose this message
1006 + *   serves.
1007 + *
1008 + *
1009 + * Unknown #2
1010 + * -------------------
1011 + *
1012 + *   BmRequestType:  0x40 (0100 0000B)
1013 + *   bRequest:       0x0c
1014 + *   wValue:         0x0000
1015 + *   wIndex:         0x0000
1016 + *   wLength:        0x0001
1017 + *   Data:           0x00
1018 + *
1019 + *   SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
1020 + *   (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
1021 + *   occurs immediately after the 'Unknown #1' message (see above).  It was
1022 + *   not observed at any other time.  It is unclear what other purpose (if
1023 + *   any) this message might serve, but without it, the USB/RS-232 adapter
1024 + *   will not write to RS-232 devices which do not assert the 'CTS' signal.
1025   *
1026   *
1027   * Flow control
1028 - -
1029 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1030 the body of a message to majordomo@vger.kernel.org
1031 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1032 - From cel@citi.umich.edu Thu Dec 18 22:13:19 2003
1033 Date: Thu, 18 Dec 2003 16:34:58 -0500 (EST)
1034 From: Chuck Lever <cel@citi.umich.edu>
1035 To: Marcelo Tosatti <marcelo@conectiva.com.br>
1036 Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
1037      Trond Myklebust <trond.myklebust@fys.uio.no>,
1038      Steve Dickson <SteveD@redhat.com>, greg.marsden@oracle.com
1039 Subject: [PATCH] NFS O_DIRECT offset wrap bug
1040
1041 hi marcelo-
1042
1043 here's an obvious mistake i made in the NFS O_DIRECT implementation.  a
1044 missing type cast causes the offset of direct read and write requests to
1045 wrap at 4GB.  please include this in 2.4.24-pre2.
1046
1047 as far as i can tell, this is not a problem for 2.6 NFS O_DIRECT.
1048
1049
1050 diff -X ../dont-diff -Naurp 00-stock/fs/nfs/direct.c 01-direct-offset/fs/nfs/direct.c
1051 - --- 00-stock/fs/nfs/direct.c  2003-08-25 07:44:43.000000000 -0400
1052 +++ 01-direct-offset/fs/nfs/direct.c    2003-12-18 16:28:20.000000000 -0500
1053 @@ -354,7 +354,7 @@ nfs_direct_IO(int rw, struct file *file,
1054         size_t count = iobuf->length;
1055         struct dentry *dentry = file->f_dentry;
1056         struct inode *inode = dentry->d_inode;
1057 - -     loff_t offset = blocknr << inode->i_blkbits;
1058 +       loff_t offset = (loff_t) blocknr << inode->i_blkbits;
1059
1060         switch (rw) {
1061         case READ:
1062
1063         - Chuck Lever
1064 - --
1065 corporate:      <cel at netapp dot com>
1066 personal:       <chucklever at bigfoot dot com>
1067
1068 - -
1069 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
1070 the body of a message to majordomo@vger.kernel.org
1071 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1072 Please read the FAQ at  http://www.tux.org/lkml/
1073 - From linux-kernel@vger.kernel.org Thu Dec 18 21:47:47 2003
1074 Date: Mon, 15 Dec 2003 05:42:19 +0000
1075 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1076 To: bk-commits-24@vger.kernel.org
1077 Subject: [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
1078
1079 ChangeSet 1.1270.3.10, 2003/12/15 16:42:19+11:00, paulus@quango.ozlabs.ibm.com
1080
1081         [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
1082
1083
1084 # This patch includes the following deltas:
1085 #                  ChangeSet    1.1270.3.9 -> 1.1270.3.10
1086 #       arch/ppc64/kernel/pmc.c 1.5     -> 1.6    
1087 #       include/asm-ppc64/mmu.h 1.4     -> 1.5    
1088 #
1089
1090  arch/ppc64/kernel/pmc.c |    5 ++---
1091  include/asm-ppc64/mmu.h |    3 ++-
1092  2 files changed, 4 insertions(+), 4 deletions(-)
1093
1094
1095 diff -Nru a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c
1096 - --- a/arch/ppc64/kernel/pmc.c Mon Dec 15 07:04:01 2003
1097 +++ b/arch/ppc64/kernel/pmc.c   Mon Dec 15 07:04:01 2003
1098 @@ -74,7 +74,6 @@
1099                                  page_table_lock : SPIN_LOCK_UNLOCKED};
1100  
1101  extern spinlock_t hash_table_lock[];
1102 - -extern inline unsigned long get_lock_slot(unsigned long vpn);
1103  
1104  char *
1105  ppc64_pmc_stab(int file)
1106 @@ -241,7 +240,7 @@
1107                 lock_slot = get_lock_slot(vpn); 
1108                 rpn = pa >> PAGE_SHIFT;
1109  
1110 - -             spin_lock(&hash_table_lock[lock_slot].lock);
1111 +               spin_lock(&hash_table_lock[lock_slot]);
1112                 /* Get a pointer to the linux page table entry for this page
1113                  * allocating pmd or pte pages along the way as needed.  Note
1114                  * that the pmd & pte pages are not themselfs bolted.
1115 @@ -266,7 +265,7 @@
1116  
1117                 *ptep = pte;
1118  
1119 - -             spin_unlock(&hash_table_lock[lock_slot].lock);
1120 +               spin_unlock(&hash_table_lock[lock_slot]);
1121         }
1122  
1123         spin_unlock(&btmalloc_mm.page_table_lock);
1124 diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
1125 - --- a/include/asm-ppc64/mmu.h Mon Dec 15 07:04:01 2003
1126 +++ b/include/asm-ppc64/mmu.h   Mon Dec 15 07:04:01 2003
1127 @@ -180,7 +180,7 @@
1128  extern HTAB htab_data;
1129  
1130  #include <linux/cache.h>
1131 - -#include <asm/spinlock.h>
1132 +#include <linux/spinlock.h>
1133  typedef struct {
1134         spinlock_t lock;
1135  } ____cacheline_aligned hash_table_lock_t;
1136 @@ -191,6 +191,7 @@
1137                         unsigned long prpn, unsigned hash,
1138                         void * ptep, unsigned hpteflags,
1139                         unsigned bolted );
1140 +unsigned long get_lock_slot(unsigned long vpn);
1141  
1142  #define PD_SHIFT (10+12)               /* Page directory */
1143  #define PD_MASK  0x02FF
1144 - -
1145 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1146 the body of a message to majordomo@vger.kernel.org
1147 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1148 - From linux-kernel@vger.kernel.org Thu Dec 18 21:48:23 2003
1149 Date: Mon, 15 Dec 2003 03:20:20 +0000
1150 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1151 To: bk-commits-24@vger.kernel.org
1152 Subject: [PPC64] Fix smp_call_function so we don't crash if an IPI is very
1153     late.
1154
1155 ChangeSet 1.1270.3.2, 2003/12/15 14:20:20+11:00, olof@austin.ibm.com
1156
1157         [PPC64] Fix smp_call_function so we don't crash if an IPI is very late.
1158
1159
1160 # This patch includes the following deltas:
1161 #                  ChangeSet    1.1270.3.1 -> 1.1270.3.2
1162 #       arch/ppc64/kernel/smp.c 1.4     -> 1.5    
1163 #
1164
1165  smp.c |   18 +++++++++++++++---
1166  1 files changed, 15 insertions(+), 3 deletions(-)
1167
1168
1169 diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
1170 - --- a/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003
1171 +++ b/arch/ppc64/kernel/smp.c   Mon Dec 15 07:03:47 2003
1172 @@ -564,6 +564,7 @@
1173         ret = 0;
1174  
1175   out:
1176 +       call_data = NULL;
1177         HMT_medium();
1178         spin_unlock_bh(&call_lock);
1179         return ret;
1180 @@ -571,9 +572,20 @@
1181  
1182  void smp_call_function_interrupt(void)
1183  {
1184 - -     void (*func) (void *info) = call_data->func;
1185 - -     void *info = call_data->info;
1186 - -     int wait = call_data->wait;
1187 +       void (*func) (void *info);
1188 +       void *info;
1189 +       int wait;
1190 +
1191 +
1192 +       /* call_data will be NULL if the sender timed out while
1193 +        * waiting on us to receive the call.
1194 +        */
1195 +       if (!call_data)
1196 +               return;
1197 +
1198 +       func = call_data->func;
1199 +       info = call_data->info;
1200 +       wait = call_data->wait;
1201  
1202         /*
1203          * Notify initiating CPU that I've grabbed the data and am
1204 - -
1205 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1206 the body of a message to majordomo@vger.kernel.org
1207 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1208 - From linux-kernel@vger.kernel.org Thu Dec 18 21:54:39 2003
1209 Date: Wed, 10 Dec 2003 20:30:50 +0000
1210 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1211 To: bk-commits-24@vger.kernel.org
1212 Subject: [PATCH] Fix rtc leak
1213
1214 ChangeSet 1.1273, 2003/12/10 18:30:50-02:00, trini@mvista.com
1215
1216         [PATCH] Fix rtc leak
1217         
1218         ===== arch/cris/drivers/ds1302.c 1.6 vs edited =====
1219
1220
1221 # This patch includes the following deltas:
1222 #                  ChangeSet    1.1272  -> 1.1273 
1223 #       arch/m68k/bvme6000/rtc.c        1.6     -> 1.7    
1224 #       drivers/char/mips_rtc.c 1.1     -> 1.2    
1225 #       drivers/sbus/char/rtc.c 1.8     -> 1.9    
1226 #       drivers/char/ds1286.c   1.9     -> 1.10   
1227 #         drivers/char/rtc.c    1.14    -> 1.15   
1228 #       drivers/char/ip27-rtc.c 1.5     -> 1.6    
1229 #       arch/cris/drivers/pcf8563.c     1.3     -> 1.4    
1230 #       drivers/hil/hp_sdc_rtc.c        1.2     -> 1.3    
1231 #       drivers/char/efirtc.c   1.5     -> 1.6    
1232 #       arch/cris/drivers/ds1302.c      1.6     -> 1.7    
1233 #       drivers/macintosh/rtc.c 1.6     -> 1.7    
1234 #       drivers/acorn/char/i2c.c        1.3     -> 1.4    
1235 #       arch/ppc64/kernel/rtc.c 1.2     -> 1.3    
1236 #       arch/m68k/mvme16x/rtc.c 1.4     -> 1.5    
1237 #
1238
1239  arch/cris/drivers/ds1302.c  |    1 +
1240  arch/cris/drivers/pcf8563.c |    1 +
1241  arch/m68k/bvme6000/rtc.c    |    1 +
1242  arch/m68k/mvme16x/rtc.c     |    1 +
1243  arch/ppc64/kernel/rtc.c     |    1 +
1244  drivers/acorn/char/i2c.c    |    1 +
1245  drivers/char/ds1286.c       |    3 ++-
1246  drivers/char/efirtc.c       |    1 +
1247  drivers/char/ip27-rtc.c     |    1 +
1248  drivers/char/mips_rtc.c     |    1 +
1249  drivers/char/rtc.c          |    3 ++-
1250  drivers/hil/hp_sdc_rtc.c    |    2 ++
1251  drivers/macintosh/rtc.c     |    1 +
1252  drivers/sbus/char/rtc.c     |    1 +
1253  14 files changed, 17 insertions(+), 2 deletions(-)
1254
1255
1256 diff -ruN linux-2.4.23/arch/cris/drivers/ds1302.c linux-2.4.23.patched/arch/cris/drivers/ds1302.c
1257 - --- linux-2.4.23/arch/cris/drivers/ds1302.c   Thu Dec 18 23:52:46 2003
1258 +++ linux-2.4.23.patched/arch/cris/drivers/ds1302.c     Thu Dec 18 23:53:32 2003
1259 @@ -346,6 +346,7 @@
1260                 {
1261                         struct rtc_time rtc_tm;
1262                                                 
1263 +                       memset(&rtc_tm, 0, sizeof (struct rtc_time));
1264                         get_rtc_time(&rtc_tm);                                          
1265                         if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1266                                 return -EFAULT; 
1267 diff -ruN linux-2.4.23/arch/cris/drivers/pcf8563.c linux-2.4.23.patched/arch/cris/drivers/pcf8563.c
1268 - --- linux-2.4.23/arch/cris/drivers/pcf8563.c  Thu Dec 18 23:52:46 2003
1269 +++ linux-2.4.23.patched/arch/cris/drivers/pcf8563.c    Thu Dec 18 23:53:32 2003
1270 @@ -220,6 +220,7 @@
1271                 {
1272                         struct rtc_time tm;
1273  
1274 +                       memset(&tm, 0, sizeof (struct rtc_time));
1275                         get_rtc_time(&tm);
1276  
1277                         if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) {
1278 diff -ruN linux-2.4.23/arch/m68k/bvme6000/rtc.c linux-2.4.23.patched/arch/m68k/bvme6000/rtc.c
1279 - --- linux-2.4.23/arch/m68k/bvme6000/rtc.c     Thu Dec 18 23:52:46 2003
1280 +++ linux-2.4.23.patched/arch/m68k/bvme6000/rtc.c       Thu Dec 18 23:53:32 2003
1281 @@ -54,6 +54,7 @@
1282                 /* Ensure clock and real-time-mode-register are accessible */
1283                 msr = rtc->msr & 0xc0;
1284                 rtc->msr = 0x40;
1285 +               memset(&wtime, 0, sizeof(struct rtc_time));
1286                 do {
1287                         wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
1288                         wtime.tm_min =  BCD2BIN(rtc->bcd_min);
1289 diff -ruN linux-2.4.23/arch/m68k/mvme16x/rtc.c linux-2.4.23.patched/arch/m68k/mvme16x/rtc.c
1290 - --- linux-2.4.23/arch/m68k/mvme16x/rtc.c      Thu Dec 18 23:52:46 2003
1291 +++ linux-2.4.23.patched/arch/m68k/mvme16x/rtc.c        Thu Dec 18 23:53:32 2003
1292 @@ -52,6 +52,7 @@
1293                 cli();
1294                 /* Ensure clock and real-time-mode-register are accessible */
1295                 rtc->ctrl = RTC_READ;
1296 +               memset(&wtime, 0, sizeof(struct rtc_time));
1297                 wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
1298                 wtime.tm_min =  BCD2BIN(rtc->bcd_min);
1299                 wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
1300 diff -ruN linux-2.4.23/arch/ppc64/kernel/rtc.c linux-2.4.23.patched/arch/ppc64/kernel/rtc.c
1301 - --- linux-2.4.23/arch/ppc64/kernel/rtc.c      Thu Dec 18 23:52:46 2003
1302 +++ linux-2.4.23.patched/arch/ppc64/kernel/rtc.c        Thu Dec 18 23:53:32 2003
1303 @@ -96,6 +96,7 @@
1304         switch (cmd) {
1305         case RTC_RD_TIME:       /* Read the time/date from RTC  */
1306         {
1307 +               memset(&wtime, 0, sizeof(struct rtc_time));
1308                 ppc_md.get_rtc_time(&wtime);
1309                 break;
1310         }
1311 diff -ruN linux-2.4.23/drivers/acorn/char/i2c.c linux-2.4.23.patched/drivers/acorn/char/i2c.c
1312 - --- linux-2.4.23/drivers/acorn/char/i2c.c     Thu Dec 18 23:52:46 2003
1313 +++ linux-2.4.23.patched/drivers/acorn/char/i2c.c       Thu Dec 18 23:53:32 2003
1314 @@ -166,6 +166,7 @@
1315                 break;
1316  
1317         case RTC_RD_TIME:
1318 +               memset(&rtctm, 0, sizeof(struct rtc_time));
1319                 get_rtc_time(&rtc_raw, &year);
1320                 rtctm.tm_sec  = rtc_raw.secs;
1321                 rtctm.tm_min  = rtc_raw.mins;
1322 diff -ruN linux-2.4.23/drivers/char/ds1286.c linux-2.4.23.patched/drivers/char/ds1286.c
1323 - --- linux-2.4.23/drivers/char/ds1286.c        Thu Dec 18 23:52:46 2003
1324 +++ linux-2.4.23.patched/drivers/char/ds1286.c  Thu Dec 18 23:53:32 2003
1325 @@ -173,7 +173,7 @@
1326                  * means "don't care" or "match all". Only the tm_hour,
1327                  * tm_min, and tm_sec values are filled in.
1328                  */
1329 - -
1330 +               memset(&wtime, 0, sizeof(struct rtc_time));
1331                 ds1286_get_alm_time(&wtime);
1332                 break;
1333         }
1334 @@ -216,6 +216,7 @@
1335         }
1336         case RTC_RD_TIME:       /* Read the time/date from RTC  */
1337         {
1338 +               memset(&wtime, 0, sizeof(struct rtc_time));
1339                 ds1286_get_time(&wtime);
1340                 break;
1341         }
1342 diff -ruN linux-2.4.23/drivers/char/efirtc.c linux-2.4.23.patched/drivers/char/efirtc.c
1343 - --- linux-2.4.23/drivers/char/efirtc.c        Thu Dec 18 23:52:46 2003
1344 +++ linux-2.4.23.patched/drivers/char/efirtc.c  Thu Dec 18 23:53:32 2003
1345 @@ -118,6 +118,7 @@
1346  static void
1347  convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
1348  {
1349 +       memset(&wtime, 0, sizeof(struct rtc_time));
1350         wtime->tm_sec  = eft->second;
1351         wtime->tm_min  = eft->minute;
1352         wtime->tm_hour = eft->hour;
1353 diff -ruN linux-2.4.23/drivers/char/ip27-rtc.c linux-2.4.23.patched/drivers/char/ip27-rtc.c
1354 - --- linux-2.4.23/drivers/char/ip27-rtc.c      Thu Dec 18 23:52:46 2003
1355 +++ linux-2.4.23.patched/drivers/char/ip27-rtc.c        Thu Dec 18 23:53:32 2003
1356 @@ -83,6 +83,7 @@
1357         switch (cmd) {
1358         case RTC_RD_TIME:       /* Read the time/date from RTC  */
1359         {
1360 +               memset(&wtime, 0, sizeof(struct rtc_time));
1361                 get_rtc_time(&wtime);
1362                 break;
1363         }
1364 diff -ruN linux-2.4.23/drivers/char/mips_rtc.c linux-2.4.23.patched/drivers/char/mips_rtc.c
1365 - --- linux-2.4.23/drivers/char/mips_rtc.c      Thu Dec 18 23:52:46 2003
1366 +++ linux-2.4.23.patched/drivers/char/mips_rtc.c        Thu Dec 18 23:53:32 2003
1367 @@ -82,6 +82,7 @@
1368  
1369         switch (cmd) {
1370         case RTC_RD_TIME:       /* Read the time/date from RTC  */
1371 +               memset(&rtc_tm, 0, sizeof(struct rtc_time));
1372                 curr_time = rtc_get_time();
1373                 to_tm(curr_time, &rtc_tm);
1374                 rtc_tm.tm_year -= 1900;
1375 diff -ruN linux-2.4.23/drivers/char/rtc.c linux-2.4.23.patched/drivers/char/rtc.c
1376 - --- linux-2.4.23/drivers/char/rtc.c   Thu Dec 18 23:52:46 2003
1377 +++ linux-2.4.23.patched/drivers/char/rtc.c     Thu Dec 18 23:53:32 2003
1378 @@ -362,7 +362,7 @@
1379                  * means "don't care" or "match all". Only the tm_hour,
1380                  * tm_min, and tm_sec values are filled in.
1381                  */
1382 - -
1383 +               memset(&wtime, 0, sizeof(struct rtc_time));
1384                 get_rtc_alm_time(&wtime);
1385                 break; 
1386         }
1387 @@ -406,6 +406,7 @@
1388         }
1389         case RTC_RD_TIME:       /* Read the time/date from RTC  */
1390         {
1391 +               memset(&wtime, 0, sizeof(struct rtc_time));
1392                 get_rtc_time(&wtime);
1393                 break;
1394         }
1395 diff -ruN linux-2.4.23/drivers/hil/hp_sdc_rtc.c linux-2.4.23.patched/drivers/hil/hp_sdc_rtc.c
1396 - --- linux-2.4.23/drivers/hil/hp_sdc_rtc.c     Thu Dec 18 23:52:46 2003
1397 +++ linux-2.4.23.patched/drivers/hil/hp_sdc_rtc.c       Thu Dec 18 23:53:32 2003
1398 @@ -561,6 +561,7 @@
1399          }
1400          case RTC_ALM_READ:      /* Read the present alarm time */
1401          {
1402 +               memset(&ttime, 0, sizeof(struct timeval));
1403                 if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT;
1404                  break;
1405          }
1406 @@ -609,6 +610,7 @@
1407          }
1408          case RTC_RD_TIME:       /* Read the time/date from RTC  */
1409          {
1410 +               memset(&wtime, 0, sizeof(struct rtc_time));
1411                 if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
1412                  break;
1413          }
1414 diff -ruN linux-2.4.23/drivers/macintosh/rtc.c linux-2.4.23.patched/drivers/macintosh/rtc.c
1415 - --- linux-2.4.23/drivers/macintosh/rtc.c      Thu Dec 18 23:52:46 2003
1416 +++ linux-2.4.23.patched/drivers/macintosh/rtc.c        Thu Dec 18 23:53:32 2003
1417 @@ -64,6 +64,7 @@
1418         case RTC_RD_TIME:
1419                 if (ppc_md.get_rtc_time)
1420                 {
1421 +                       memset(&rtc_tm, 0, sizeof(struct rtc_time));
1422                         get_rtc_time(&rtc_tm);
1423  
1424                         if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1425 diff -ruN linux-2.4.23/drivers/sbus/char/rtc.c linux-2.4.23.patched/drivers/sbus/char/rtc.c
1426 - --- linux-2.4.23/drivers/sbus/char/rtc.c      Thu Dec 18 23:52:46 2003
1427 +++ linux-2.4.23.patched/drivers/sbus/char/rtc.c        Thu Dec 18 23:53:32 2003
1428 @@ -89,6 +89,7 @@
1429         switch (cmd)
1430         {
1431         case RTCGET:
1432 +               memset(&rtc_tm, 0, sizeof(struct rtc_time));
1433                 get_rtc_time(&rtc_tm);
1434  
1435                 if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1436
1437
1438 - From bjorn.helgaas@hp.com Wed Dec 17 23:08:00 2003
1439 Date: Wed, 17 Dec 2003 15:02:37 -0700
1440 From: Bjorn Helgaas <bjorn.helgaas@hp.com>
1441 To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
1442 Cc: trini@mvista.com, linux-kernel@vger.kernel.org
1443 Subject: [PATCH] Fix 2.4 EFI RTC oops
1444
1445 This recent change to 2.4:
1446
1447         ChangeSet@1.1069.155.3, 2003-12-10 18:30:50-02:00, trini@mvista.com
1448           [PATCH] Fix rtc leak
1449
1450           ===== arch/cris/drivers/ds1302.c 1.6 vs edited =====
1451
1452 broke efirtc.c (it causes a null pointer dereference on ia64).
1453 The fix is below.  Please apply.
1454
1455 Bjorn
1456
1457 P.S.  The changeset above doesn't appear to be in 2.6 yet.  If/when
1458 you submit it for 2.6, you might consider using this style:
1459
1460         memset(&wtime, 0, sizeof(wtime));
1461         memset(wtime, 0, sizeof(*wtime));
1462
1463 which is more obviously correct than:
1464
1465         memset(&wtime, 0, sizeof(struct rtc_time));
1466         memset(wtime, 0, sizeof(struct rtc_time));
1467
1468
1469 ===== drivers/char/efirtc.c 1.6 vs edited =====
1470 - --- 1.6/drivers/char/efirtc.c Fri Oct 24 04:35:10 2003
1471 +++ edited/drivers/char/efirtc.c        Wed Dec 17 14:33:08 2003
1472 @@ -118,7 +118,7 @@
1473  static void
1474  convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
1475  {
1476 - -     memset(&wtime, 0, sizeof(struct rtc_time));
1477 +       memset(wtime, 0, sizeof(struct rtc_time));
1478         wtime->tm_sec  = eft->second;
1479         wtime->tm_min  = eft->minute;
1480         wtime->tm_hour = eft->hour;
1481
1482 - -
1483 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
1484 the body of a message to majordomo@vger.kernel.org
1485 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1486 Please read the FAQ at  http://www.tux.org/lkml/
1487 - From linux-kernel@vger.kernel.org Thu Dec 18 21:45:37 2003
1488 Date: Sun, 14 Dec 2003 05:52:29 +0000
1489 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1490 To: bk-commits-24@vger.kernel.org
1491 Subject: [SPARC32]: Fix build after asm/system.h include was added to
1492     linux/spinlock.h
1493
1494 ChangeSet 1.1270.1.7, 2003/12/13 21:52:29-08:00, davem@nuts.ninka.net
1495
1496         [SPARC32]: Fix build after asm/system.h include was added to linux/spinlock.h
1497         
1498         - Do not include asm/oplib.h in system.h
1499         - Remove system.h's halt() macro, prom_halt() is equivalent so replace
1500           the two users of halt() with that.
1501         - Put 'romvec' extern decl where it belongs, in openprom.h
1502         
1503         Based upon a patch from Rob Radez.
1504
1505
1506 # This patch includes the following deltas:
1507 #                  ChangeSet    1.1270.1.6 -> 1.1270.1.7
1508 #       include/asm-sparc/openprom.h    1.1     -> 1.2    
1509 #       include/asm-sparc/system.h      1.7     -> 1.8    
1510 #       arch/sparc/kernel/devices.c     1.4     -> 1.5    
1511 #       include/asm-sparc/oplib.h       1.3     -> 1.4    
1512 #       arch/sparc/kernel/ioport.c      1.8     -> 1.9    
1513 #
1514
1515  arch/sparc/kernel/devices.c  |    2 +-
1516  arch/sparc/kernel/ioport.c   |    2 +-
1517  include/asm-sparc/openprom.h |    2 ++
1518  include/asm-sparc/oplib.h    |    3 ---
1519  include/asm-sparc/system.h   |    4 ----
1520  5 files changed, 4 insertions(+), 9 deletions(-)
1521
1522
1523 diff -Nru a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c
1524 - --- a/arch/sparc/kernel/devices.c     Mon Dec 15 07:03:40 2003
1525 +++ b/arch/sparc/kernel/devices.c       Mon Dec 15 07:03:40 2003
1526 @@ -72,7 +72,7 @@
1527                 if (linux_num_cpus == 0) {
1528                         printk("No CPU nodes found, cannot continue.\n");
1529                         /* Probably a sun4e, Sun is trying to trick us ;-) */
1530 - -                     halt();
1531 +                       prom_halt();
1532                 }
1533                 printk("Found %d CPU prom device tree node(s).\n", linux_num_cpus);
1534         }
1535 diff -Nru a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
1536 - --- a/arch/sparc/kernel/ioport.c      Mon Dec 15 07:03:40 2003
1537 +++ b/arch/sparc/kernel/ioport.c        Mon Dec 15 07:03:40 2003
1538 @@ -760,7 +760,7 @@
1539         default:
1540                 printk("ioport_init: cpu type %d is unknown.\n",
1541                     sparc_cpu_model);
1542 - -             halt();
1543 +               prom_halt();
1544         };
1545  
1546  }
1547 diff -Nru a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h
1548 - --- a/include/asm-sparc/openprom.h    Mon Dec 15 07:03:40 2003
1549 +++ b/include/asm-sparc/openprom.h      Mon Dec 15 07:03:40 2003
1550 @@ -169,6 +169,8 @@
1551         int (*v3_cpuresume)(unsigned int whichcpu);
1552  };
1553  
1554 +extern struct linux_romvec *romvec;
1555 +
1556  /* Routines for traversing the prom device tree. */
1557  struct linux_nodeops {
1558         int (*no_nextnode)(int node);
1559 diff -Nru a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h
1560 - --- a/include/asm-sparc/oplib.h       Mon Dec 15 07:03:40 2003
1561 +++ b/include/asm-sparc/oplib.h Mon Dec 15 07:03:40 2003
1562 @@ -11,9 +11,6 @@
1563  #include <asm/openprom.h>
1564  #include <linux/spinlock.h>
1565  
1566 - -/* The master romvec pointer... */
1567 - -extern struct linux_romvec *romvec;
1568 - -
1569  /* Enumeration to describe the prom major version we have detected. */
1570  enum prom_major_version {
1571         PROM_V0,      /* Original sun4c V0 prom */
1572 diff -Nru a/include/asm-sparc/system.h b/include/asm-sparc/system.h
1573 - --- a/include/asm-sparc/system.h      Mon Dec 15 07:03:40 2003
1574 +++ b/include/asm-sparc/system.h        Mon Dec 15 07:03:40 2003
1575 @@ -10,7 +10,6 @@
1576  
1577  #ifdef __KERNEL__
1578  #include <asm/page.h>
1579 - -#include <asm/oplib.h>
1580  #include <asm/psr.h>
1581  #include <asm/ptrace.h>
1582  #include <asm/btfixup.h>
1583 @@ -51,9 +50,6 @@
1584  extern unsigned long empty_bad_page;
1585  extern unsigned long empty_bad_page_table;
1586  extern unsigned long empty_zero_page;
1587 - -
1588 - -extern struct linux_romvec *romvec;
1589 - -#define halt() romvec->pv_halt()
1590  
1591  /* When a context switch happens we must flush all user windows so that
1592   * the windows of the current process are flushed onto its stack. This
1593 - -
1594 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1595 the body of a message to majordomo@vger.kernel.org
1596 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1597 - From linux-kernel@vger.kernel.org Thu Dec 18 21:38:26 2003
1598 Date: Fri, 12 Dec 2003 18:18:02 +0000
1599 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1600 To: bk-commits-24@vger.kernel.org
1601 Subject: [PATCH] USB: fix bug when errors happen in ioedgeport driver
1602
1603 ChangeSet 1.1286, 2003/12/12 10:18:02-08:00, tchen@on-go.com
1604
1605         [PATCH] USB: fix bug when errors happen in ioedgeport driver
1606
1607
1608 # This patch includes the following deltas:
1609 #                  ChangeSet    1.1285  -> 1.1286 
1610 #       drivers/usb/serial/io_edgeport.c        1.26    -> 1.27   
1611 #
1612
1613  io_edgeport.c |   12 ++++++++----
1614  1 files changed, 8 insertions(+), 4 deletions(-)
1615
1616
1617 diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
1618 - --- a/drivers/usb/serial/io_edgeport.c        Mon Dec 15 07:03:23 2003
1619 +++ b/drivers/usb/serial/io_edgeport.c  Mon Dec 15 07:03:23 2003
1620 @@ -1468,15 +1468,19 @@
1621         urb->transfer_flags |= USB_QUEUE_BULK;
1622  
1623         urb->dev = edge_serial->serial->dev;
1624 +       /* decrement the number of credits we have by the number we just sent */
1625 +       edge_port->txCredits -= count;
1626 +       edge_port->icount.tx += count;
1627 +
1628         status = usb_submit_urb(urb);
1629         if (status) {
1630                 /* something went wrong */
1631                 dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
1632                 edge_port->write_in_progress = FALSE;
1633 - -     } else {
1634 - -             /* decrement the number of credits we have by the number we just sent */
1635 - -             edge_port->txCredits -= count;
1636 - -             edge_port->icount.tx += count;
1637 +
1638 +               /*revert the count if something bad happened...*/
1639 +               edge_port->txCredits += count;
1640 +               edge_port->icount.tx -= count;
1641         }
1642         dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
1643  }
1644 - -
1645 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1646 the body of a message to majordomo@vger.kernel.org
1647 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1648
1649
1650 - From linux-kernel@vger.kernel.org Thu Dec 18 21:39:10 2003
1651 Date: Fri, 12 Dec 2003 18:18:22 +0000
1652 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1653 To: bk-commits-24@vger.kernel.org
1654 Subject: [PATCH] USB: fix io_edgeport driver alignment issues.
1655
1656 ChangeSet 1.1287, 2003/12/12 10:18:22-08:00, tchen@on-go.com
1657
1658         [PATCH] USB: fix io_edgeport driver alignment issues.
1659
1660
1661 # This patch includes the following deltas:
1662 #                  ChangeSet    1.1286  -> 1.1287 
1663 #       drivers/usb/serial/io_fw_boot2.h        1.3     -> 1.4    
1664 #       drivers/usb/serial/io_fw_down2.h        1.3     -> 1.4    
1665 #       drivers/usb/serial/io_fw_down.h 1.3     -> 1.4    
1666 #       drivers/usb/serial/io_fw_boot.h 1.3     -> 1.4    
1667 #
1668
1669  io_fw_boot.h  |    2 +-
1670  io_fw_boot2.h |    2 +-
1671  io_fw_down.h  |    2 +-
1672  io_fw_down2.h |    2 +-
1673  4 files changed, 4 insertions(+), 4 deletions(-)
1674
1675
1676 diff -Nru a/drivers/usb/serial/io_fw_boot.h b/drivers/usb/serial/io_fw_boot.h
1677 - --- a/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003
1678 +++ b/drivers/usb/serial/io_fw_boot.h   Mon Dec 15 07:03:25 2003
1679 @@ -17,7 +17,7 @@
1680                 unsigned short Addr;
1681                 unsigned short Len;
1682                 unsigned char  Data[0];
1683 - -     };
1684 +       } __attribute__ ((packed));
1685  
1686         struct edge_firmware_version_info {
1687                 unsigned char    MajorVersion;
1688 diff -Nru a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h
1689 - --- a/drivers/usb/serial/io_fw_boot2.h        Mon Dec 15 07:03:25 2003
1690 +++ b/drivers/usb/serial/io_fw_boot2.h  Mon Dec 15 07:03:25 2003
1691 @@ -17,7 +17,7 @@
1692                 unsigned short Addr;
1693                 unsigned short Len;
1694                 unsigned char  Data[0];
1695 - -     };
1696 +       } __attribute__ ((packed));
1697  
1698         struct edge_firmware_version_info {
1699                 unsigned char    MajorVersion;
1700 diff -Nru a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h
1701 - --- a/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003
1702 +++ b/drivers/usb/serial/io_fw_down.h   Mon Dec 15 07:03:25 2003
1703 @@ -17,7 +17,7 @@
1704                 unsigned short  Addr;
1705                 unsigned short  Len;
1706                 unsigned char   Data[0];
1707 - -     };
1708 +       } __attribute ((packed));
1709  
1710         struct edge_firmware_version_info {
1711                 unsigned char   MajorVersion;
1712 diff -Nru a/drivers/usb/serial/io_fw_down2.h b/drivers/usb/serial/io_fw_down2.h
1713 - --- a/drivers/usb/serial/io_fw_down2.h        Mon Dec 15 07:03:25 2003
1714 +++ b/drivers/usb/serial/io_fw_down2.h  Mon Dec 15 07:03:25 2003
1715 @@ -17,7 +17,7 @@
1716                 unsigned short Addr;
1717                 unsigned short Len;
1718                 unsigned char  Data[0];
1719 - -     };
1720 +       } __attribute__ ((packed));
1721  
1722         struct edge_firmware_version_info {
1723                 unsigned char  MajorVersion;
1724 - -
1725 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1726 the body of a message to majordomo@vger.kernel.org
1727 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1728 - From linux-kernel@vger.kernel.org Sun Dec 28 14:33:44 2003
1729 Date: Sun, 07 Dec 2003 18:27:17 +0000
1730 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1731 To: bk-commits-24@vger.kernel.org
1732 Subject: [wireless airo] Delay MIC activation to prevent Oops
1733
1734 ChangeSet 1.1136.73.7, 2003/12/07 13:27:17-05:00, achirica@telefonica.net
1735
1736         [wireless airo] Delay MIC activation to prevent Oops
1737
1738
1739 # This patch includes the following deltas:
1740 #                  ChangeSet    1.1136.73.6 -> 1.1136.73.7
1741 #       drivers/net/wireless/airo.c     1.62    -> 1.63
1742 #
1743
1744  airo.c |    7 ++-----
1745  1 files changed, 2 insertions(+), 5 deletions(-)
1746
1747
1748 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1749 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c     2003-11-28 11:26:20.000000000 -0700
1750 +++ linux-2.4.23/drivers/net/wireless/airo.c    2003-12-28 22:30:56.064562029 -0700
1751 @@ -2476,11 +2476,8 @@
1752                         OUT4500( apriv, EVACK, EV_MIC );
1753  #ifdef MICSUPPORT
1754                         if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) {
1755 - -                             if (down_trylock(&apriv->sem) != 0) {
1756 - -                                     set_bit(JOB_MIC, &apriv->flags);
1757 - -                                     wake_up_interruptible(&apriv->thr_wait);
1758 - -                             } else
1759 - -                                     micinit (apriv);
1760 +                               set_bit(JOB_MIC, &apriv->flags);
1761 +                               wake_up_interruptible(&apriv->thr_wait);
1762                         }
1763  #endif
1764                 }
1765 - From linux-kernel@vger.kernel.org Sun Dec 28 14:34:44 2003
1766 Date: Sun, 07 Dec 2003 18:27:13 +0000
1767 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1768 To: bk-commits-24@vger.kernel.org
1769 Subject: [wireless airo] Fix PCI registration
1770
1771 ChangeSet 1.1136.73.6, 2003/12/07 13:27:13-05:00, achirica@telefonica.net
1772
1773         [wireless airo] Fix PCI registration
1774
1775
1776 # This patch includes the following deltas:
1777 #                  ChangeSet    1.1136.73.5 -> 1.1136.73.6
1778 #       drivers/net/wireless/airo.c     1.61    -> 1.62
1779 #
1780
1781  airo.c |   13 ++-----------
1782  1 files changed, 2 insertions(+), 11 deletions(-)
1783
1784
1785 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1786 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c     2003-12-28 22:32:51.418220092 -0700
1787 +++ linux-2.4.23/drivers/net/wireless/airo.c    2003-12-28 22:33:04.226400129 -0700
1788 @@ -1034,7 +1034,6 @@
1789  #define FLAG_802_11    7
1790  #define FLAG_PENDING_XMIT 9
1791  #define FLAG_PENDING_XMIT11 10
1792 - -#define FLAG_PCI     11
1793  #define JOB_MASK       0x1ff0000
1794  #define JOB_DIE                16
1795  #define JOB_XMIT       17
1796 @@ -4639,7 +4638,6 @@
1797                 return -ENODEV;
1798  
1799         pci_set_drvdata(pdev, dev);
1800 - -     set_bit (FLAG_PCI, &((struct airo_info *)dev->priv)->flags);
1801         return 0;
1802  }
1803  
1804 @@ -4669,7 +4667,7 @@
1805  
1806  #ifdef CONFIG_PCI
1807         printk( KERN_INFO "airo:  Probing for PCI adapters\n" );
1808 - -     pci_module_init(&airo_driver);
1809 +       pci_register_driver(&airo_driver);
1810         printk( KERN_INFO "airo:  Finished probing for PCI adapters\n" );
1811  #endif
1812  
1813 @@ -4681,22 +4679,15 @@
1814  
1815  static void __exit airo_cleanup_module( void )
1816  {
1817 - -     int is_pci = 0;
1818         while( airo_devices ) {
1819                 printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name );
1820 - -#ifdef CONFIG_PCI
1821 - -             if (test_bit(FLAG_PCI, &((struct airo_info *)airo_devices->dev->priv)->flags))
1822 - -                     is_pci = 1;
1823 - -#endif
1824                 stop_airo_card( airo_devices->dev, 1 );
1825         }
1826         remove_proc_entry("aironet", proc_root_driver);
1827  
1828 - -     if (is_pci) {
1829  #ifdef CONFIG_PCI
1830 - -             pci_unregister_driver(&airo_driver);
1831 +       pci_unregister_driver(&airo_driver);
1832  #endif
1833 - -     }
1834  }
1835  
1836  #ifdef WIRELESS_EXT
1837 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:12 2003
1838 Date: Sun, 28 Dec 2003 20:09:56 +0000
1839 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1840 To: bk-commits-24@vger.kernel.org
1841 Subject: Daniel Lux: Fix IDE busy-wait race
1842
1843 ChangeSet 1.1344, 2003/12/28 18:09:56-02:00, marcelo@logos.cnet
1844
1845           Daniel Lux: Fix IDE busy-wait race
1846
1847
1848 # This patch includes the following deltas:
1849 #                  ChangeSet    1.1343  -> 1.1344 
1850 #       drivers/ide/ide-iops.c  1.7     -> 1.8    
1851 #
1852
1853  ide-iops.c |   16 ++++++++++++----
1854  1 files changed, 12 insertions(+), 4 deletions(-)
1855
1856
1857 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1858 - --- a/drivers/ide/ide-iops.c  Sun Dec 28 13:01:41 2003
1859 +++ b/drivers/ide/ide-iops.c    Sun Dec 28 13:01:41 2003
1860 @@ -664,11 +664,19 @@
1861         if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1862                 local_irq_set(flags);
1863                 timeout += jiffies;
1864 - -             while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1865 +               stat = hwif->INB(IDE_STATUS_REG);
1866 +               while (stat & BUSY_STAT) {
1867                         if (time_after(jiffies, timeout)) {
1868 - -                             local_irq_restore(flags);
1869 - -                             *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1870 - -                             return 1;
1871 +                               /*
1872 +                                * do one more status read in case we were interrupted between last
1873 +                                * stat = hwif->INB(IDE_STATUS_REG) and time_after(jiffies, timeout)
1874 +                                * in wich case the timeout might have been shorter than specified.
1875 +                                */
1876 +                               if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1877 +                                       local_irq_restore(flags);
1878 +                                       *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1879 +                                       return 1;
1880 +                               }
1881                         }
1882                 }
1883                 local_irq_restore(flags);
1884 - -
1885 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1886 the body of a message to majordomo@vger.kernel.org
1887 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1888
1889 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:46 2003
1890 Date: Sun, 28 Dec 2003 20:14:56 +0000
1891 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1892 To: bk-commits-24@vger.kernel.org
1893 Subject: Fix IDE busywait merge
1894
1895 ChangeSet 1.1345, 2003/12/28 18:14:56-02:00, marcelo@logos.cnet
1896
1897           Fix IDE busywait merge
1898
1899
1900 # This patch includes the following deltas:
1901 #                  ChangeSet    1.1344  -> 1.1345 
1902 #       drivers/ide/ide-iops.c  1.8     -> 1.9    
1903 #
1904
1905  ide-iops.c |    2 ++
1906  1 files changed, 2 insertions(+)
1907
1908
1909 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1910 - --- a/drivers/ide/ide-iops.c  Sun Dec 28 13:01:43 2003
1911 +++ b/drivers/ide/ide-iops.c    Sun Dec 28 13:01:43 2003
1912 @@ -678,6 +678,8 @@
1913                                         return 1;
1914                                 }
1915                         }
1916 +                       else
1917 +                               stat = hwif->INB(IDE_STATUS_REG);
1918                 }
1919                 local_irq_restore(flags);
1920         }
1921 - -
1922 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1923 the body of a message to majordomo@vger.kernel.org
1924 More majordomo info at  http://vger.kernel.org/majordomo-info.html
1925 - From linux-kernel@vger.kernel.org Sun Dec 28 14:36:33 2003
1926 Date: Mon, 22 Dec 2003 18:41:06 +0000
1927 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1928 To: bk-commits-24@vger.kernel.org
1929 Subject: [PATCH] Initialize ioc3_timer before use
1930
1931 ChangeSet 1.1339, 2003/12/22 16:41:06-02:00, ralf@linux-mips.org
1932
1933         [PATCH] Initialize ioc3_timer before use
1934
1935
1936
1937 # This patch includes the following deltas:
1938 #                  ChangeSet    1.1338  -> 1.1339
1939 #       drivers/net/ioc3-eth.c  1.15    -> 1.16
1940 #
1941
1942  ioc3-eth.c |    2 +-
1943  1 files changed, 1 insertion(+), 1 deletion(-)
1944
1945
1946 diff -ruN linux-2.4.23.mine/drivers/net/ioc3-eth.c linux-2.4.23/drivers/net/ioc3-eth.c
1947 - --- linux-2.4.23.mine/drivers/net/ioc3-eth.c  2003-08-25 05:44:42.000000000 -0600
1948 +++ linux-2.4.23/drivers/net/ioc3-eth.c 2003-12-28 22:39:33.291078118 -0700
1949 @@ -1552,11 +1552,11 @@
1950  #endif
1951  
1952         spin_lock_init(&ip->ioc3_lock);
1953 +       init_timer(&ip->ioc3_timer);
1954  
1955         ioc3_stop(ip);
1956         ioc3_init(ip);
1957  
1958 - -     init_timer(&ip->ioc3_timer);
1959         ioc3_mii_init(ip);
1960  
1961         if (ip->phy == -1) {
1962 - From linux-kernel@vger.kernel.org Sun Dec 28 14:29:04 2003
1963 Date: Mon, 22 Dec 2003 11:32:50 +0000
1964 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1965 To: bk-commits-24@vger.kernel.org
1966 Subject: [PATCH] Fix RAID1 blocksize check
1967
1968 ChangeSet 1.1313, 2003/12/22 09:32:50-02:00, neilb@cse.unsw.edu.au
1969
1970         [PATCH] Fix RAID1 blocksize check
1971         
1972         On Saturday December 20, zaitcev@redhat.com wrote:
1973         > In drivers/md/raid1.c, raid1_sync_request contains the following:
1974         >
1975         >         block_nr = sector_nr;
1976         >         bsize = 512;
1977         >         while (!(block_nr & 1) && bsize < PAGE_SIZE
1978         >                         && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
1979         >                 block_nr >>= 1;
1980         >                 bsize <<= 1;
1981         >         }
1982         >
1983         > Suppose that a mirror is 4K in size. The code above produces
1984         > reads (and writes) of the following offsets and sizes:
1985         >  0K[2K], 2K[1K], 3K[0.5K], 3.5K[0.5K]
1986         >
1987         > The above is correct, but it makes the RAID1 completely unuseable
1988         > on s390, because I/O with sizes less than 4K is not supported.
1989         > I would like the attached patch applied to correct the issue.
1990         
1991         Yes, I agree.  Marcelo, could you please apply this patch.
1992         The '<' test is just to make sure a request of 2*bsize at block_nr
1993         will still fit within the size of the device, so a <= is appropriate.
1994         
1995         NeilBrown
1996
1997
1998 # This patch includes the following deltas:
1999 #                  ChangeSet    1.1312  -> 1.1313 
2000 #         drivers/md/raid1.c    1.16    -> 1.17   
2001 #
2002
2003  raid1.c |    2 +-
2004  1 files changed, 1 insertion(+), 1 deletion(-)
2005
2006
2007 diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c
2008 - --- a/drivers/md/raid1.c      Mon Dec 22 04:03:08 2003
2009 +++ b/drivers/md/raid1.c        Mon Dec 22 04:03:08 2003
2010 @@ -1436,7 +1436,7 @@
2011         block_nr = sector_nr;
2012         bsize = 512;
2013         while (!(block_nr & 1) && bsize < PAGE_SIZE
2014 - -                     && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
2015 +                       && (block_nr+2)*(bsize>>9) <= (mddev->sb->size *2)) {
2016                 block_nr >>= 1;
2017                 bsize <<= 1;
2018         }
2019 - -
2020 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
2021 the body of a message to majordomo@vger.kernel.org
2022 More majordomo info at  http://vger.kernel.org/majordomo-info.html
2023
This page took 3.875192 seconds and 3 git commands to generate.