Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crc-t10dif.c Create Date:2022-07-28 06:55:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:crc_t10dif_rehash

Proto:static int crc_t10dif_rehash(struct notifier_block *self, unsigned long val, void *data)

Type:int

Parameter:

TypeParameterName
struct notifier_block *self
unsigned longval
void *data
25  alg = data
28  If val != CRYPTO_MSG_ALG_LOADED || static_key_false( & crct10dif_fallback) || strncmp(cra_name, CRC_T10DIF_STRING, strlen(CRC_T10DIF_STRING)) Then Return 0
33  mutex_lock( & crc_t10dif_mutex)
34  old = cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(crct10dif_tfm, lockdep_is_held( & crc_t10dif_mutex))
36  If Not old Then
37  mutex_unlock( & crc_t10dif_mutex)
38  Return 0
40  new = crypto_alloc_shash("crct10dif", 0, 0)
41  If IS_ERR(new) Then
42  mutex_unlock( & crc_t10dif_mutex)
43  Return 0
45  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(crct10dif_tfm, new)
46  mutex_unlock( & crc_t10dif_mutex)
48  synchronize_rcu()
49  rypto_free_shash() - zeroize and free the message digest handle*@tfm: cipher handle to be freed
50  Return 0