Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Muni Sekhar
On Wed, Sep 2, 2015 at 9:39 PM, Jeff Epler wrote: > On Wed, Sep 02, 2015 at 08:32:15PM +0530, Muni Sekhar wrote: >> [ 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

Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Dmitry Torokhov
On Wed, Sep 2, 2015 at 8:02 AM, Muni Sekhar wrote: > [ 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; > >

Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Jeff Epler
On Wed, Sep 02, 2015 at 08:32:15PM +0530, Muni Sekhar wrote: > [ 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: [..]

kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Muni Sekhar
[ 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);

Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Jeff Epler
On Wed, Sep 02, 2015 at 08:32:15PM +0530, Muni Sekhar wrote: > [ 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: [..]

Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Dmitry Torokhov
On Wed, Sep 2, 2015 at 8:02 AM, Muni Sekhar wrote: > [ 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 >

Re: kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Muni Sekhar
On Wed, Sep 2, 2015 at 9:39 PM, Jeff Epler wrote: > On Wed, Sep 02, 2015 at 08:32:15PM +0530, Muni Sekhar wrote: >> [ 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 >>

kfree a pointer "from the middle" causing protection faults

2015-09-02 Thread Muni Sekhar
[ 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);