This is a note to let you know that I've just added the patch titled staging: comedi: fix result of memdup_user for user chanlist to the 3.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: staging-comedi-fix-result-of-memdup_user-for-user-chanlist.patch and it can be found in the queue-3.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e56b1401056288a725d50942ef300dcbed5e519a Mon Sep 17 00:00:00 2001 From: Bernd Porr <mail@xxxxxxxxxxxxxxx> Date: Wed, 11 Dec 2013 16:06:15 +0000 Subject: staging: comedi: fix result of memdup_user for user chanlist From: Bernd Porr <mail@xxxxxxxxxxxxxxx> commit e56b1401056288a725d50942ef300dcbed5e519a upstream. If the channel list is not set in userspace we get an error at PTR_ERR(async->cmd.chanlist). However, do_become_nonbusy(dev, s) cleans up this pointer which causes a kernel ooops. Setting the channel list in async to NULL and checking this in do_become_nonbusy prevents the oops. [Ian Abbott] Also do the same for the chanlist allocated in do_cmdtest_ioctl(). Signed-off-by: Bernd Porr <mail@xxxxxxxxxxxxxxx> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/comedi_fops.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1425,6 +1425,7 @@ static int do_cmd_ioctl(struct comedi_de async->cmd.chanlist_len * sizeof(int)); if (IS_ERR(async->cmd.chanlist)) { ret = PTR_ERR(async->cmd.chanlist); + async->cmd.chanlist = NULL; DPRINTK("memdup_user failed with code %d\n", ret); goto cleanup; } @@ -1547,6 +1548,7 @@ static int do_cmdtest_ioctl(struct comed cmd.chanlist_len * sizeof(int)); if (IS_ERR(chanlist)) { ret = PTR_ERR(chanlist); + chanlist = NULL; DPRINTK("memdup_user exited with code %d", ret); goto cleanup; } Patches currently in stable-queue which might be from mail@xxxxxxxxxxxxxxx are queue-3.13/staging-comedi-fix-result-of-memdup_user-for-user-chanlist.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html