Thread (6 messages) 6 messages, 5 authors, 2017-02-20

Re: [RFC PATCH v1 1/1] mm: zswap - Add crypto acomp/scomp framework support

From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Date: 2017-02-15 22:12:14
Also in: linux-mm, lkml

On Wed, Feb 15, 2017 at 07:27:30PM +0530, Narayana Prasad Athreya wrote:
quoted
I assume all of these crypto_acomp_[compress|decompress] calls are
actually synchronous,
not asynchronous as the name suggests.  Otherwise, this would blow up
quite spectacularly
since all the resources we use in the call get derefed/unmapped below.

Could an async algorithm be implement/used that would break this assumption?
The callback is set to NULL using acomp_request_set_callback(). This implies
synchronous mode of operation. So the underlying implementation must
complete the operation synchronously.
This assumption is not correct. An asynchronous implementation, when
it finishes processing a request, will call acomp_request_complete() which
in turn calls the callback.
If the callback is set to NULL, this function will dereference a NULL
pointer.

Regards,

-- 
Giovanni 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help