Skip to content
Commit 3ebd2fd0 authored by Kaike Wan's avatar Kaike Wan Committed by Doug Ledford
Browse files

IB/sa: Put netlink request into the request list before sending



It was found by Saurabh Sengar that the netlink code tried to allocate
memory with GFP_KERNEL while holding a spinlock. While it is possible
to fix the issue by replacing GFP_KERNEL with GFP_ATOMIC, it is better
to get rid of the spinlock while sending the packet. However, in order
to protect against a race condition that a quick response may be received
before the request is put on the request list, we need to put the request
on the list first.

Signed-off-by: default avatarKaike Wan <kaike.wan@intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reported-by: default avatarSaurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 2c63d107
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment