* [PATCH] dm-lc.c: return -ENOMEM if alloc_workqueue fails
@ 2013-07-29 20:48 Kumar Amit Mehta
2013-07-30 13:14 ` Akira Hayakawa
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Amit Mehta @ 2013-07-29 20:48 UTC (permalink / raw)
To: ruby.wktk; +Cc: dm-devel
Audit the return value of alloc_workqueue and return -ENOMEM if it fails
Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
---
Driver/dm-lc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Driver/dm-lc.c b/Driver/dm-lc.c
index 4f48cf2..9d394ee 100644
--- a/Driver/dm-lc.c
+++ b/Driver/dm-lc.c
@@ -2963,6 +2963,8 @@ static int __init lc_module_init(void)
safe_io_wq = alloc_workqueue("safeiowq",
WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);
+ if (!safe_io_wq)
+ return -ENOMEM;
lc_io_client = dm_io_client_create();
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dm-lc.c: return -ENOMEM if alloc_workqueue fails
2013-07-29 20:48 [PATCH] dm-lc.c: return -ENOMEM if alloc_workqueue fails Kumar Amit Mehta
@ 2013-07-30 13:14 ` Akira Hayakawa
0 siblings, 0 replies; 2+ messages in thread
From: Akira Hayakawa @ 2013-07-30 13:14 UTC (permalink / raw)
To: Kumar Amit Mehta; +Cc: dm-devel
Kumar,
Thanks for your patch, applied.
Akira
On 7/30/13 5:48 AM, Kumar Amit Mehta wrote:
> Audit the return value of alloc_workqueue and return -ENOMEM if it fails
>
> Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
> ---
> Driver/dm-lc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Driver/dm-lc.c b/Driver/dm-lc.c
> index 4f48cf2..9d394ee 100644
> --- a/Driver/dm-lc.c
> +++ b/Driver/dm-lc.c
> @@ -2963,6 +2963,8 @@ static int __init lc_module_init(void)
>
> safe_io_wq = alloc_workqueue("safeiowq",
> WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);
> + if (!safe_io_wq)
> + return -ENOMEM;
>
> lc_io_client = dm_io_client_create();
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-30 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 20:48 [PATCH] dm-lc.c: return -ENOMEM if alloc_workqueue fails Kumar Amit Mehta
2013-07-30 13:14 ` Akira Hayakawa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).