Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hello,
> 
> I am running Kernel version 2.6.35-rc5-pnfs and notice there is kernel
> crash everytime i run iozone on the mounted directory. Is there a
> patch already developed for this bug which i can apply. Please see the
> error message from message log.
> 

 I'm not sure it's ok, please try it.

----

 nfs_writeargs.lock_context always NULL at direct write procedure,
it will cause kernel panic when encode stateid.

Signed-off-by: Bian Naimeng <biannm@xxxxxxxxxxxxxx>

---
 fs/nfs/direct.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 3ef9b0c..cb2e1fd 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -801,6 +801,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq,
 		data->cred = msg.rpc_cred;
 		data->args.fh = NFS_FH(inode);
 		data->args.context = ctx;
+		data->args.lock_context = nfs_get_lock_context(ctx);
 		data->args.offset = pos;
 		data->args.pgbase = pgbase;
 		data->args.pages = data->pagevec;
-- 
1.6.5.2

-- 
Regards
Bian Naimeng

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux