@@ -2464,7 +2464,7 @@ static int smb2_create_sd_buffer(struct ksmbd_work *work,
2464
2464
return - ENOENT ;
2465
2465
2466
2466
/* Parse SD BUFFER create contexts */
2467
- context = smb2_find_context_vals (req , SMB2_CREATE_SD_BUFFER );
2467
+ context = smb2_find_context_vals (req , SMB2_CREATE_SD_BUFFER , 4 );
2468
2468
if (!context )
2469
2469
return - ENOENT ;
2470
2470
else if (IS_ERR (context ))
@@ -2666,7 +2666,7 @@ int smb2_open(struct ksmbd_work *work)
2666
2666
2667
2667
if (req -> CreateContextsOffset ) {
2668
2668
/* Parse non-durable handle create contexts */
2669
- context = smb2_find_context_vals (req , SMB2_CREATE_EA_BUFFER );
2669
+ context = smb2_find_context_vals (req , SMB2_CREATE_EA_BUFFER , 4 );
2670
2670
if (IS_ERR (context )) {
2671
2671
rc = PTR_ERR (context );
2672
2672
goto err_out1 ;
@@ -2686,7 +2686,7 @@ int smb2_open(struct ksmbd_work *work)
2686
2686
}
2687
2687
2688
2688
context = smb2_find_context_vals (req ,
2689
- SMB2_CREATE_QUERY_MAXIMAL_ACCESS_REQUEST );
2689
+ SMB2_CREATE_QUERY_MAXIMAL_ACCESS_REQUEST , 4 );
2690
2690
if (IS_ERR (context )) {
2691
2691
rc = PTR_ERR (context );
2692
2692
goto err_out1 ;
@@ -2697,7 +2697,7 @@ int smb2_open(struct ksmbd_work *work)
2697
2697
}
2698
2698
2699
2699
context = smb2_find_context_vals (req ,
2700
- SMB2_CREATE_TIMEWARP_REQUEST );
2700
+ SMB2_CREATE_TIMEWARP_REQUEST , 4 );
2701
2701
if (IS_ERR (context )) {
2702
2702
rc = PTR_ERR (context );
2703
2703
goto err_out1 ;
@@ -2709,7 +2709,7 @@ int smb2_open(struct ksmbd_work *work)
2709
2709
2710
2710
if (tcon -> posix_extensions ) {
2711
2711
context = smb2_find_context_vals (req ,
2712
- SMB2_CREATE_TAG_POSIX );
2712
+ SMB2_CREATE_TAG_POSIX , 16 );
2713
2713
if (IS_ERR (context )) {
2714
2714
rc = PTR_ERR (context );
2715
2715
goto err_out1 ;
@@ -3107,7 +3107,7 @@ int smb2_open(struct ksmbd_work *work)
3107
3107
struct create_alloc_size_req * az_req ;
3108
3108
3109
3109
az_req = (struct create_alloc_size_req * )smb2_find_context_vals (req ,
3110
- SMB2_CREATE_ALLOCATION_SIZE );
3110
+ SMB2_CREATE_ALLOCATION_SIZE , 4 );
3111
3111
if (IS_ERR (az_req )) {
3112
3112
rc = PTR_ERR (az_req );
3113
3113
goto err_out ;
@@ -3134,7 +3134,7 @@ int smb2_open(struct ksmbd_work *work)
3134
3134
err );
3135
3135
}
3136
3136
3137
- context = smb2_find_context_vals (req , SMB2_CREATE_QUERY_ON_DISK_ID );
3137
+ context = smb2_find_context_vals (req , SMB2_CREATE_QUERY_ON_DISK_ID , 4 );
3138
3138
if (IS_ERR (context )) {
3139
3139
rc = PTR_ERR (context );
3140
3140
goto err_out ;
0 commit comments