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 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi

Pull IPMI fixes from Corey Minyard:
"Fixes for some bugs cause by recent changes. One crash if you feed bad
data to the module parameters, one BUG that sometimes occurs when a
user closes the connection, and one bug that cause the driver to not
work if the configuration information only comes in from SMBIOS"

* tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi:
ipmi: fix sleep-in-atomic in free_user at cleanup SRCU user->release_barrier
ipmi: ipmi_si_hardcode.c: init si_type array to fix a crash
ipmi: Fix failure on SMBIOS specified devices

+19 -3
-1
drivers/char/ipmi/ipmi_dmi.c
··· 66 66 return; 67 67 } 68 68 69 - memset(&p, 0, sizeof(p)); 70 69 p.addr = base_addr; 71 70 p.space = space; 72 71 p.regspacing = offset;
+17 -2
drivers/char/ipmi/ipmi_msghandler.c
··· 214 214 215 215 /* Does this interface receive IPMI events? */ 216 216 bool gets_events; 217 + 218 + /* Free must run in process context for RCU cleanup. */ 219 + struct work_struct remove_work; 217 220 }; 218 221 219 222 static struct ipmi_user *acquire_ipmi_user(struct ipmi_user *user, int *index) ··· 1160 1157 return rv; 1161 1158 } 1162 1159 1160 + static void free_user_work(struct work_struct *work) 1161 + { 1162 + struct ipmi_user *user = container_of(work, struct ipmi_user, 1163 + remove_work); 1164 + 1165 + cleanup_srcu_struct(&user->release_barrier); 1166 + kfree(user); 1167 + } 1168 + 1163 1169 int ipmi_create_user(unsigned int if_num, 1164 1170 const struct ipmi_user_hndl *handler, 1165 1171 void *handler_data, ··· 1212 1200 goto out_kfree; 1213 1201 1214 1202 found: 1203 + INIT_WORK(&new_user->remove_work, free_user_work); 1204 + 1215 1205 rv = init_srcu_struct(&new_user->release_barrier); 1216 1206 if (rv) 1217 1207 goto out_kfree; ··· 1274 1260 static void free_user(struct kref *ref) 1275 1261 { 1276 1262 struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount); 1277 - cleanup_srcu_struct(&user->release_barrier); 1278 - kfree(user); 1263 + 1264 + /* SRCU cleanup must happen in task context. */ 1265 + schedule_work(&user->remove_work); 1279 1266 } 1280 1267 1281 1268 static void _ipmi_destroy_user(struct ipmi_user *user)
+2
drivers/char/ipmi/ipmi_si_hardcode.c
··· 118 118 char *str; 119 119 char *si_type[SI_MAX_PARMS]; 120 120 121 + memset(si_type, 0, sizeof(si_type)); 122 + 121 123 /* Parse out the si_type string into its components. */ 122 124 str = si_type_str; 123 125 if (*str != '\0') {