All of lore.kernel.org
 help / color / mirror / Atom feed
* kfree a pointer "from the middle" causing protection faults
@ 2015-09-02 15:02 Muni Sekhar
  2015-09-02 16:09 ` Jeff Epler
  2015-09-02 16:29 ` Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Muni Sekhar @ 2015-09-02 15:02 UTC (permalink / raw)
  To: linux-kernel

 [ Please keep me in CC as I'm not subscribed to the list]

Hello,


I am getting protection faults in different kernel modules if I try to
free a pointer "from the middle" for example, look at the following
code:


u8 *buf;


buf = kzalloc( 100 , GFP_KERNEL );

…

buf = buf + 50;

…

Kfree(buf);




I would like to know, why the above code is causing protection faults
in other kernel modules?


Regards,
Sekhar

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-03  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 15:02 kfree a pointer "from the middle" causing protection faults Muni Sekhar
2015-09-02 16:09 ` Jeff Epler
2015-09-03  4:24   ` Muni Sekhar
2015-09-02 16:29 ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.