RE: [PATCH] intel_punit_ipc: add NULL check for input parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: platform-driver-x86-owner@xxxxxxxxxxxxxxx [mailto:platform-driver-
> x86-owner@xxxxxxxxxxxxxxx] On Behalf Of Darren Hart
> Sent: Monday, January 11, 2016 11:22 PM
> To: One Thousand Gnomes <gnomes@xxxxxxxxxxxxxxxxxxx>
> Cc: Zha, Qipeng <qipeng.zha@xxxxxxxxx>; platform-driver-
> x86@xxxxxxxxxxxxxxx; andriy.shevchenko@xxxxxxxxxxxxxxx; Chakravarty,
> Souvik K <souvik.k.chakravarty@xxxxxxxxx>
> Subject: Re: [PATCH] intel_punit_ipc: add NULL check for input parameters
> 
> On Fri, Jan 08, 2016 at 11:26:44AM +0000, One Thousand Gnomes wrote:
> > On Fri,  8 Jan 2016 18:32:27 +0800
> > Qipeng Zha <qipeng.zha@xxxxxxxxx> wrote:
> >
> > > intel_punit_ipc_command() maybe called when in or out data pointers
> > > are NULL.
> >
> > In which case what happens: the command is not issued but there seems
> > to be no way for the caller to discover this, and nohing is logged.
> >
> > Alan
> >
> 
> These functinos are not void, it seems an errcode or a message is in order.
> 
> Also, the commit message needs to document in what scenario
> intel_punit_ipc_command() may be called with null pointers - and why we
> consider that to be OK.

Darren,
In Punit IPC, all of the commands do not need an Input parameter; similarly all cmds do not need an output parameter(eg setting events).
Telemetry uses all the flavors. (This fix is already there in our internal codebase for a long time, but somehow got missed during upstreaming).
So this is not an error condition & the API needs to handle all cases properly. 
> 
> --
> Darren Hart
> Intel Open Source Technology Center
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86"
> in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo
> info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux