vcalls-front: Avoid get_free_pages(GFP_KERNEL)
under spinlock")
Reported-by: Dan Carpenter
Signed-off-by: Wen Yang
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC: Dan Carpenter
CC: xen-devel@lists.xenproject.org
CC: linux-ker...@vger.kernel.org
---
drivers/xen/pvcalls
lls-front: Avoid get_free_pages(GFP_KERNEL)
under spinlock")
Reported-by: Dan Carpenter
Suggested-by: Boris Ostrovsky
Signed-off-by: Wen Yang
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC: Dan Carpenter
CC: xen-devel@lists.xenproject.org
CC: linux-ker...@vger
held, The allocation is not allowed to sleep and
GFP_KERNEL is not sufficient, it has to be ATOMIC.
This issue was detected by using the Coccinelle software.
Signed-off-by: Wen Yang
CC: Julia Lawall
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC: xen-devel@lists.xenproject.org
CC:
ed-off-by: Wen Yang
CC: Julia Lawall
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC: xen-devel@lists.xenproject.org
CC: linux-ker...@vger.kernel.org
---
drivers/xen/pvcalls-front.c | 71 ++---
1 file changed, 59 insertions(+), 12 deletions(-)
d
ators i.e., free_page()
and free_pages(), respectively.
Suggested-by: Juergen Gross
Signed-off-by: Wen Yang
CC: Julia Lawall
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC: xen-devel@lists.xenproject.org
CC: linux-ker...@vger.kernel.org
---
drivers/xen/pvcalls-fro
ators i.e., free_page()
and free_pages(), respectively.
v4: It would be better to pre-populate map (struct sock_mapping),
rather than introducing one more new struct.
Suggested-by: Juergen Gross
Suggested-by: Boris Ostrovsky
Suggested-by: Stefano Stabellini
Signed-off-by: Wen Yang
CC: Jul
e kzalloc(sizeof(*map2), GFP_ATOMIC) outside spinlock and
use GFP_KERNEL instead.
Suggested-by: Juergen Gross
Suggested-by: Boris Ostrovsky
Suggested-by: Stefano Stabellini
Signed-off-by: Wen Yang
CC: Julia Lawall
CC: Boris Ostrovsky
CC: Juergen Gross
CC: Stefano Stabellini
CC:
e kzalloc(sizeof(*map2), GFP_ATOMIC) outside spinlock and
use GFP_KERNEL instead.
v6: Drop the superfluous calls.
Suggested-by: Juergen Gross
Suggested-by: Boris Ostrovsky
Suggested-by: Stefano Stabellini
Signed-off-by: Wen Yang
CC: Julia Lawall
CC: Boris Ostrovsky
CC: Juergen Gross
CC