[bug report] CIFS: SMBD: Implement function to receive data via RDMA receive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Long Li,

The patch f64b78fd1835: "CIFS: SMBD: Implement function to receive
data via RDMA receive" from Nov 22, 2017 (linux-next), leads to the
following Smatch static checker warning:

	fs/smb/client/smbdirect.c:1849 smbd_recv_buf()
	warn: sleeping in atomic context

fs/smb/client/smbdirect.c
    1844 read_rfc1002_done:
    1845                 return data_read;
    1846         }
    1847 
    1848         log_read(INFO, "wait_event on more data\n");
--> 1849         rc = wait_event_interruptible(

This wait is problematic because smbd_recv_page() is holding
kmap_atomic() which disables preemption.

    1850                 info->wait_reassembly_queue,
    1851                 info->reassembly_data_length >= size ||
    1852                         info->transport_status != SMBD_CONNECTED);
    1853         /* Don't return any data if interrupted */
    1854         if (rc)
    1855                 return rc;
    1856 
    1857         if (info->transport_status != SMBD_CONNECTED) {
    1858                 log_read(ERR, "disconnected\n");
    1859                 return -ECONNABORTED;
    1860         }
    1861 
    1862         goto again;
    1863 }

regards,
dan carpenter




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux