]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
random: fix possible sleeping allocation from irq context
authorTheodore Ts'o <tytso@mit.edu>
Mon, 23 Apr 2018 22:51:28 +0000 (18:51 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:23:29 +0000 (12:23 +0200)
commit92a8060d9a15481fb3c084d67a5d86ae5c3e24ad
tree93c40092699c189450481e6f56a3aa7261a1b5e6
parente8090857d85e342ead55ddeeb9bd04a7a20b5dc2
random: fix possible sleeping allocation from irq context

BugLink: http://bugs.launchpad.net/bugs/1778265
commit 6c1e851c4edc13a43adb3ea4044e3fc8f43ccf7d upstream.

We can do a sleeping allocation from an irq context when CONFIG_NUMA
is enabled.  Fix this by initializing the NUMA crng instances in a
workqueue.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot+9de458f6a5e713ee8c1a@syzkaller.appspotmail.com
Fixes: 8ef35c866f8862df ("random: set up the NUMA crng instances...")
Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/random.c