Re: [PATCH v2] block: register_blkdev doesn't check name against NULL

2013-09-29 Thread chaiwen
On 09/29/2013 02:55 PM, vaughan wrote: On 09/23/2013 10:56 PM, Jeff Moyer wrote: Vaughan Cao writes: register_blkdev(0, NULL) can result kernel Oops by copying from NULL in strlcpy(). Fix it by checking NULL pointer at the beginning and WARN when encountered in unregister_blkdev. Uhh, so yea

Re: [PATCH v2] block: register_blkdev doesn't check name against NULL

2013-09-28 Thread vaughan
On 09/23/2013 10:56 PM, Jeff Moyer wrote: > Vaughan Cao writes: > >> register_blkdev(0, NULL) can result kernel Oops by copying from NULL >> in strlcpy(). Fix it by checking NULL pointer at the beginning and >> WARN when encountered in unregister_blkdev. > Uhh, so yeah, this is an exported functio

Re: [PATCH v2] block: register_blkdev doesn't check name against NULL

2013-09-23 Thread Jeff Moyer
Vaughan Cao writes: > register_blkdev(0, NULL) can result kernel Oops by copying from NULL > in strlcpy(). Fix it by checking NULL pointer at the beginning and > WARN when encountered in unregister_blkdev. Uhh, so yeah, this is an exported function, so I could see maybe wanting to do the argumen

[PATCH v2] block: register_blkdev doesn't check name against NULL

2013-09-10 Thread Vaughan Cao
register_blkdev(0, NULL) can result kernel Oops by copying from NULL in strlcpy(). Fix it by checking NULL pointer at the beginning and WARN when encountered in unregister_blkdev. Signed-off-by: Vaughan Cao --- block/genhd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a