lkml.org 
[lkml]   [2013]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog
On 04/09/2013 12:30 PM, Luck, Tony wrote:
> - misc_register(&mce_chrdev_device);
> + if (misc_register(&mce_chrdev_device) != 0)
> + pr_warn("Failed to register mcelog device\n");
>
> Did this actually happen to you? Or is this just "good practice" to check the
> return value from misc_register?
>

No, I did not see this happen. It is just "good practice". If it were to
happen, mcelog daemon would fail to get any mce records and it will not
be easy to figure out what happened. Most other places in kernel where
misc_register() is called, do check for return code and take action if
it fails.

--
Khalid



\
 
 \ /
  Last update: 2013-04-09 22:01    [W:0.045 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site