Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pullstaging driver fixes from Greg KH:
"Here are two staging driver fixes for 5.17-rc4. These are:

- fbtft error path fix

- vc04_services rcu dereference fix

Both of these have been in linux-next for a while with no reported
issues"

* tag 'staging-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: fbtft: Fix error path in fbtft_driver_module_init()
staging: vc04_services: Fix RCU dereference check

+22 -3
+4 -1
drivers/staging/fbtft/fbtft.h
··· 334 334 ret = spi_register_driver(&fbtft_driver_spi_driver); \ 335 335 if (ret < 0) \ 336 336 return ret; \ 337 - return platform_driver_register(&fbtft_driver_platform_driver); \ 337 + ret = platform_driver_register(&fbtft_driver_platform_driver); \ 338 + if (ret < 0) \ 339 + spi_unregister_driver(&fbtft_driver_spi_driver); \ 340 + return ret; \ 338 341 } \ 339 342 \ 340 343 static void __exit fbtft_driver_module_exit(void) \
+18 -2
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
··· 1058 1058 1059 1059 DEBUG_TRACE(SERVICE_CALLBACK_LINE); 1060 1060 1061 + rcu_read_lock(); 1061 1062 service = handle_to_service(handle); 1062 - if (WARN_ON(!service)) 1063 + if (WARN_ON(!service)) { 1064 + rcu_read_unlock(); 1063 1065 return VCHIQ_SUCCESS; 1066 + } 1064 1067 1065 1068 user_service = (struct user_service *)service->base.userdata; 1066 1069 instance = user_service->instance; 1067 1070 1068 - if (!instance || instance->closing) 1071 + if (!instance || instance->closing) { 1072 + rcu_read_unlock(); 1069 1073 return VCHIQ_SUCCESS; 1074 + } 1075 + 1076 + /* 1077 + * As hopping around different synchronization mechanism, 1078 + * taking an extra reference results in simpler implementation. 1079 + */ 1080 + vchiq_service_get(service); 1081 + rcu_read_unlock(); 1070 1082 1071 1083 vchiq_log_trace(vchiq_arm_log_level, 1072 1084 "%s - service %lx(%d,%p), reason %d, header %lx, instance %lx, bulk_userdata %lx", ··· 1109 1097 bulk_userdata); 1110 1098 if (status != VCHIQ_SUCCESS) { 1111 1099 DEBUG_TRACE(SERVICE_CALLBACK_LINE); 1100 + vchiq_service_put(service); 1112 1101 return status; 1113 1102 } 1114 1103 } ··· 1118 1105 if (wait_for_completion_interruptible(&user_service->remove_event)) { 1119 1106 vchiq_log_info(vchiq_arm_log_level, "%s interrupted", __func__); 1120 1107 DEBUG_TRACE(SERVICE_CALLBACK_LINE); 1108 + vchiq_service_put(service); 1121 1109 return VCHIQ_RETRY; 1122 1110 } else if (instance->closing) { 1123 1111 vchiq_log_info(vchiq_arm_log_level, "%s closing", __func__); 1124 1112 DEBUG_TRACE(SERVICE_CALLBACK_LINE); 1113 + vchiq_service_put(service); 1125 1114 return VCHIQ_ERROR; 1126 1115 } 1127 1116 DEBUG_TRACE(SERVICE_CALLBACK_LINE); ··· 1152 1137 header = NULL; 1153 1138 } 1154 1139 DEBUG_TRACE(SERVICE_CALLBACK_LINE); 1140 + vchiq_service_put(service); 1155 1141 1156 1142 if (skip_completion) 1157 1143 return VCHIQ_SUCCESS;