Performing pointer arithmetic on a null pointer?

Hyeonggon Yoo 42.hyeyoo at gmail.com
Thu May 27 11:56:30 EDT 2021


On Thu, May 27, 2021 at 05:27:06PM +0200, Lukas Bulwahn wrote:
> Hyeonggon,
> 
> there is a patch series from Arnd Bergmann, a well-known kernel
> developer and janitor, hanging around here:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=warnings-5.10-2
> 

Oh, Arnd Bergmann was already working on it!

> It includes a patch to address this issue:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commit/?h=warnings-5.10-2&id=cda293a8ee8a2bc763c33828cbc9ff21af987d45
> 
> The patch title and commit message indicates that this was submitted
> in multiple versions to the mailing list.
> 
> You can find more on its progress on the mailing list here:
> https://lore.kernel.org/lkml/?q=seq_file%3A+fix+clang+warning+for+NULL+pointer+arithmetic
> 

Thank you for giving some informations,
it's always fun to read mailing list that I can understand :)

> It seems that it has not landed in linux-next yet, though:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?qt=grep&q=seq_file%3A+fix+clang+warning+for+NULL+pointer+arithmetic
> 

Yes I was doing it on linux-next.. :D

> The commit and discussion around it will give you much more technical
> details on the issue and its resolution.
> 
> I hope this helps.
> 
> Lukas

Thank you for giving some links. it will be much helpful.
I'm going to read it now!

Hyeonggon



More information about the Kernelnewbies mailing list