[Ocf-linux-users] Fix for oops in cryptodev
Brought to you by:
david-m
From: Pavel R. <pr...@gn...> - 2010-09-03 20:21:35
|
Hello! This piece of code in cryptodev_open() is wrong and unnecessary: if (filp->private_data) { printk("cryptodev: Private data already exists !\n"); return(0); } This check is triggered on Linux 2.6.35 and 2.6.36-rc3 and causes the initialization to be cut short, which causes an oops on uninitialized list in subsequent calls. Generally, it's a bad idea to bail out from a function without returning an error code. I'm not sure if I'm supposed to send a patch considering that OCF is a patch itself. -- Regards, Pavel Roskin |