All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, Colin Ian King <colin.king@canonical.com>,
	Jia-Ju Bai <baijiaju1990@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: u132-hcd: fix potential NULL pointer dereference
Date: Wed, 27 Mar 2019 19:27:30 +0530	[thread overview]
Message-ID: <484452ec-d3a3-f663-158c-1308c297b8d1@codeaurora.org> (raw)
In-Reply-To: <20190326044132.GA19677@kroah.com>

Please change the patch version in subject while sending patch.

On 3/26/2019 10:11 AM, Greg Kroah-Hartman wrote:
> On Tue, Mar 19, 2019 at 12:34:06PM -0500, Kangjie Lu wrote:
>> In case create_singlethread_workqueue fails, the fix notifies
>> callers the error to avoid potential NULL pointer dereferences.
>>
>> Signed-off-by: Kangjie Lu <kjlu@umn.edu>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh

>> ---
>> removed "unlikely"
>> ---
>>   drivers/usb/host/u132-hcd.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
>> index 934584f0a20a..6d5b532b03f8 100644
>> --- a/drivers/usb/host/u132-hcd.c
>> +++ b/drivers/usb/host/u132-hcd.c
>> @@ -3203,6 +3203,8 @@ static int __init u132_hcd_init(void)
>>   		return -ENODEV;
>>   	printk(KERN_INFO "driver %s\n", hcd_name);
>>   	workqueue = create_singlethread_workqueue("u132");
>> +	if (!workqueue)
>> +		return -ENOMEM;
>>   	retval = platform_driver_register(&u132_platform_driver);
>>   	return retval;
> if platform_driver_register() fails, shouldn't you clean up the
> workqueue?  That can be a separate patch, that's not your fault here :)

I have taken care of it.

https://lore.kernel.org/patchwork/patch/1054800/



>
> thanks,
>
> greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Mukesh Ojha <mojha@codeaurora.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, Colin Ian King <colin.king@canonical.com>,
	Jia-Ju Bai <baijiaju1990@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: usb: u132-hcd: fix potential NULL pointer dereference
Date: Wed, 27 Mar 2019 19:27:30 +0530	[thread overview]
Message-ID: <484452ec-d3a3-f663-158c-1308c297b8d1@codeaurora.org> (raw)

Please change the patch version in subject while sending patch.

On 3/26/2019 10:11 AM, Greg Kroah-Hartman wrote:
> On Tue, Mar 19, 2019 at 12:34:06PM -0500, Kangjie Lu wrote:
>> In case create_singlethread_workqueue fails, the fix notifies
>> callers the error to avoid potential NULL pointer dereferences.
>>
>> Signed-off-by: Kangjie Lu <kjlu@umn.edu>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh

>> ---
>> removed "unlikely"
>> ---
>>   drivers/usb/host/u132-hcd.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
>> index 934584f0a20a..6d5b532b03f8 100644
>> --- a/drivers/usb/host/u132-hcd.c
>> +++ b/drivers/usb/host/u132-hcd.c
>> @@ -3203,6 +3203,8 @@ static int __init u132_hcd_init(void)
>>   		return -ENODEV;
>>   	printk(KERN_INFO "driver %s\n", hcd_name);
>>   	workqueue = create_singlethread_workqueue("u132");
>> +	if (!workqueue)
>> +		return -ENOMEM;
>>   	retval = platform_driver_register(&u132_platform_driver);
>>   	return retval;
> if platform_driver_register() fails, shouldn't you clean up the
> workqueue?  That can be a separate patch, that's not your fault here :)

I have taken care of it.

https://lore.kernel.org/patchwork/patch/1054800/



>
> thanks,
>
> greg k-h

  reply	other threads:[~2019-03-27 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  7:27 [PATCH] usb: u132-hcd: fix potential NULL pointer dereference Kangjie Lu
2019-03-14  7:27 ` Kangjie Lu
2019-03-19 13:56 ` [PATCH] " Greg Kroah-Hartman
2019-03-19 13:56   ` Greg Kroah-Hartman
2019-03-19 17:20   ` [PATCH] " Kangjie Lu
2019-03-19 17:20     ` Kangjie Lu
2019-03-19 17:34   ` [PATCH] " Kangjie Lu
2019-03-19 17:34     ` Kangjie Lu
2019-03-26  4:41     ` [PATCH] " Greg Kroah-Hartman
2019-03-26  4:41       ` Greg Kroah-Hartman
2019-03-27 13:57       ` Mukesh Ojha [this message]
2019-03-27 13:57         ` Mukesh Ojha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=484452ec-d3a3-f663-158c-1308c297b8d1@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=baijiaju1990@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pakki001@umn.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.