ksmbd: fix race condition between session lookup and expire
[platform/kernel/linux-rpi.git] / fs / smb / server / connection.h
index ab2583f..3c00524 100644 (file)
@@ -50,6 +50,7 @@ struct ksmbd_conn {
        struct nls_table                *local_nls;
        struct unicode_map              *um;
        struct list_head                conns_list;
+       struct rw_semaphore             session_lock;
        /* smb session 1 per user */
        struct xarray                   sessions;
        unsigned long                   last_active;