rslib: Add GFP aware init function
authorThomas Gleixner <tglx@linutronix.de>
Sun, 22 Apr 2018 16:23:46 +0000 (18:23 +0200)
committerKees Cook <keescook@chromium.org>
Wed, 25 Apr 2018 02:50:04 +0000 (19:50 -0700)
commit83a530e1610ab996e59c0941db6cc72f763dddbd
treec5abcba7d5b8213ec3ddc39cb7508d80aab08469
parent6d08b06e67cd117f6992c46611dfb4ce267cd71e
rslib: Add GFP aware init function

The rslib usage in dm/verity_fec is broken because init_rs() can nest in
GFP_NOIO mempool allocations as init_rs() is invoked from the mempool alloc
callback.

Provide a variant which takes gfp_t flags as argument.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Neil Brown <neilb@suse.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/rslib.h
lib/reed_solomon/reed_solomon.c