Howto pass pointer to char parameter to kernel via copy_to_user()

by Danke Xie » Wed, 21 Jul 2010 04:25:56 GMT

Sponsored Links
 Hi Dwi,

I couldn't really figure out what is being done in the code. But I
think I noticed a reason why the call might fail (though not 100%
sure). You allocated one byte with kmalloc, which is sizeof(char), but
you would be copying 4 bytes into the area, that is sizeof(tmp). I
think that's why you got a seg fault. Do you think so?



Other Threads

1. Galley of thumbnails from the web running out of memory

My application loads 12 100x100 thumbnail images from the web using
the code below.  I then display the thumbnails in a GridView using an
ImageAdapter derived from BaseAdapter.  I'm running into memory issues
because each of the thumbnails is held in memory as a Bitmap.

This seems like a fairly straightforward application (display a
gallery of thumbnails from the web), can some give me advice on how to
reduce my memory needs?  Maybe there's a better way to display web
images in a GridView that doesn't involve downloading and storing each
one as a Bitmap?

                // Download a Bitmap thumbnail for each photo
                Bitmap bm;
                HttpGet httpRequest;
                HttpClient httpclient;
                HttpResponse response;
                HttpEntity entity;
                InputStream instream = null;
                BufferedHttpEntity bufHttpEntity;
                for (Photo photo : photos) {
                        try {

                                httpRequest = new HttpGet(photo.getThumbnail());

                                httpclient = new DefaultHttpClient();
                                response = (HttpResponse) httpclient

                                entity = response.getEntity();
                                bufHttpEntity = new BufferedHttpEntity(
                                instream = bufHttpEntity.getContent();

                                bm = BitmapFactory.decodeStream(instream);

                        } catch (Exception e) {

                        } finally {
                                try {
                                        if (instream != null) {
                                } catch (IOException e) {


2. executing a shell script from Android application

Hi all,

  I am configuring wifi on my android based board using shell script.
Now I want to execute the same script from android application. For
that, I had used following code, but it didn't give any success till

I had executed same script from "adb shell" prompt and it works

Process exeCommands = Runtime.getRuntime().exec("/data/busybox/");

is there anything else required than this???

Please help..


3. No visual feedback for preference defaults - bug or feature?

4. Finding a Point-Of-Interest

5. bind to a remore service

6. Eclair build bootup issue on Beagle board.

7. Suspicious TCP RST packets while device is sleeping.