summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-12-14 11:11:33 +0000
committerMark Brown <broonie@kernel.org>2018-12-14 11:11:33 +0000
commit5f783fd0a840588ca62b9f658d306277c7127229 (patch)
treeacc2d5d7d33801ce8478e308a08acef7353b4afe /include/linux
parent684d5e05df8cdc18791e76b11f6bc85ecd4d9416 (diff)
parent640f85865ca658ae07d485693a3d452bdbbadaba (diff)
Merge tag 'v4.4.167' into linux-linaro-lsk-v4.4
This is the 4.4.167 stable release
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h7
-rw-r--r--include/linux/usb.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b30540d6d125..48a59f731406 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2668,7 +2668,12 @@ static inline void set_task_comm(struct task_struct *tsk, const char *from)
{
__set_task_comm(tsk, from, false);
}
-extern char *get_task_comm(char *to, struct task_struct *tsk);
+
+extern char *__get_task_comm(char *to, size_t len, struct task_struct *tsk);
+#define get_task_comm(buf, tsk) ({ \
+ BUILD_BUG_ON(sizeof(buf) != TASK_COMM_LEN); \
+ __get_task_comm(buf, sizeof(buf), tsk); \
+})
#ifdef CONFIG_SMP
void scheduler_ipi(void);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 092b5658b9c3..5c03ebc6dfa0 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -334,11 +334,11 @@ struct usb_host_bos {
};
int __usb_get_extra_descriptor(char *buffer, unsigned size,
- unsigned char type, void **ptr);
+ unsigned char type, void **ptr, size_t min);
#define usb_get_extra_descriptor(ifpoint, type, ptr) \
__usb_get_extra_descriptor((ifpoint)->extra, \
(ifpoint)->extralen, \
- type, (void **)ptr)
+ type, (void **)ptr, sizeof(**(ptr)))
/* ----------------------------------------------------------------------- */