Skip to content

Commit f9d1c6c

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: 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
2 parents a8051fd + fb77bce commit f9d1c6c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/infiniband/core/uverbs_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
423423
unsigned long flags;
424424

425425
spin_lock_irqsave(&file->async_file->lock, flags);
426-
if (!file->async_file->is_closed) {
426+
if (file->async_file->is_closed) {
427427
spin_unlock_irqrestore(&file->async_file->lock, flags);
428428
return;
429429
}

drivers/infiniband/hw/nes/nes_verbs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,10 +2456,8 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
24562456
if ((page_count!=0)&&(page_count<<12)-(region->offset&(4096-1))>=region->length)
24572457
goto enough_pages;
24582458
if ((page_count&0x01FF) == 0) {
2459-
if (page_count>(1024*512)) {
2459+
if (page_count >= 1024 * 512) {
24602460
ib_umem_release(region);
2461-
pci_free_consistent(nesdev->pcidev, 4096, vpbl.pbl_vbase,
2462-
vpbl.pbl_pbase);
24632461
nes_free_resource(nesadapter,
24642462
nesadapter->allocated_mrs, stag_index);
24652463
kfree(nesmr);

0 commit comments

Comments
 (0)