Some updates

marzo 27, 2006 on 3:37 pm | In Web | 2 Commenti

You may have noticed some errors today because i was updating blog to WordPress 2.0.2 and PhpStats to 0.1.9.1b for security checks.

Update lasted no more that 30 mins.

Sorry, i hope security holes are fixed now.

Patrizio

Submount (subfs) for Linux 2.6.16 fixed (Take two, working!)

marzo 22, 2006 on 10:24 am | In Developing | 19 Commenti

Seems the previous post is did was bugged due to a typo (unlock/lock exchange).
The strange thing is that i checked that piece of code a lot of times, i was investigating for kernel bug, while the bug was in my 3 lines!

However…

Now, thanks to shishir note, i could fix it, he reports another error, which i haven’t, but it’s completly unrelated.
Submount seems back to life!

I added a version check too, so users untile 2.6.15 will use original semaphore code, while 2.6.16 will use mutexes.

Please test.

Download Patch

To apply the patch

cd subfs-0.9
patch -p1 < submount-2.6.16-fix.diff

Full patch listing here (use the download link to apply, tabs are gone here!):

— a/subfs.c 2006-03-22 10:06:33.000000000 +0100
+++ b/subfs.c 2006-03-22 10:08:11.000000000 +0100
@@ -25,6 +25,7 @@
#include <asm/signal.h>
#include <linux/signal.h>
#include <linux/sched.h>
+#include <linux/version.h>

#include "subfs.h"

@@ -221,14 +222,30 @@
struct vfsmount *child;

/* This is ugly, but prevents a lockup during mount. */
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+ mutex_unlock(&dir->i_mutex);
+#else
up(&dir->i_sem);
+#endif
+
if (down_interruptible(&sfs_mnt->sem)) {
– down(&dir->i_sem);/*put the dir sem back down if interrupted*/
+
+# if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+ mutex_lock(&dir->i_mutex); /*put the dir sem back down if interrupted*/
+#else
+ down(&dir->i_sem); /*put the dir sem back down if interrupted*/
+#endif
return ERR_PTR(-ERESTARTSYS);
}
child = get_child_mount(sfs_mnt);
up(&sfs_mnt->sem);
+
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+ mutex_lock(&dir->i_mutex); /*put the dir sem back down if interrupted*/
+#else
down(&dir->i_sem);
+#endif
if (IS_ERR(child))
return (void *) child;
subfs_send_signal();

Patrizio

No hope?

marzo 16, 2006 on 3:10 pm | In World/Politics | Nessun Commento

Every time i turn on the tv, after 5 mins i’m so displeased i turn it off.

a song lyrics fills the hole of my words

“When the truth walks away
Everybody stays
Cause the truth about the world is that crime does pay

So if you walk away
Who is gonna stay
Cause I’d like to make the world be a better place”

shamelessy taken from -> Have you ever – The Offspring

Patrizio

Comment Spam

marzo 10, 2006 on 4:03 pm | In Web | Nessun Commento

some guys must have nothing better to do then spamming blogs with comments.

this forced me to update the comment checks and add a spam clacklist and a captcha.

i hope i’ll soon be ready to remove both.

Please spam somewhere else.

Patrizio

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^