Commit f9d1c6ca authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://

* 'for-linus' of git://
  IB/uverbs: Fix check of is_closed flag check in ib_uverbs_async_handler()
  RDMA/nes: Fix off-by-one in nes_reg_user_mr() error path
parents a8051fde fb77bcef
......@@ -423,7 +423,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
unsigned long flags;
spin_lock_irqsave(&file->async_file->lock, flags);
if (!file->async_file->is_closed) {
if (file->async_file->is_closed) {
spin_unlock_irqrestore(&file->async_file->lock, flags);
......@@ -2456,10 +2456,8 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
if ((page_count!=0)&&(page_count<<12)-(region->offset&(4096-1))>=region->length)
goto enough_pages;
if ((page_count&0x01FF) == 0) {
if (page_count>(1024*512)) {
if (page_count >= 1024 * 512) {
pci_free_consistent(nesdev->pcidev, 4096, vpbl.pbl_vbase,
nesadapter->allocated_mrs, stag_index);
Supports Markdown
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