diff mbox

ACPI: sbshc: remove raw pointer from printk message

Message ID 20180119090603.GA7775@kroah.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Greg KH Jan. 19, 2018, 9:06 a.m. UTC
There's no need to be printing a raw kernel pointer to the kernel log at
every boot.  So just remove it, and change the whole message to use the
correct dev_info() call at the same time.

Reported-by: Wang Qize <wang_qize@venustech.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rafael J. Wysocki Jan. 19, 2018, 11:53 p.m. UTC | #1
On Fri, Jan 19, 2018 at 10:06 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> There's no need to be printing a raw kernel pointer to the kernel log at
> every boot.  So just remove it, and change the whole message to use the
> correct dev_info() call at the same time.
>
> Reported-by: Wang Qize <wang_qize@venustech.com.cn>
> Cc: stable <stable@vger.kernel.org>

I will remember this one. ;-)

> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
> index 2fa8304171e0..217e1caf58d6 100644
> --- a/drivers/acpi/sbshc.c
> +++ b/drivers/acpi/sbshc.c
> @@ -275,8 +275,8 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
>         device->driver_data = hc;
>
>         acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc);
> -       printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n",
> -               hc->ec, hc->offset, hc->query_bit);
> +       dev_info(&device->dev, "SBS HC: offset = 0x%0x, query_bit = 0x%0x\n",
> +                hc->offset, hc->query_bit);
>
>         return 0;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH Jan. 20, 2018, 7:36 a.m. UTC | #2
On Sat, Jan 20, 2018 at 12:53:39AM +0100, Rafael J. Wysocki wrote:
> On Fri, Jan 19, 2018 at 10:06 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > There's no need to be printing a raw kernel pointer to the kernel log at
> > every boot.  So just remove it, and change the whole message to use the
> > correct dev_info() call at the same time.
> >
> > Reported-by: Wang Qize <wang_qize@venustech.com.cn>
> > Cc: stable <stable@vger.kernel.org>
> 
> I will remember this one. ;-)
> 
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Does that mean you want me to take this through my tree?  Or is there an
acpi tree it will go through?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Jan. 20, 2018, 8:03 a.m. UTC | #3
On Sat, Jan 20, 2018 at 8:36 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Sat, Jan 20, 2018 at 12:53:39AM +0100, Rafael J. Wysocki wrote:
>> On Fri, Jan 19, 2018 at 10:06 AM, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > There's no need to be printing a raw kernel pointer to the kernel log at
>> > every boot.  So just remove it, and change the whole message to use the
>> > correct dev_info() call at the same time.
>> >
>> > Reported-by: Wang Qize <wang_qize@venustech.com.cn>
>> > Cc: stable <stable@vger.kernel.org>
>>
>> I will remember this one. ;-)
>>
>> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Does that mean you want me to take this through my tree?  Or is there an
> acpi tree it will go through?

I thought you'd push it, but I can take it, of course.  For 4.16, though.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH Jan. 20, 2018, 8:16 a.m. UTC | #4
On Sat, Jan 20, 2018 at 09:03:33AM +0100, Rafael J. Wysocki wrote:
> On Sat, Jan 20, 2018 at 8:36 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Sat, Jan 20, 2018 at 12:53:39AM +0100, Rafael J. Wysocki wrote:
> >> On Fri, Jan 19, 2018 at 10:06 AM, Greg Kroah-Hartman
> >> <gregkh@linuxfoundation.org> wrote:
> >> > There's no need to be printing a raw kernel pointer to the kernel log at
> >> > every boot.  So just remove it, and change the whole message to use the
> >> > correct dev_info() call at the same time.
> >> >
> >> > Reported-by: Wang Qize <wang_qize@venustech.com.cn>
> >> > Cc: stable <stable@vger.kernel.org>
> >>
> >> I will remember this one. ;-)
> >>
> >> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >>
> >> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Does that mean you want me to take this through my tree?  Or is there an
> > acpi tree it will go through?
> 
> I thought you'd push it, but I can take it, of course.  For 4.16, though.

4.16 is fine, the issue has been around for a very long time, no rush :)

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH Jan. 22, 2018, 7:18 a.m. UTC | #5
On Mon, Jan 22, 2018 at 11:19:36AM +0800, wang_qize@venustech.com.cn wrote:
> 
>  I has recvied a cve-id from mitre.org for this security bug .
> should this cve-id( CVE-2018-5750) be mentioned in kernel change log?

Only if Rafael wants to hand-edit the patch, it's not really needed for
a kernel log commit message to have CVE items in it, especially as the
id was received after the patch was created and submitted.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 2fa8304171e0..217e1caf58d6 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -275,8 +275,8 @@  static int acpi_smbus_hc_add(struct acpi_device *device)
 	device->driver_data = hc;
 
 	acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc);
-	printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n",
-		hc->ec, hc->offset, hc->query_bit);
+	dev_info(&device->dev, "SBS HC: offset = 0x%0x, query_bit = 0x%0x\n",
+		 hc->offset, hc->query_bit);
 
 	return 0;
 }