Skip to contentSkip to conversation

2.5: further llseek cleanup (3/3)

PATCH In review Manfred Spraul 2 participants 3 messages Feb 16, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5: further llseek cleanup (3/3)

Hi Robert,

I think the pcilynx change is wrong:

Review

Quoted 4 lines
(quoted diff) +2 -2
-        if (newoffs < 0 || newoffs > PCILYNX_MAX_MEMORY + 1) return
-EINVAL;
+        if (newoffs < 0 || newoffs > PCILYNX_MAX_MEMORY + 1) {
+                lock_kernel();
                  ^^^^^^ unlock_kernel()?

Review

Quoted 4 lines
(quoted diff) +2 -0
+                return -EINVAL;
+        }
 
         file->f_pos = newoffs;

^^^^^^^^^^^^^^^^^^^ where is the unlock here?

Quoted 1 line
         return newoffs;

--
Manfred

#1 lore raw
Quoted 3 lines · Manfred Spraul

Hi Robert,

I think the pcilynx change is wrong:

Indeed. Thank you, Manfred.

Linus, patch against 2.5.5-pre1 is attached. Please, apply.

Robert Love

drivers/ieee1394/pcilynx.c +2 -1
diff -urN linux-2.5.5-pre1/drivers/ieee1394/pcilynx.c linux/drivers/ieee1394/pcilynx.c
@@ -748,10 +748,11 @@
         }
 
         if (newoffs < 0 || newoffs > PCILYNX_MAX_MEMORY + 1) {
-                lock_kernel();
+                unlock_kernel();
                 return -EINVAL;
         }
 
+        unlock_kernel();
         file->f_pos = newoffs;
         return newoffs;
 }
#2 lore raw
Quoted 3 lines · Robert Love

Indeed. Thank you, Manfred.

Linus, patch against 2.5.5-pre1 is attached. Please, apply.

Ugh, another one. Linus, please apply.

Robert Love

arch/cris/drivers/eeprom.c +3 -3
diff -urN linux-2.5.5-pre1/arch/cris/drivers/eeprom.c linux/arch/cris/drivers/eeprom.c
@@ -470,17 +470,17 @@
   /* truncate position */
   if (file->f_pos < 0)
   {
-    file->f_pos = 0;    
-    unlock_kernel();
+    file->f_pos = 0;
     ret = -EOVERFLOW;
   }
-  
+
   if (file->f_pos >= eeprom.size)
   {
     file->f_pos = eeprom.size - 1;
     ret = -EOVERFLOW;
   }
 
+  unlock_kernel();
   return ( ret );
 }