From: Nicolai Stange <nicstange@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Nicolai Stange <nicstange@gmail.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: lib/mpi: BUG: sleeping function called from invalid context on next-20160726
Date: Thu, 28 Jul 2016 09:40:17 +0200 [thread overview]
Message-ID: <87invqp5we.fsf@gmail.com> (raw)
In-Reply-To: <20160728052917.GA811@gondor.apana.org.au> (Herbert Xu's message of "Thu, 28 Jul 2016 13:29:17 +0800")
Herbert Xu <herbert@gondor.apana.org.au> writes:
> On Wed, Jul 27, 2016 at 11:05:05PM +0200, Nicolai Stange wrote:
>>
>> with linux-next-20160726, I get this:
>>
>> BUG: sleeping function called from invalid context at /mnt/scratch/nic/linux-next/mm/slab.h:388
>
> Does this patch help?
Yes, works like a charm now!
>> I would have sent a patch, but there is another point which puzzles me
>> in mpi_read_raw_from_sgl():
>>
>> [...]
>> const u8 *buff;
>> [...]
>> sg_miter_start(&miter, sgl, ents, SG_MITER_ATOMIC | SG_MITER_FROM_SG);
>>
>> lzeros = 0;
>> len = 0;
>> while (nbytes > 0) {
>> while (len && !*buff) {
>> lzeros++;
>> len--;
>> buff++;
>> }
>>
>>
>> Thus, buff isn't initialized before its first use? Or am I misreading
>> something here?
>
> On the first entry len is zero therefore we will go to the end of the
> loop and initialise buff.
Hah! Thanks, although being obvious, I didn't see this...
Thanks,
Nicolai
prev parent reply other threads:[~2016-07-28 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 21:05 lib/mpi: BUG: sleeping function called from invalid context on next-20160726 Nicolai Stange
2016-07-28 5:29 ` Herbert Xu
2016-07-28 7:40 ` Nicolai Stange [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87invqp5we.fsf@gmail.com \
--to=nicstange@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).