RE: cifs causes BUG: soft lockup detected on CPU

Valentin Zaharov
2007-03-29T09:35:17Z

I get this error when try to apply the patch:

patch -p1 < cifs.patch
patching file include/linux/fs.h
patch: **** malformed patch at line 26: /*

Am I missing something or patch is bad?

Thanks in advance

-----Original Message-----
From: Andrew Morton [mailto:akpm@linux-foundation.org]
Sent: Thursday, March 29, 2007 11:22 AM
To: Valentin Zaharov
Cc: linux-kernel@vger.kernel.org; Steven French
Subject: Re: cifs causes BUG: soft lockup detected on CPU

On Thu, 29 Mar 2007 11:13:04 +0200 "Valentin Zaharov"
<karlos_@netvision.net.il> wrote:

> I've tried different kernel versions.
> Right now iam using generic 2.6.9-42 on one machine and 2.6.20.1 on
> another one.
> I also tried various distributions ( Suse, CentOS, RHEL4 ) - not sure
> it is relevant.
> Tried installing latest cifs modules, tried changing CIFSMaxBufSize to

> 15000, without luck.
> Freezes are totally random - sometimes they happen 2-4 times a day,
> sometimes it can take 2 weeks.

Yeah, it's a relatively recently known-bug, I'm afraid.

Probably this will keep you out of trouble until it gets fixed for real:

--- a/include/linux/fs.h~a
+++ a/include/linux/fs.h
@@ -627,25 +627,7 @@ extern void inode_double_unlock(struct i
*/
static inline loff_t i_size_read(const struct inode *inode) { -#if
BITS_PER_LONG==32 && defined(CONFIG_SMP)
- loff_t i_size;
- unsigned int seq;
-
- do {
- seq = read_seqcount_begin(&inode->i_size_seqcount);
- i_size = inode->i_size;
- } while (read_seqcount_retry(&inode->i_size_seqcount, seq));
- return i_size;
-#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)
- loff_t i_size;
-
- preempt_disable();
- i_size = inode->i_size;
- preempt_enable();
- return i_size;
-#else
return inode->i_size;
-#endif
}

/*
_