Revision f8836e87af2305f34053e6936f81d3f91be7aac4 authored by Alexander Potapenko on 21 November 2019, 15:52:59 UTC, committed by Alexander Potapenko on 24 September 2021, 14:36:25 UTC
Make KMSAN usable by adding the necessary Kconfig bits. Signed-off-by: Alexander Potapenko <glider@google.com> --- This patch was previously called "kmsan: Changing existing files to enable KMSAN builds". Logically unrelated parts of it were split away. v4: - split away changes to init/main.c as requested by Andrey Konovalov v6: - moved Makefile changes to the core patch Link: https://linux-review.googlesource.com/id/I1d295ce8159ce15faa496d20089d953a919c125e
1 parent f57cc79
cifs_swn.h
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Witness Service client for CIFS
*
* Copyright (c) 2020 Samuel Cabrero <scabrero@suse.de>
*/
#ifndef _CIFS_SWN_H
#define _CIFS_SWN_H
#include "cifsglob.h"
struct cifs_tcon;
struct sk_buff;
struct genl_info;
#ifdef CONFIG_CIFS_SWN_UPCALL
extern int cifs_swn_register(struct cifs_tcon *tcon);
extern int cifs_swn_unregister(struct cifs_tcon *tcon);
extern int cifs_swn_notify(struct sk_buff *skb, struct genl_info *info);
extern void cifs_swn_dump(struct seq_file *m);
extern void cifs_swn_check(void);
static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server)
{
if (server->use_swn_dstaddr) {
server->dstaddr = server->swn_dstaddr;
return true;
}
return false;
}
static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server)
{
server->use_swn_dstaddr = false;
}
#else
static inline int cifs_swn_register(struct cifs_tcon *tcon) { return 0; }
static inline int cifs_swn_unregister(struct cifs_tcon *tcon) { return 0; }
static inline int cifs_swn_notify(struct sk_buff *s, struct genl_info *i) { return 0; }
static inline void cifs_swn_dump(struct seq_file *m) {}
static inline void cifs_swn_check(void) {}
static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
#endif /* CONFIG_CIFS_SWN_UPCALL */
#endif /* _CIFS_SWN_H */
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...