[Ocf-linux-users] Memory leak observed in cryptodev
Brought to you by:
david-m
From: anand r. <one...@ya...> - 2013-02-24 10:20:36
|
Hi, I have implemented an OCF-driver for our crypto Hardware. For initial testing I have just registered call backs for OCF like below. DEVMETHOD(cryptodev_newsession, xxx_newsession), DEVMETHOD(cryptodev_freesession,xxx_freesession), DEVMETHOD(cryptodev_process, xxx_process), DEVMETHOD(cryptodev_kprocess, xxx_kprocess), But I am returning at the very beginning of callbacks xxx_newsession() and xxx_processs() without doing any operation by "return (EINVAL);" So when I return like these the crypto operations supposed to be fallback to cryptosoft. Now I am running this driver on two boards, on the first board I am running a TLS server (using openssl s_server -tls1) and on the second board I am running TLS client (using openssl s_client -tls1) on both boards the crypto operations which are passed to OCF through OpenSSL will be offloaded to crypto Hardware but since I am returning immediately at xxx_newsession() with error value, the crypto operation should get fallback to cryptosoft. But when I do this I am observing a memory leak in the system. I have taken the memory usage details before starting the test and continuously observed memory usage till the duration of test, using "cat /proc/meminfo" command. Please give some suggestions on what could be going wrong. Best Regards, Anand |